Repository navigation
MODFLOW NetCDF Format
This guide describes the supported formats of MODFLOW 6 NetCDF files. As NetCDF support in MODFLOW 6 is an ongoing development effort, aspects of these formats related specifically to MODFLOW 6 (naming conventions, internal attributes, etc.) are subject to change.
Extended MODFLOW 6 can read and write version 4 (NetCDF-4) NetCDF files. Two different formats are supported for each (input and output) file type: a structured format and a UGRID based unstructured LAYERED MESH format. Each format aims to be cf-conventions compliant.
All MODFLOW 6 NetCDF files correspond to a model. Output files contain arrays for the model dependent variable. Input files can contain package arrays that are supported as inputs from NetCDF files. These variables are indicated with red highlighting in MODFLOW 6 - Description of Input and Output (mf6io.pdf). Currently, supported inputs include GRIDDATA block arrays and PERIOD block arrays of the RCHA and EVTA (READASARRAYS) and CHDG, DRNG, GHBG, RIVG and WELG (READARRAYGRID) packages.
FloPy 4 is the next major version of FloPy, currently under active development. Unlike the existing FloPy export_netcdf() utility — which produces a separate legacy format not compatible with MODFLOW 6 native NetCDF I/O — FloPy 4 is designed from the ground up to create and consume MODFLOW 6 native NetCDF files. It is the recommended Python interface for working with the format described in this document.
Creating input files. flopy4.mf6.netcdf.NetCDFModel.from_model(gwf, netcdf_format=..., grid=..., time=...) builds a correctly-annotated NetCDF input model from a model's package arrays, and .to_netcdf(path) writes the file. netcdf_format=NetCDFFormat.LAYERED_MESH (flopy4.mf6.enums) selects the UGRID Layered Mesh format; the default, NetCDFFormat.STRUCTURED, selects the structured format. Set gwf.netcdf_input_file to the file and write the simulation within flopy4.mf6.write_context.WriteContext(use_netcdf=True); the package files then specify the arrays with the NETCDF keyword instead of writing them as text. PERIOD arrays are written with the slice contents described in MODFLOW 6 NetCDF period input, as MODFLOW 6 exports them.
Reading output files. After running extended MODFLOW 6 (see below), FloPy 4 can open the NetCDF output file directly: gwf.output.head reads it when the model writes no OC head file (the binary grid file is also needed). For DISV output it returns an xugrid-backed UgridDataArray that carries full mesh geometry, making it straightforward to plot or export to QGIS as a Mesh Layer; for DIS output it returns an xarray.DataArray.
Extended MODFLOW 6 requirement. NetCDF I/O requires the extended MODFLOW 6 build. FloPy 4 examples gate execution of NetCDF based simulations for this reason, which require NetCDF libraries compiled into the binary.
Practical examples covering DIS-based structured grids, DIS-based UGRID layered mesh grids, and DISV-based vertex grids are available in the FloPy 4 repository: twri.py, frenchman-flat.py, and circle.py.
MODFLOW 6 structured NetCDF files support GWF, GWT and GWE DIS based simulations. These files define the x, y and layer dimensions, plus time when the file holds time-dependent data. x, y, and layer correspond to ncol, nrow, and nlay of the model discretization. A z auxiliary coordinate variable, dimensioned (layer, y, x), separately carries the real cell-center elevation -- distinct from layer, which is the discrete layer index. GRIDDATA arrays are dimensioned (layer, y, x), or (y, x), (y) or (x) for arrays such as TOP, DELC and DELR, and have no time dimension. PERIOD arrays are dimensioned (time, layer, y, x), or (time, y, x) for arrays defined per cell of a layer (RCHA and EVTA), where the time dimension size equals NPER, the number of stress periods. Output files use a time dimension equal to the total number of simulation steps (the sum of NSTP across all stress periods).
See MODFLOW-NetCDF-External-Tools for how rotated/curvilinear structured grids display (or don't) in specific third-party GIS software, and how to choose between UTL-NCF's CRS input options accordingly.
MODFLOW 6 UGRID Layered Mesh NetCDF files support GWF, GWT and GWE DIS and DISV based simulations. Each grid based array variable in these file types is split into a set of layer variables. NPF K input data, for example, would be defined in 10 layer data variables when the grid has 10 layers. These files also differ from the structured variants because they contain a set of variables whose purpose is to geometrically define the grid. This is advantageous for displaying the grid itself as well as data associated with the grid in applications that support reading the mesh, such as QGIS.
UGRID layered mesh files define the dimensions nmesh_node, nmesh_face, max_nmesh_face_nodes and layer. nmesh_node and nmesh_face correspond to number of grid vertices and ncpl, respectively. max_nmesh_face_nodes corresponds to the maximum number of vertices in a cell, 4 when modflow_grid is structured. DIS based files also define x and y for input data that is associated with the row or column dimensions of a layer, for example DELC and DELR. GRIDDATA arrays are dimensioned (nmesh_face) with no time dimension. PERIOD arrays are dimensioned (time, nmesh_face) where the time dimension size equals NPER. Output files add a time dimension equal to the total number of simulation steps, with dependent variables dimensioned (time, nmesh_face) and split into one variable per layer.
Output NetCDF files contain the model dependent variable (e.g., hydraulic head for GWF, concentration for GWT). They are written once per simulation time step and contain no MODFLOW 6 specific attributes on data variables. Only the GWF head variable has a units attribute (the model length unit).
For the structured format, the dependent variable is written as a single array dimensioned (time, layer, y, x), where time spans all simulation steps. For the UGRID layered mesh format, the dependent variable is split into one variable per layer (e.g., head_l1, head_l2, ...), each dimensioned (time, nmesh_face). Each layer variable carries mesh and location attributes to associate it with the UGRID mesh topology.
When a coordinate reference system is configured (via UTL-NCF), both formats also write a projection variable carrying crs_wkt (the CRS_WKT input, or WKT when CRS_WKT is not given), wkt when WKT is given, and, for supported projected CRS types, grid_mapping_name. Structured files also carry the CF-standard numeric grid_mapping parameters -- see MODFLOW-NetCDF-External-Tools for how this is used by, and interacts with, specific GIS tools.
Global attributes on output files include title, source, modflow_grid, modflow_model, history, Conventions, and (for UGRID Layered Mesh output) modflow_mesh.
MODFLOW 6 NetCDF input files must define MODFLOW 6 specific attributes to be processed correctly. These attributes are defined at both the file (dataset) and variable scope and vary according to the file format. Any variable that is not annotated with the expected attributes will be ignored and as such MODFLOW 6 NetCDF input files can contain data not intended for MODFLOW 6.
There are no specific requirements related to variable naming other than from the conventions themselves.
The file scoped attribute modflow_grid is required for structured NetCDF inputs. It describes the MODFLOW 6 discretization type and should always be set to structured for structured inputs (matching is case-insensitive). MODFLOW 6 also writes a modflow_model attribute (<model type>: <model name>, for example gwf: gwf_cf_conv) to describe the file, but does not read it.
Data variables intended to be read as MODFLOW 6 package input must be annotated correctly with MODFLOW 6 input attributes. Variables without the expected annotation will be ignored. The modflow_input attribute is always required while the modflow_iaux attribute is required for auxiliary variables. Use of these attributes are described in more detail below.
The file scoped attribute modflow_grid is required as described for the structured input. DIS based simulation input should set modflow_grid to structured, while DISV based simulation input should set modflow_grid to vertex (matching is case-insensitive). An additional modflow_mesh attribute is required for UGRID based NetCDF input files (the legacy unprefixed mesh name is also still accepted, for files written by older MODFLOW 6 versions). UGRID Layered Mesh files should set this attribute to layered.
Data variables intended to be read as MODFLOW 6 package input must be annotated correctly with MODFLOW 6 input attributes. Variables without the expected annotation will be ignored. The modflow_input attribute is always required while the modflow_iaux attribute is required for auxiliary variables. Use of these attributes are described in more detail below. In addition, each per-layer variable in a UGRID layered mesh file must define the layer attribute, set to the integer value of the layer that the data is associated with. Variables that are not split by layer (e.g. TOP, DELR, DELC), and all structured-file variables, must not define it.
The modflow_input variable scoped attribute is always required and corresponds to the variable model, package and input tag name (<model>/<package>/<tag>). The model part is not checked; the file applies to the model whose name file lists it. The package name is the MODFLOW 6 package name or type, described next. Base packages should use the package type as name, e.g. NPF or DISV. Stress packages should use the package name given in the model name file packages block or, when none is given, the MODFLOW 6 default name <TYPE>-<N> (e.g. WEL-1 for the first WEL package).
The modflow_iaux variable is an additional attribute required only for auxiliary array variables. MODFLOW 6 auxiliary variables are configured with the AUXILIARY keyword in supported options blocks. This keyword is associated with a list of auxiliary names, for example TEMPERATURE followed by SALINITY. modflow_iaux should be set to the position in the auxiliary list for each input aux array. Here, any input data associated with the TEMPERATURE auxiliary should set modflow_iaux to 1 while any SALINITY array should set modflow_iaux to 2.
PERIOD block arrays are dimensioned (time, ...), where the time dimension equals NPER. Each slice holds the input given for that stress period: values given in a PERIOD block are held in later stress periods until they are given again. A slice holds the variable _FillValue where no values have been given:
- for an array that has not been given;
- for an array given as a time-array series (
TIMEARRAYSERIES), from the stress period it is given until values are given again. For array input (READASARRAYS), a series applies until the nextPERIODblock; if that block does not specify the array, MODFLOW 6 sets the array to zero, and its slices hold the fill value until values are given; - for grid array input (
READARRAYGRID:CHDG,DRNG,GHBG,RIVGandWELG), at cells that are not boundaries in that stress period. The boundary cells are the active cells with a value (not3.0E+30) in the first array given in thePERIODblock, whether a stress or an auxiliary array. An emptyPERIODblock removes all boundaries.
For grid array input, an array not given in a PERIOD block keeps its values by position in the list of boundary cells, so every array should be given again when the boundary cells change.
The layer index arrays irch (RCHA) and ievt (EVTA) hold 1 until they are given.
The time coordinate holds the start of each stress period and has bounds (time:bounds = "time_bnds") that give the start and end of each stress period. Real period variables have cell_methods = "time: mean"; integer period variables have no cell_methods. Input variables have no units attribute.
A slice is read only for an array specified with the NETCDF keyword in the PERIOD block for that stress period. A file written with the EXPORT_ARRAY_NETCDF option in VALIDATE mode can be used as input either with the original PERIOD blocks, specifying arrays with the NETCDF keyword in place of their values, or with a PERIOD block for every stress period that specifies every array that has input. Time-array series are not exported, and their TIMEARRAYSERIES entries must remain in the package file; with a PERIOD block for every stress period, the TIMEARRAYSERIES entry of array input (READASARRAYS) must be repeated in every block while the series applies. Files exported by earlier versions of MODFLOW 6 hold slices only for the arrays given in each PERIOD block and should be used with their original PERIOD blocks.
The examples below show ASCII header dumps produced by the ncdump NetCDF command line utility. Dataset dimensions are listed first, followed by variable definitions with their attributes. Dataset scoped (global) attributes appear in the last section.
The following is the header for a structured GWF output file, with a coordinate reference system configured via UTL-NCF's CRS_WKT option. The dependent variable head is dimensioned (time, layer, y, x) where time equals the total number of simulation steps. The projection variable carries crs_wkt, grid_mapping_name, and the CF-standard numeric grid_mapping parameters for this transverse_mercator CRS -- see MODFLOW-NetCDF-External-Tools for how these are used by specific GIS tools.
netcdf gwf_cf_conv {
dimensions:
bnd = 2 ;
time = 4 ;
layer = 2 ;
y = 3 ;
x = 3 ;
variables:
double time(time) ;
time:calendar = "standard" ;
time:units = "days since 2000-01-01T00:00:00-00:00" ;
time:axis = "T" ;
time:standard_name = "time" ;
time:long_name = "time" ;
int layer(layer) ;
layer:units = "1" ;
layer:axis = "Z" ;
layer:positive = "down" ;
layer:long_name = "model layer" ;
double y(y) ;
y:units = "m" ;
y:axis = "Y" ;
y:standard_name = "projection_y_coordinate" ;
y:long_name = "Northing" ;
y:grid_mapping = "projection" ;
y:bounds = "y_bnds" ;
double y_bnds(y, bnd) ;
double x(x) ;
x:units = "m" ;
x:axis = "X" ;
x:standard_name = "projection_x_coordinate" ;
x:long_name = "Easting" ;
x:grid_mapping = "projection" ;
x:bounds = "x_bnds" ;
double x_bnds(x, bnd) ;
double z(layer, y, x) ;
z:units = "m" ;
z:standard_name = "altitude" ;
z:positive = "up" ;
z:long_name = "cell center elevation" ;
double head(time, layer, y, x) ;
head:units = "m" ;
head:long_name = "head" ;
head:_FillValue = 1.e+30 ;
head:cell_methods = "time: point" ;
head:coordinates = "z" ;
head:grid_mapping = "projection" ;
int projection ;
projection:crs_wkt = "PROJCRS[\"NAD83 / UTM zone 18N\",BASEGEOGCRS[\"NAD83\",DATUM[\"North American Datum 1983\",ELLIPSOID[\"GRS 1980\",6378137,298.257222101,LENGTHUNIT[\"metre\",1]]],PRIMEM[\"Greenwich\",0,ANGLEUNIT[\"degree\",0.0174532925199433]],ID[\"EPSG\",4269]],CONVERSION[\"UTM zone 18N\",METHOD[\"Transverse Mercator\",ID[\"EPSG\",9807]],PARAMETER[\"Latitude of natural origin\",0,ANGLEUNIT[\"degree\",0.0174532925199433],ID[\"EPSG\",8801]],PARAMETER[\"Longitude of natural origin\",-75,ANGLEUNIT[\"degree\",0.0174532925199433],ID[\"EPSG\",8802]],PARAMETER[\"Scale factor at natural origin\",0.9996,SCALEUNIT[\"unity\",1],ID[\"EPSG\",8805]],PARAMETER[\"False easting\",500000,LENGTHUNIT[\"metre\",1],ID[\"EPSG\",8806]],PARAMETER[\"False northing\",0,LENGTHUNIT[\"metre\",1],ID[\"EPSG\",8807]]],CS[Cartesian,2],AXIS[\"(E)\",east,ORDER[1],LENGTHUNIT[\"metre\",1]],AXIS[\"(N)\",north,ORDER[2],LENGTHUNIT[\"metre\",1]],ID[\"EPSG\",26918]]" ;
projection:grid_mapping_name = "transverse_mercator" ;
projection:longitude_of_central_meridian = -75. ;
projection:latitude_of_projection_origin = 0. ;
projection:scale_factor_at_central_meridian = 0.9996 ;
projection:false_easting = 500000. ;
projection:false_northing = 0. ;
projection:semi_major_axis = 6378137. ;
projection:inverse_flattening = 298.257222101 ;
// global attributes:
:title = "GWF_CF_CONV hydraulic head" ;
:source = "MODFLOW 6 6.9.0.dev0+9e6f4dd6bf" ;
:modflow_grid = "structured" ;
:modflow_model = "gwf: gwf_cf_conv" ;
:history = "first created 2026/11/19 9:55:37.233" ;
:Conventions = "CF-1.13" ;
}
For a rotated grid (ANGROT != 0), grid rotation can only be encoded by wrapping a valid WKT2 PROJCRS supplied via CRS_WKT in a derived CRS (see MODFLOW-NetCDF-External-Tools). If CRS_WKT is omitted (only WKT supplied) or is not a recognized WKT2 PROJCRS, crs_wkt falls back to that text unmodified and MODFLOW 6 emits a warning -- and, for structured format, x/y no longer carry axis/standard_name, since asserting them would incorrectly claim the grid-local values are true projected positions. A rotated structured grid with no CRS configured also has x/y without axis/standard_name. Everything else is unaffected. This is what causes GDAL's "not a Longitude/X (Latitude/Y) dimension" warning noted in the External Tools page.
double y(y) ;
y:units = "m" ;
y:long_name = "Northing" ;
y:grid_mapping = "projection" ;
y:bounds = "y_bnds" ;
double y_bnds(y, bnd) ;
double x(x) ;
x:units = "m" ;
x:long_name = "Easting" ;
x:grid_mapping = "projection" ;
x:bounds = "x_bnds" ;
double x_bnds(x, bnd) ;
UGRID Layered Mesh format is unaffected by this -- it already stores true node/face coordinates directly, independent of rotation encoding.
The following is the header for a structured GWF input file from a different model (the Henry problem). The file contains GRIDDATA arrays (e.g., dis_botm, npf_k) dimensioned (layer, y, x) and PERIOD arrays (e.g., wel-1_q) dimensioned (time, layer, y, x). For input files, the time dimension equals NPER, the number of stress periods, and the time coordinate has stress period bounds (time_bnds). Each input variable carries a modflow_input attribute identifying the model, package, and parameter. Auxiliary variables additionally carry a modflow_iaux attribute -- note ghb-1 has two auxiliary variables, modflow_iaux = 1 for concentration and = 2 for density.
Note that even though this model has 20 layers, a single structured variable covers all layers. As the input file for the model below has 20 layers, a UGRID based representation of the same input data would split each layered data variable into 20 layer variables and would also include the mesh variables. The size of the files would be more comparable, however, as the amount of user input data would be the same.
netcdf gwf_henrynr01.structured {
dimensions:
bnd = 2 ;
time = 1001 ;
layer = 20 ;
y = 1 ;
x = 40 ;
variables:
double time(time) ;
time:calendar = "standard" ;
time:units = "days since 1970-01-01T00:00:00" ;
time:axis = "T" ;
time:standard_name = "time" ;
time:long_name = "time" ;
time:bounds = "time_bnds" ;
double time_bnds(time, bnd) ;
int layer(layer) ;
layer:units = "1" ;
layer:axis = "Z" ;
layer:positive = "down" ;
layer:long_name = "model layer" ;
double y(y) ;
y:units = "m" ;
y:axis = "Y" ;
y:standard_name = "projection_y_coordinate" ;
y:long_name = "Northing" ;
y:bounds = "y_bnds" ;
double y_bnds(y, bnd) ;
double x(x) ;
x:units = "m" ;
x:axis = "X" ;
x:standard_name = "projection_x_coordinate" ;
x:long_name = "Easting" ;
x:bounds = "x_bnds" ;
double x_bnds(x, bnd) ;
double z(layer, y, x) ;
z:units = "m" ;
z:standard_name = "altitude" ;
z:positive = "up" ;
z:long_name = "cell center elevation" ;
double wel-1_q(time, layer, y, x) ;
wel-1_q:_FillValue = 3.e+30 ;
wel-1_q:cell_methods = "time: mean" ;
wel-1_q:long_name = "wel-1 well rate" ;
wel-1_q:coordinates = "z" ;
wel-1_q:modflow_input = "gwf_henrynr01/wel-1/q" ;
double wel-1_concentration(time, layer, y, x) ;
wel-1_concentration:_FillValue = 3.e+30 ;
wel-1_concentration:cell_methods = "time: mean" ;
wel-1_concentration:long_name = "wel-1 well auxiliary variable iaux concentration" ;
wel-1_concentration:coordinates = "z" ;
wel-1_concentration:modflow_input = "gwf_henrynr01/wel-1/aux" ;
wel-1_concentration:modflow_iaux = 1 ;
double drn-1_elev(time, layer, y, x) ;
drn-1_elev:_FillValue = 3.e+30 ;
drn-1_elev:cell_methods = "time: mean" ;
drn-1_elev:long_name = "drn-1 drain elevation" ;
drn-1_elev:coordinates = "z" ;
drn-1_elev:modflow_input = "gwf_henrynr01/drn-1/elev" ;
double drn-1_cond(time, layer, y, x) ;
drn-1_cond:_FillValue = 3.e+30 ;
drn-1_cond:cell_methods = "time: mean" ;
drn-1_cond:long_name = "drn-1 drain conductance" ;
drn-1_cond:coordinates = "z" ;
drn-1_cond:modflow_input = "gwf_henrynr01/drn-1/cond" ;
double drn-1_concentration(time, layer, y, x) ;
drn-1_concentration:_FillValue = 3.e+30 ;
drn-1_concentration:cell_methods = "time: mean" ;
drn-1_concentration:long_name = "drn-1 drain auxiliary variable iaux concentration" ;
drn-1_concentration:coordinates = "z" ;
drn-1_concentration:modflow_input = "gwf_henrynr01/drn-1/aux" ;
drn-1_concentration:modflow_iaux = 1 ;
double ghb-1_bhead(time, layer, y, x) ;
ghb-1_bhead:_FillValue = 3.e+30 ;
ghb-1_bhead:cell_methods = "time: mean" ;
ghb-1_bhead:long_name = "ghb-1 boundary head" ;
ghb-1_bhead:coordinates = "z" ;
ghb-1_bhead:modflow_input = "gwf_henrynr01/ghb-1/bhead" ;
double ghb-1_cond(time, layer, y, x) ;
ghb-1_cond:_FillValue = 3.e+30 ;
ghb-1_cond:cell_methods = "time: mean" ;
ghb-1_cond:long_name = "ghb-1 boundary conductance" ;
ghb-1_cond:coordinates = "z" ;
ghb-1_cond:modflow_input = "gwf_henrynr01/ghb-1/cond" ;
double ghb-1_concentration(time, layer, y, x) ;
ghb-1_concentration:_FillValue = 3.e+30 ;
ghb-1_concentration:cell_methods = "time: mean" ;
ghb-1_concentration:long_name = "ghb-1 general-head boundary auxiliary variable iaux concentration" ;
ghb-1_concentration:coordinates = "z" ;
ghb-1_concentration:modflow_input = "gwf_henrynr01/ghb-1/aux" ;
ghb-1_concentration:modflow_iaux = 1 ;
double ghb-1_density(time, layer, y, x) ;
ghb-1_density:_FillValue = 3.e+30 ;
ghb-1_density:cell_methods = "time: mean" ;
ghb-1_density:long_name = "ghb-1 general-head boundary auxiliary variable iaux density" ;
ghb-1_density:coordinates = "z" ;
ghb-1_density:modflow_input = "gwf_henrynr01/ghb-1/aux" ;
ghb-1_density:modflow_iaux = 2 ;
double dis_delr(x) ;
dis_delr:_FillValue = 9.96920996838687e+36 ;
dis_delr:long_name = "spacing along a row" ;
dis_delr:modflow_input = "gwf_henrynr01/dis/delr" ;
double dis_delc(y) ;
dis_delc:_FillValue = 9.96920996838687e+36 ;
dis_delc:long_name = "spacing along a column" ;
dis_delc:modflow_input = "gwf_henrynr01/dis/delc" ;
double dis_top(y, x) ;
dis_top:_FillValue = 9.96920996838687e+36 ;
dis_top:long_name = "cell top elevation" ;
dis_top:modflow_input = "gwf_henrynr01/dis/top" ;
double dis_botm(layer, y, x) ;
dis_botm:_FillValue = 9.96920996838687e+36 ;
dis_botm:long_name = "cell bottom elevation" ;
dis_botm:coordinates = "z" ;
dis_botm:modflow_input = "gwf_henrynr01/dis/botm" ;
int dis_idomain(layer, y, x) ;
dis_idomain:_FillValue = -2147483647 ;
dis_idomain:long_name = "idomain existence array" ;
dis_idomain:coordinates = "z" ;
dis_idomain:modflow_input = "gwf_henrynr01/dis/idomain" ;
int npf_icelltype(layer, y, x) ;
npf_icelltype:_FillValue = -2147483647 ;
npf_icelltype:long_name = "confined or convertible indicator" ;
npf_icelltype:coordinates = "z" ;
npf_icelltype:modflow_input = "gwf_henrynr01/npf/icelltype" ;
double npf_k(layer, y, x) ;
npf_k:_FillValue = 9.96920996838687e+36 ;
npf_k:long_name = "hydraulic conductivity (L/T)" ;
npf_k:coordinates = "z" ;
npf_k:modflow_input = "gwf_henrynr01/npf/k" ;
int sto_iconvert(layer, y, x) ;
sto_iconvert:_FillValue = -2147483647 ;
sto_iconvert:long_name = "convertible indicator" ;
sto_iconvert:coordinates = "z" ;
sto_iconvert:modflow_input = "gwf_henrynr01/sto/iconvert" ;
double sto_ss(layer, y, x) ;
sto_ss:_FillValue = 9.96920996838687e+36 ;
sto_ss:long_name = "specific storage" ;
sto_ss:coordinates = "z" ;
sto_ss:modflow_input = "gwf_henrynr01/sto/ss" ;
double sto_sy(layer, y, x) ;
sto_sy:_FillValue = 9.96920996838687e+36 ;
sto_sy:long_name = "specific yield" ;
sto_sy:coordinates = "z" ;
sto_sy:modflow_input = "gwf_henrynr01/sto/sy" ;
double ic_strt(layer, y, x) ;
ic_strt:_FillValue = 9.96920996838687e+36 ;
ic_strt:long_name = "starting head" ;
ic_strt:coordinates = "z" ;
ic_strt:modflow_input = "gwf_henrynr01/ic/strt" ;
// global attributes:
:title = "GWF_HENRYNR01 hydraulic head array input" ;
:source = "MODFLOW 6 6.9.0.dev0+9e6f4dd6bf" ;
:modflow_grid = "structured" ;
:modflow_model = "gwf: gwf_henrynr01" ;
:history = "first created 2026/11/19 9:57:48.416" ;
:Conventions = "CF-1.13" ;
}
The following is the header for a UGRID Layered Mesh GWT output file with 1 layer. The dependent variable is split into one variable per layer (concentration_l1), each dimensioned (time, nmesh_face). Each layer variable carries mesh and location attributes that associate it with the UGRID mesh topology variable, a layer attribute, and a coordinates attribute referencing its per-layer z_lN elevation coordinate. The time dimension equals the total number of simulation steps.
netcdf gwt_dsp01a {
dimensions:
time = 200 ;
nmesh_node = 202 ;
nmesh_face = 100 ;
max_nmesh_face_nodes = 4 ;
x = 100 ;
y = 1 ;
layer = 1 ;
variables:
double time(time) ;
time:calendar = "standard" ;
time:units = "days since 2041-01-01T00:00:00-05:00" ;
time:axis = "T" ;
time:standard_name = "time" ;
time:long_name = "time" ;
int layer(layer) ;
layer:units = "1" ;
layer:axis = "Z" ;
layer:positive = "down" ;
layer:long_name = "model layer" ;
double z_l1(nmesh_face) ;
z_l1:units = "m" ;
z_l1:standard_name = "altitude" ;
z_l1:positive = "up" ;
z_l1:long_name = "cell center elevation (layer 1)" ;
z_l1:layer = 1 ;
int mesh ;
mesh:cf_role = "mesh_topology" ;
mesh:long_name = "2D mesh topology" ;
mesh:topology_dimension = 2 ;
mesh:face_dimension = "nmesh_face" ;
mesh:node_coordinates = "mesh_node_x mesh_node_y" ;
mesh:face_coordinates = "mesh_face_x mesh_face_y" ;
mesh:face_node_connectivity = "mesh_face_nodes" ;
double mesh_node_x(nmesh_node) ;
mesh_node_x:units = "m" ;
mesh_node_x:standard_name = "projection_x_coordinate" ;
mesh_node_x:long_name = "Easting" ;
double mesh_node_y(nmesh_node) ;
mesh_node_y:units = "m" ;
mesh_node_y:standard_name = "projection_y_coordinate" ;
mesh_node_y:long_name = "Northing" ;
double mesh_face_x(nmesh_face) ;
mesh_face_x:units = "m" ;
mesh_face_x:standard_name = "projection_x_coordinate" ;
mesh_face_x:long_name = "Easting" ;
mesh_face_x:bounds = "mesh_face_xbnds" ;
double mesh_face_xbnds(nmesh_face, max_nmesh_face_nodes) ;
double mesh_face_y(nmesh_face) ;
mesh_face_y:units = "m" ;
mesh_face_y:standard_name = "projection_y_coordinate" ;
mesh_face_y:long_name = "Northing" ;
mesh_face_y:bounds = "mesh_face_ybnds" ;
double mesh_face_ybnds(nmesh_face, max_nmesh_face_nodes) ;
int mesh_face_nodes(nmesh_face, max_nmesh_face_nodes) ;
mesh_face_nodes:cf_role = "face_node_connectivity" ;
mesh_face_nodes:long_name = "Vertices bounding cell (counterclockwise)" ;
mesh_face_nodes:_FillValue = -2147483647 ;
mesh_face_nodes:start_index = 1 ;
double concentration_l1(time, nmesh_face) ;
concentration_l1:long_name = "concentration (layer 1)" ;
concentration_l1:_FillValue = 1.e+30 ;
concentration_l1:cell_methods = "time: point" ;
concentration_l1:mesh = "mesh" ;
concentration_l1:location = "face" ;
concentration_l1:coordinates = "mesh_face_x mesh_face_y z_l1" ;
concentration_l1:layer = 1 ;
// global attributes:
:title = "GWT_DSP01A concentration" ;
:source = "MODFLOW 6 6.9.0.dev0+9e6f4dd6bf" ;
:modflow_grid = "structured" ;
:modflow_mesh = "layered" ;
:modflow_model = "gwt: gwt_dsp01a" ;
:history = "first created 2026/11/19 9:55:50.438" ;
:Conventions = "CF-1.13 UGRID-1.0" ;
}
The following is the header for the corresponding UGRID Layered Mesh GWT input file with 1 layer. This file contains only GRIDDATA arrays, so no time dimension is present. Each per-layer variable carries a layer attribute set to the layer number and a modflow_input attribute identifying the model, package, and parameter. For models with multiple layers, each layer-dependent parameter appears as a separate variable (e.g., dis_botm_l1, dis_botm_l2, ...).
netcdf gwt_dsp01a.ugrid {
dimensions:
nmesh_node = 202 ;
nmesh_face = 100 ;
max_nmesh_face_nodes = 4 ;
x = 100 ;
y = 1 ;
layer = 1 ;
variables:
int layer(layer) ;
layer:units = "1" ;
layer:axis = "Z" ;
layer:positive = "down" ;
layer:long_name = "model layer" ;
double z_l1(nmesh_face) ;
z_l1:units = "m" ;
z_l1:standard_name = "altitude" ;
z_l1:positive = "up" ;
z_l1:long_name = "cell center elevation (layer 1)" ;
z_l1:layer = 1 ;
int mesh ;
mesh:cf_role = "mesh_topology" ;
mesh:long_name = "2D mesh topology" ;
mesh:topology_dimension = 2 ;
mesh:face_dimension = "nmesh_face" ;
mesh:node_coordinates = "mesh_node_x mesh_node_y" ;
mesh:face_coordinates = "mesh_face_x mesh_face_y" ;
mesh:face_node_connectivity = "mesh_face_nodes" ;
double mesh_node_x(nmesh_node) ;
mesh_node_x:units = "m" ;
mesh_node_x:standard_name = "projection_x_coordinate" ;
mesh_node_x:long_name = "Easting" ;
double mesh_node_y(nmesh_node) ;
mesh_node_y:units = "m" ;
mesh_node_y:standard_name = "projection_y_coordinate" ;
mesh_node_y:long_name = "Northing" ;
double mesh_face_x(nmesh_face) ;
mesh_face_x:units = "m" ;
mesh_face_x:standard_name = "projection_x_coordinate" ;
mesh_face_x:long_name = "Easting" ;
mesh_face_x:bounds = "mesh_face_xbnds" ;
double mesh_face_xbnds(nmesh_face, max_nmesh_face_nodes) ;
double mesh_face_y(nmesh_face) ;
mesh_face_y:units = "m" ;
mesh_face_y:standard_name = "projection_y_coordinate" ;
mesh_face_y:long_name = "Northing" ;
mesh_face_y:bounds = "mesh_face_ybnds" ;
double mesh_face_ybnds(nmesh_face, max_nmesh_face_nodes) ;
int mesh_face_nodes(nmesh_face, max_nmesh_face_nodes) ;
mesh_face_nodes:cf_role = "face_node_connectivity" ;
mesh_face_nodes:long_name = "Vertices bounding cell (counterclockwise)" ;
mesh_face_nodes:_FillValue = -2147483647 ;
mesh_face_nodes:start_index = 1 ;
double dis_delr(x) ;
dis_delr:_FillValue = 9.96920996838687e+36 ;
dis_delr:long_name = "spacing along a row" ;
dis_delr:modflow_input = "gwt_dsp01a/dis/delr" ;
double dis_delc(y) ;
dis_delc:_FillValue = 9.96920996838687e+36 ;
dis_delc:long_name = "spacing along a column" ;
dis_delc:modflow_input = "gwt_dsp01a/dis/delc" ;
double dis_top(nmesh_face) ;
dis_top:_FillValue = 9.96920996838687e+36 ;
dis_top:long_name = "cell top elevation" ;
dis_top:mesh = "mesh" ;
dis_top:location = "face" ;
dis_top:coordinates = "mesh_face_x mesh_face_y" ;
dis_top:modflow_input = "gwt_dsp01a/dis/top" ;
double dis_botm_l1(nmesh_face) ;
dis_botm_l1:_FillValue = 9.96920996838687e+36 ;
dis_botm_l1:long_name = "cell bottom elevation layer 1" ;
dis_botm_l1:mesh = "mesh" ;
dis_botm_l1:location = "face" ;
dis_botm_l1:coordinates = "mesh_face_x mesh_face_y z_l1" ;
dis_botm_l1:modflow_input = "gwt_dsp01a/dis/botm" ;
dis_botm_l1:layer = 1 ;
int dis_idomain_l1(nmesh_face) ;
dis_idomain_l1:_FillValue = -2147483647 ;
dis_idomain_l1:long_name = "idomain existence array layer 1" ;
dis_idomain_l1:mesh = "mesh" ;
dis_idomain_l1:location = "face" ;
dis_idomain_l1:coordinates = "mesh_face_x mesh_face_y z_l1" ;
dis_idomain_l1:modflow_input = "gwt_dsp01a/dis/idomain" ;
dis_idomain_l1:layer = 1 ;
double ic_strt_l1(nmesh_face) ;
ic_strt_l1:_FillValue = 9.96920996838687e+36 ;
ic_strt_l1:long_name = "starting concentration layer 1" ;
ic_strt_l1:mesh = "mesh" ;
ic_strt_l1:location = "face" ;
ic_strt_l1:coordinates = "mesh_face_x mesh_face_y z_l1" ;
ic_strt_l1:modflow_input = "gwt_dsp01a/ic/strt" ;
ic_strt_l1:layer = 1 ;
double dsp_diffc_l1(nmesh_face) ;
dsp_diffc_l1:_FillValue = 9.96920996838687e+36 ;
dsp_diffc_l1:long_name = "effective molecular diffusion coefficient layer 1" ;
dsp_diffc_l1:mesh = "mesh" ;
dsp_diffc_l1:location = "face" ;
dsp_diffc_l1:coordinates = "mesh_face_x mesh_face_y z_l1" ;
dsp_diffc_l1:modflow_input = "gwt_dsp01a/dsp/diffc" ;
dsp_diffc_l1:layer = 1 ;
double dsp_alh_l1(nmesh_face) ;
dsp_alh_l1:_FillValue = 9.96920996838687e+36 ;
dsp_alh_l1:long_name = "longitudinal dispersivity in horizontal direction layer 1" ;
dsp_alh_l1:mesh = "mesh" ;
dsp_alh_l1:location = "face" ;
dsp_alh_l1:coordinates = "mesh_face_x mesh_face_y z_l1" ;
dsp_alh_l1:modflow_input = "gwt_dsp01a/dsp/alh" ;
dsp_alh_l1:layer = 1 ;
double dsp_alv_l1(nmesh_face) ;
dsp_alv_l1:_FillValue = 9.96920996838687e+36 ;
dsp_alv_l1:long_name = "longitudinal dispersivity in vertical direction layer 1" ;
dsp_alv_l1:mesh = "mesh" ;
dsp_alv_l1:location = "face" ;
dsp_alv_l1:coordinates = "mesh_face_x mesh_face_y z_l1" ;
dsp_alv_l1:modflow_input = "gwt_dsp01a/dsp/alv" ;
dsp_alv_l1:layer = 1 ;
double dsp_ath1_l1(nmesh_face) ;
dsp_ath1_l1:_FillValue = 9.96920996838687e+36 ;
dsp_ath1_l1:long_name = "transverse dispersivity in horizontal direction layer 1" ;
dsp_ath1_l1:mesh = "mesh" ;
dsp_ath1_l1:location = "face" ;
dsp_ath1_l1:coordinates = "mesh_face_x mesh_face_y z_l1" ;
dsp_ath1_l1:modflow_input = "gwt_dsp01a/dsp/ath1" ;
dsp_ath1_l1:layer = 1 ;
double dsp_atv_l1(nmesh_face) ;
dsp_atv_l1:_FillValue = 9.96920996838687e+36 ;
dsp_atv_l1:long_name = "transverse dispersivity when flow is in vertical direction layer 1" ;
dsp_atv_l1:mesh = "mesh" ;
dsp_atv_l1:location = "face" ;
dsp_atv_l1:coordinates = "mesh_face_x mesh_face_y z_l1" ;
dsp_atv_l1:modflow_input = "gwt_dsp01a/dsp/atv" ;
dsp_atv_l1:layer = 1 ;
// global attributes:
:title = "GWT_DSP01A concentration array input" ;
:source = "MODFLOW 6 6.9.0.dev0+9e6f4dd6bf" ;
:modflow_grid = "structured" ;
:modflow_mesh = "layered" ;
:modflow_model = "gwt: gwt_dsp01a" ;
:history = "first created 2026/11/19 9:55:50.295" ;
:Conventions = "CF-1.13 UGRID-1.0" ;
}