Output the spatial results for specific layer
I would like to know if there is a specific way to print out the results (spatial results at a specified time) for a specific layer of grid cells. Since my model is a 2D radial model (350 * 10 grid cells) with 10 layers, the output results (OUTPUT_ELEME) include the results for all grid cells at the specified output times. In this case, I have to filter the results for the remaining layers to get the results for the layer of interest which takes a long time.
You can use a Python module of mine (https://github.com/keurfonluu/toughio).
To install, you need a Python distribution (e.g. Anaconda) and then run in Windows console:
pip install toughio[full] --user
To read the last time step of OUTPUT_ELEME.csv in Python:
import toughio out = toughio.read_output("OUTPUT_ELEME.csv")[-1]
To extract data (e.g. temperature) at specific depths (e.g. 0.0 <= z < 10.0):
import numpy idx = numpy.logical_and(out.data["Z"] >= 0.0, out.data["Z"] < 10.0) temp = out.data["TEMP"][idx]
I just wanted to first thank you for developing toughio. Also, I have a little bit of a problem using it for a MINC problem. mesh = toughio.meshmaker.triangulate(points) gives me an error (please see the image). toughio-export command gives me the same error. I really appreciate it if you could let me know what you think about the error.