Repository navigation
|
I am interested in using the netCDF format for input and output files. While the IO documentation mentions NetCDF (not sure about the capitalized "N", https://www.unidata.ucar.edu/software/netcdf goes with a lower case "n") at several places, I couldn't find examples how netCDF files look like. Is there a formal specification for the format? The flopy tutorial has examples how to export to netCDF. I can just export a model and look at the file. Is this the way to go? Do these exported files show all options that may be useful? Can I use these exported files as input files, i.e. doing a roundtrip? As far as I know, only extended MODFLOW supports netCDF. This version also includes the MPI support. There is a binary for Windows, but not for macOS. So, I would need to compile it myself. I suppose MPI will add quite a bit of complexity. Is there a way to compile only with netCDF but without MPI support? Along these lines, are there any plans to make netCDF support part of the standard release? Does anybody use netCDF for input and/or output? Please share your experience and give your opinions. |
Replies: 1 comment 5 replies
|
Both "netCDF" (Unidata's preferred style) and "NetCDF" are used interchangeably in practice. The MODFLOW 6 codebase and documentation use "NetCDF". Either is understood. There is a development format description in the MODFLOW 6 wiki: The FloPy tutorial's NetCDF export is a different, legacy feature — FloPy's A full roundtrip is not possible in the simple sense, because output and input files serve different purposes and have different structures. Output files contain only the model dependent variable (e.g., The intended workflow is: use FloPy 4 to create NetCDF input files, run the simulation with extended MODFLOW 6, then read the NetCDF output for post-processing or visualization. FloPy 4 handles creation of correctly-formatted input files; examples covering structured and UGRID grids for DIS and DISV discretizations are in the FloPy 4 repository ( You are correct that NetCDF support currently requires the extended MODFLOW 6 build. For macOS you would need to compile from source with the NetCDF-4/HDF5 libraries available (e.g., via Homebrew or conda). There are no current plans for NetCDF support in a standard release as far as I know. |
Both "netCDF" (Unidata's preferred style) and "NetCDF" are used interchangeably in practice. The MODFLOW 6 codebase and documentation use "NetCDF". Either is understood.
There is a development format description in the MODFLOW 6 wiki:
MODFLOW-NetCDF-Format. It describes the two supported formats (structured and UGRID Layered Mesh), the time dimension conventions, and the variable attributes that MODFLOW 6 uses to route input data to the right packages. Concretencdump -hheader examples for both input and output files are included.The FloPy tutorial's NetCDF export is a different, legacy feature — FloPy's
export_netcdf()produces files that do not carry the MODFLOW 6-specific attributes (m…