Kamil Nešetřil

Environmental data management and analytics

User Tools

Site Tools


Departing griffin (Greek γρύψ)
The griffin combines lion and eagle – sky and earth.
As rulers of both realms, griffins are the mightiest beasts.
OUTGRIF connects models.

OUTGRIF

Software for processing and transforming data from 3D computational meshes

Authors: Michal Balatka,1) Kamil Nešetřil

Department of Mechatronics and Technical Informatics (MTI)
Faculty of Mechatronics, Informatics and Interdisciplinary Studies (FM)
Technical University of Liberec (TUL)

OUTGRIF2) is a tool for converting data between computational grids. It transforms spatially distributed parameters and results from simulation tools like Groundwater Vistas or Flow123d into the HDF5 “Gridded Dataset” format, which is used as input for PFLOTRAN.

Additional features of OUTGRIF:

  • formula-based unit and value conversion,
  • interpolation from surrounding grid elements (or using value at a single element),
  • 2D slices exported as images and tables.

OUTGRIF is implemented in Python. Its functionality is configured via a YAML file.

Permanent link:
dataearth.cz/outgrif

Input data files

The software supports two types of input data files:

  • S3D – exported from Groundwater Vistas (see below), and
  • MSH (Gmsh) – output from Flow123d (see below)

S3D contains points exported from a (structured or unstructured) grid. MSH contains values assigned to elements of a computational mesh.

S3D – Groundwater Vistas

Groundwater Vistas is a GUI for MODFLOW and related software. MODFLOW is a simulator for groundwater flow modeling.

Groundwater Vistas allows export into an S3D file (CSV format with a two-line header) containing:

  • input spatially distributed parameters (e.g., hydraulic conductivity, porosity), and
  • model results (e.g., hydraulic head).
X_Origin,Y_Origin,Z_Origin,Angle,X_Extent,Y_Extent
-1.000000e+02,-1.000000e+01,260.000000,0.000000,1200.000000,25.000000
X_Cent,Y_Cent,Z_Cent,X_Width,Y_Width,Z_Height,layer,sublayer,node,BC-Type,Kx,Ky,Kz,Ss,Sy,Porosity,HSU,CellType
-9.750000e+01,1.250000e+01,255.000000,5.000000,5.000000,10.000000,1,1,1,CH,1.157407e-03,1.157407e-03,1.157407e-03,1.000000e-02,1.000000e-02,2.000000e-01,1,0
-9.250000e+01,1.250000e+01,255.000000,5.000000,5.000000,10.000000,1,1,2,Active,1.157407e-03,1.157407e-03,1.157407e-03,1.000000e-02,1.000000e-02,2.000000e-01,1,0
-8.750000e+01,1.250000e+01,255.000000,5.000000,5.000000,10.000000,1,1,3,Active,1.157407e-03,1.157407e-03,1.157407e-03,1.000000e-02,1.000000e-02,2.000000e-01,1,0
. . .

S3D file:
The first two lines contain global model parameters (grid placement and dimensions).
Remaining lines describe each cell of the computational grid.

💡 Excerpts from user manuals are marked with a vertical bar on the left.
… save the property values in the current layer to a comma-delimited text file. The contents of the file are X-coordinate, Y-coordinate, and property value.
You have several options when exporting the XYZ file. You may include or exclude no-flow (inactive) cells. You may export the file in site coordinates (those of your base map) or model coordinates (origin in lower left corner of the model). You may export as row, column, and layer instead of XYZ.
You may also export all layers. If you choose to export all layers, then the file contains another column for the elevation of the cell center.
Manuál Groundwater Vistas, kapitola Exporting Properties > Property Values (XYZ); p. 164n
The XYZ format is a simple DOS text file that lists each head, concentration, drawdown, flux, or velocity computed by GV and its X and Y locations. One data point is listed on each line of the file. — p. 408

MSH – Flow123d and Gmsh

Flow123d is a simulation software for groundwater modeling. It stores its results in MSH files (*.msh) – a file format used by Gmsh (specification: MSH file format).

Flow123d supports output of scalar, vector and tensor data fields into two formats. The first is the native format of the Gmsh software (usually with extension msh) which contains computational mesh followed by data fields for sequence of time levels. — Flow123d Manual



Output data files

PFLOTRAN

HDF5 for PFLOTRAN

Input data for PFLOTRAN is converted into the “Gridded Dataset” format (regular orthogonal grid) and saved as an HDF5 file (Hierarchical Data Format with extension *.h5).3)

The specification of the “Gridded Dataset” data format for PFLOTRAN is available at the DATASET page, in the section Gridded Datasets. OUTGRIF is compatible with PFLOTRAN version 6.

The attribute Dimension is always set to XYZ.

Dimension <string>: options are X, Y, Z, XY, XZ, YZ, XYZ

The attribute Time Units is not written – seconds must be used.

Time Units <string>: time units for ‘’Time’’ Dataset. Required only only if time units are not seconds (s). Options include second, minute, hour, day, week, month, year. You can also use abbreviations: s,min,h,d,w,mo,y.

