Class WriteMesh#
- class tools.outmesh.WriteMesh[source]#
Class for writing model outputs. The outputs are written as hdf5 files for each mesh partition.
Note
The model outputs are all located in an output folder (dir key in the inputfile documentation) and consist of a time series file named gospl.xdmf and 2 other folders (h5 and xmf).
The XDMF file is the main entry point for visualising the output and should be sufficient for most users. This file can easely be opened within Paraview.
Methods
readData()When a simulation restarts, variables from previous HDF5 output files are read and assigned to the restarting run.
visModel()Main function to write model outputs on disk.
Initialise
__init__()Initialise model outputs parameters.
Public Methods
readData()When a simulation restarts, variables from previous HDF5 output files are read and assigned to the restarting run.
visModel()Main function to write model outputs on disk.
Private Methods
Create a directory to store outputs.
Saves mesh local information stored in the DMPlex to HDF5 file.
Saves mesh local stratigraphic information stored in the DMPlex as HDF5 file.
Saves mesh local information stored in the HDF5 to XmF file.
This function writes the XDmF file which is calling the XmF files above.
Public functions#
- WriteMesh.readData()[source]#
When a simulation restarts, variables from previous HDF5 output files are read and assigned to the restarting run.
The following variables are used:
surface elevation elev.
cumulative erosion & deposition values erodep.
erosion & deposition values EDrate for the considered time step.
flow accumulation fillFA considering pit filling.
river sediment load sedLoad.
flexural isostasy induced tectonics flexIso.
Note
If stratigraphy is turned on, the function also reads underlying stratigraphic information.
Private functions#
- WriteMesh._createOutputDir()[source]#
Create a directory to store outputs. By default the folder will be called output. If a folder name is specified in the YAML input file, this name will be used.
Note
The input option makedir gives the ability to delete any existing output folder with the same name (if set to False) or to create a new folder with the given dir name plus a number at the end (e.g. outputDir_XX if set to True with XX the run number). It prevents overwriting on top of previous runs.
- WriteMesh._outputMesh()[source]#
Saves mesh local information stored in the DMPlex to HDF5 file. If the file already exists, it will be overwritten. Mesh characteristics are recorded for each partition. The following variables will be available:
surface elevation elev.
cumulative erosion & deposition values erodep.
erosion & deposition rate values EDrate for the considered time step.
flow accumulation FA.
flow accumulation fillFA considering pit filling.
river sediment load sedLoad.
uplift subsidence values if vertical tectonic forcing is considered uplift.
flexural isostasy rebound flexIso if flexure is considered.
precipitation maps based on forcing conditions rain (could also correspond to the orographic rain if the functionality is turned on).
- WriteMesh._outputStrat()[source]#
Saves mesh local stratigraphic information stored in the DMPlex as HDF5 file. The following variables will be recorded:
elevation at time of deposition, considered to be to the current elevation for the top stratigraphic layer stratZ.
thickness of each stratigrapic layer stratH accounting for both erosion & deposition events.
porosity of sediment phiS in each stratigraphic layer computed at center of each layer.
Important
It is worth mentioning that the stratigraphic architecture is only outputed as HDF5 files and does not record the XMF and XDMF files. A set of post-processing scripts are then required to extract the informations and visualise the stratigraphic records of any specific simulations.
- WriteMesh._save_DMPlex_XMF()[source]#
Saves mesh local information stored in the HDF5 to XmF file. The XMF files are XML schema explaining how to read gospl data files.
The XmF file is written by a single processor (rank 0) and contains each partition HDF5 files in blocks. The variables described for the HDF5 file (function _outputMesh above) are all accessible from this file.
- WriteMesh._save_XDMF()[source]#
This function writes the XDmF file which is calling the XmF files above. The XDmF file represents the time series of the model outputs and can be directly loaded and visualised with Paraview.
Note
For a brief overview of the approach used to record gospl outputs, user can read this visit documentation