Skip to content

Commit

Permalink
feat(input): add package export option for layered input parameters (#…
Browse files Browse the repository at this point in the history
…1557)

* add echo file option for layered input params

* some naming adjustments

* use per package export option to control writing variable layer array files

* restore mf6ivar.py

* silently create export files

* post rebase definition update

* add release note for export files

---------

Co-authored-by: mjreno <[email protected]>
Co-authored-by: mjreno <[email protected]>
  • Loading branch information
3 people authored Apr 3, 2024
1 parent 147cd61 commit 02052a9
Show file tree
Hide file tree
Showing 40 changed files with 832 additions and 16 deletions.
2 changes: 1 addition & 1 deletion doc/ReleaseNotes/develop.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
\underline{NEW FUNCTIONALITY}
\begin{itemize}
\item A new Groundwater Energy (GWE) transport model is introduced to the code base for simulating heat transport in the subsurface. Additional information for activating the GWE model type within a MODFLOW 6 simulation is available within the mf6io.pdf document. New example problems have been developed for testing and demonstrating GWE capabilities (in addition to other internal tests that help verify the accuracy of GWE); however, additional changes to the code and input may be necessary in response to user needs and further testing.
% \item xxx
\item A new capability has been introduced to create parameter layer export files of user input data for packages including DIS, DISV, IC, NPF, DSP(GWT), MIP(PRT), and CND(GWE). The number of supported packages is expected to increase in the future. The capability can be turned on with the package EXPORT\_ARRAY\_ASCII option. The package parameter export set is pre-defined and currently focuses on griddata. The number of parameters per package may also increase in the future.
% \item xxx
\end{itemize}

Expand Down
9 changes: 9 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwe-cnd.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ optional true
longname xt3d on right-hand side
description add xt3d terms to right-hand side, when possible. This option uses less memory, but may require more iterations.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwe cnd griddata ---------------------

block griddata
Expand Down
8 changes: 8 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwe-dis.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ optional true
longname rotation angle
description counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwe dis dimensions ---------------------

Expand Down
9 changes: 9 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwe-disv.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ optional true
longname rotation angle
description counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwe disv dimensions ---------------------

block dimensions
Expand Down
11 changes: 11 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwe-ic.dfn
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# --------------------- gwe ic options ---------------------

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwe ic griddata ---------------------

block griddata
Expand Down
8 changes: 8 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwf-dis.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ optional true
longname rotation angle
description counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwf dis dimensions ---------------------

Expand Down
9 changes: 9 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwf-disv.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ optional true
longname rotation angle
description counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwf disv dimensions ---------------------

block dimensions
Expand Down
11 changes: 11 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwf-ic.dfn
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# --------------------- gwf ic options ---------------------

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwf ic griddata ---------------------

block griddata
Expand Down
9 changes: 9 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwf-npf.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,15 @@ tagged false
longname file name of TVK information
description defines a time-varying hydraulic conductivity (TVK) input file. Records in the TVK file can be used to change hydraulic conductivity properties at specified times or stress periods.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# dev options

block options
Expand Down
8 changes: 8 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwt-dis.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ optional true
longname rotation angle
description counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwt dis dimensions ---------------------

Expand Down
9 changes: 9 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwt-disv.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ optional true
longname rotation angle
description counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwt disv dimensions ---------------------

block dimensions
Expand Down
9 changes: 9 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwt-dsp.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ optional true
longname xt3d on right-hand side
description add xt3d terms to right-hand side, when possible. This option uses less memory, but may require more iterations.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwt dsp griddata ---------------------

block griddata
Expand Down
11 changes: 11 additions & 0 deletions doc/mf6io/mf6ivar/dfn/gwt-ic.dfn
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# --------------------- gwt ic options ---------------------

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwt ic griddata ---------------------

block griddata
Expand Down
8 changes: 8 additions & 0 deletions doc/mf6io/mf6ivar/dfn/prt-dis.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ optional true
longname rotation angle
description counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- prt dis dimensions ---------------------

Expand Down
9 changes: 9 additions & 0 deletions doc/mf6io/mf6ivar/dfn/prt-disv.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ optional true
longname rotation angle
description counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- prt disv dimensions ---------------------

block dimensions
Expand Down
9 changes: 9 additions & 0 deletions doc/mf6io/mf6ivar/dfn/prt-mip.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ optional true
longname zero method
description the root finding algorithm to solve ternary subcells. 0 euler, 1 brent, 2 chandrupatla, 3 test.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- prt mip griddata ---------------------

block griddata
Expand Down
8 changes: 8 additions & 0 deletions doc/mf6io/mf6ivar/dfn/swf-dis2d.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ optional true
longname rotation angle
description counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- swf dis2d dimensions ---------------------

Expand Down
9 changes: 9 additions & 0 deletions doc/mf6io/mf6ivar/dfn/swf-disv.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ optional true
longname rotation angle
description counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. If not specified, then a default value of 0.0 is assigned. The value for ANGROT does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- gwt disv dimensions ---------------------

block dimensions
Expand Down
13 changes: 12 additions & 1 deletion doc/mf6io/mf6ivar/dfn/swf-ic.dfn
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# --------------------- gwt ic griddata ---------------------
# --------------------- swf ic options ---------------------

block options
name export_array_ascii
type keyword
reader urword
optional true
mf6internal export_ascii
longname export array variables to layered ascii files.
description keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.

# --------------------- swf ic griddata ---------------------

block griddata
name strt
Expand Down
19 changes: 19 additions & 0 deletions src/Idm/gwe-cndidm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module GweCndInputModule
type GweCndParamFoundType
logical :: xt3d_off = .false.
logical :: xt3d_rhs = .false.
logical :: export_ascii = .false.
logical :: alh = .false.
logical :: alv = .false.
logical :: ath1 = .false.
Expand Down Expand Up @@ -58,6 +59,23 @@ module GweCndInputModule
.false. & ! timeseries
)

type(InputParamDefinitionType), parameter :: &
gwecnd_export_ascii = InputParamDefinitionType &
( &
'GWE', & ! component
'CND', & ! subcomponent
'OPTIONS', & ! block
'EXPORT_ARRAY_ASCII', & ! tag name
'EXPORT_ASCII', & ! fortran variable
'KEYWORD', & ! type
'', & ! shape
.false., & ! required
.false., & ! multi-record
.false., & ! preserve case
.false., & ! layered
.false. & ! timeseries
)

type(InputParamDefinitionType), parameter :: &
gwecnd_alh = InputParamDefinitionType &
( &
Expand Down Expand Up @@ -182,6 +200,7 @@ module GweCndInputModule
[ &
gwecnd_xt3d_off, &
gwecnd_xt3d_rhs, &
gwecnd_export_ascii, &
gwecnd_alh, &
gwecnd_alv, &
gwecnd_ath1, &
Expand Down
19 changes: 19 additions & 0 deletions src/Idm/gwe-disidm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module GweDisInputModule
logical :: xorigin = .false.
logical :: yorigin = .false.
logical :: angrot = .false.
logical :: export_ascii = .false.
logical :: nlay = .false.
logical :: nrow = .false.
logical :: ncol = .false.
Expand Down Expand Up @@ -113,6 +114,23 @@ module GweDisInputModule
.false. & ! timeseries
)

type(InputParamDefinitionType), parameter :: &
gwedis_export_ascii = InputParamDefinitionType &
( &
'GWE', & ! component
'DIS', & ! subcomponent
'OPTIONS', & ! block
'EXPORT_ARRAY_ASCII', & ! tag name
'EXPORT_ASCII', & ! fortran variable
'KEYWORD', & ! type
'', & ! shape
.false., & ! required
.false., & ! multi-record
.false., & ! preserve case
.false., & ! layered
.false. & ! timeseries
)

type(InputParamDefinitionType), parameter :: &
gwedis_nlay = InputParamDefinitionType &
( &
Expand Down Expand Up @@ -257,6 +275,7 @@ module GweDisInputModule
gwedis_xorigin, &
gwedis_yorigin, &
gwedis_angrot, &
gwedis_export_ascii, &
gwedis_nlay, &
gwedis_nrow, &
gwedis_ncol, &
Expand Down
Loading

0 comments on commit 02052a9

Please sign in to comment.