2D slices

OUTGRIF can also generate auxiliary outputs (planes_outputs):

  • images (image), and
  • tables in text format (table).

These represent a slice through the 3D grid (orthogonal to one of the axes).


Example of a PNG output image


2.6500E+02,2.6400E+02,2.6300E+02,2.6200E+02,2.6100E+02
2.6500E+02,2.6400E+02,2.6300E+02,2.6199E+02,2.6099E+02
2.6499E+02,2.6399E+02,2.6299E+02,2.6199E+02,2.6099E+02
2.6498E+02,2.6398E+02,2.6299E+02,2.6199E+02,2.6099E+02
2.6498E+02,2.6398E+02,2.6298E+02,2.6198E+02,2.6098E+02
2.6498E+02,2.6398E+02,2.6298E+02,2.6198E+02,2.6098E+02
2.6498E+02,2.6398E+02,2.6298E+02,2.6198E+02,2.6098E+02
2.6497E+02,2.6397E+02,2.6297E+02,2.6197E+02,2.6097E+02
2.6497E+02,2.6397E+02,2.6297E+02,2.6197E+02,2.6097E+02
2.6496E+02,2.6396E+02,2.6296E+02,2.6197E+02,2.6097E+02

Example of a plain text output (CSV without header)



YAML – configuration file defining the task

Each task is configured by an input file written in YAML format.

YAML configuration file (specification)

Example YAML configuration file



Use case example

PFLOTRAN supports complex THC simulations, which are demanding both in setup and in computational cost. As a result, PFLOTRAN models tend to be smaller in extent than typical (regional-scale) groundwater models (e.g., MODFLOW-based).

Since a local model does not cover the full extent of the domain (e.g., watershed or stream network boundaries), it requires boundary conditions (flows, pressures) taken from the regional model. Hydraulic parameters (e.g., conductivity) calibrated in the regional model can also be transferred to the local PFLOTRAN model.

Conversions applied during import from MODFLOW-USG to PFLOTRAN:

  • Pressure was calculated assuming water density of 1000 kg⋅m-3, gravity 9.804 m⋅s-1, and atmospheric pressure 101,325 Pa:
    p = 9 804 (h − z) + 101 325, where
    • p is pressure [Pa],
    • h is hydraulic head [m a.s.l.],
    • z is vertical coordinate [m a.s.l.]
  • Permeability was computed from hydraulic conductivity using dynamic viscosity at 10 °C (1.308⋅10−3 Pa⋅s):
    k = K ⋅ 1.333786 ⋅ 10−7, where
    • K is hydraulic conductivity, k is permeability
  • HDF5-format input was also prepared for the thermal field. Temperature within the model domain was derived from a geothermal gradient of 0.025 °C⋅m−1, assuming surface temperature of 10 °C.
  • In one case, water pressure was stored as a time-varying field in the HDF5 file (e.g., to reflect climatic effects).



References

PFLOTRAN

PFLOTRAN

Applications

  • MOLINERO, Jorge, Paolo TRINCHERO, Luis Manuel DE VRIES, Hedied EBRAHIMI a Urban SVENSSON, 2016. The BRIDGE project: Development, testing and application of a high perfor­mance computing framework for reactive transport model­ling in crystalline rocks (iDP). R‑15‑17. SKB. PDF
  • KOLOMÁ K., TRPKOŠOVÁ D., KRÁLOVCOVÁ J., NEŠETŘIL K., MILICKÝ M., GVOŽDÍK L., VENCELIDES Z., 2024: Geochemical model of the reference deep geological repository site. MS SÚRAO, Final report No. 785/2024 (ZZ 785/2024)

Groundwater Vistas

  • James O. RUMBAUGH, Douglas B. RUMBAUGH, 2024. Groundwater Vistas [software]. Reinholds PA: Environmental Simulations, Inc. groundwatermodels.com
  • James O. RUMBAUGH, Douglas B. RUMBAUGH4) 2000–2020 Guide to Using Groundwater Vistas Version 8 Environmental Simulations, Inc. 523 s. PDF

Flow123d

Flow123d

  • BŘEZINA, Jan, Jan STEBEL, David FLANDERKA, Pavel EXNER a Jan HYBŠ, 2020. Flow123d. Version 3.0.4. Technical University of Liberec. flow123d.github.io.
  • BŘEZINA, Jan, Jan STEBEL, David FLANDERKA a Pavel EXNER, 2022. Flow123d version 3.9.0 User Guide and Input Reference. Liberec: Technical university of Liberec. Faculty of mechatronics, informatics and interdisciplinary studies. pdf

A three-dimensional finite element mesh generator with built-in pre- and post-processing facilities

Gmsh

  • Specification: MSH file format
  • GEUZAINE C. and J.-F. REMACLE, 2009. Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities. International Journal for Numerical Methods in Engineering 79(11), pp. 1309–1331. 10.1002/nme.2579
2)
OUT – output to
GRI – grids from
F – Flow123d and MODFLOW
3)
You can explore HDF5 files using HDFView.
4)
ESI Programming Team
Last modified: