Skip to content

Commit

Permalink
* fix(csub): Fix CSUB binary budget data saved as IMETH=6 datatype
Browse files Browse the repository at this point in the history
closes #290
  • Loading branch information
jdhughes-usgs authored Jan 29, 2020
1 parent 5f6e70c commit eaa131e
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 15 deletions.
29 changes: 28 additions & 1 deletion doc/mf6io/gwf/binaryoutput.tex
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ \subsubsection{Variations for Discretization Types}

\subsubsection{Budget File Contents}

The type of information that is written to the budget file for a GWF Model depends on the packages used for the model and whether or not the save flags are set. Table \ref{table:gwfbud} contains a list of the types of information that may be contained in a GWF Model budget file. In all cases, the flows in table \ref{table:gwfbud} are flows to or a from a GWF Model cell. As described in the next section, intercell flows are written as FLOW-JA-FACE using IMETH=1. If the model has an active Storage Package, then STORAGE-SS and STORAGE-SY are written to the budget file using IMETH=1.
The type of information that is written to the budget file for a GWF Model depends on the packages used for the model and whether or not the save flags are set. Table \ref{table:gwfbud} contains a list of the types of information that may be contained in a GWF Model budget file. In all cases, the flows in table \ref{table:gwfbud} are flows to or a from a GWF Model cell. As described in the next section, intercell flows are written as FLOW-JA-FACE using IMETH=1. If the model has an active Storage Package, then STORAGE-SS and STORAGE-SY are written to the budget file using IMETH=1. If the model has an active Skeletal Storage, Compaction, and Subsidence Package, then CSUB-CGELASTIC and CSUB-WATERCOMP are written to the budget file using IMETH=1.

The remaining flow terms in table \ref{table:gwfbud} are all written using IMETH=6. When IMETH=6 is used, the records contain additional text descriptors and two identifying numbers. For all records in the GWF Model budget file, TXT1ID1 is the name of the GWF Model and TXT2ID1 is also the name of the GWF Model. These text identifiers describe what is contained in ID1. For the GWF Model budget file, ID1 is the cell or node number in the GWF Model grid. The second set of text identifiers refer to the information in ID2. Unless noted otherwise in the description in table \ref{table:gwfbud}, TXT1ID2 is the name of the GWF Model, TXT2ID2 is the name of the package, and ID2 is the bound number in the package; for example, this is the first constant head cell, second constant head cell, and so forth.

Expand All @@ -374,6 +374,10 @@ \subsubsection{Budget File Contents}
\texttt{FLOW-JA-FACE} & 1 & intercell flow; array of size(NJA) \\
\texttt{STO-SS} & 1 & confined storage; array of size (NCELLS) \\
\texttt{STO-SY} & 1 & unconfined storage; array of size (NCELLS) \\
\texttt{CSUB-CGELASTIC} & 1 & coarse-grained elastic storage from CSUB Package; array of size (NCELLS) \\
\texttt{CSUB-WATERCOMP} & 1 & water compressibility from CSUB Package; array of size (NCELLS) \\
\texttt{CSUB-ELASTIC} & 6 & interbed elastic storage from CSUB package; list of size(NINTERBEDS) \\
\texttt{CSUB-INELASTIC} & 6 & interbed inelastic storage from CSUB package; list of size(NINTERBEDS) \\
\texttt{CHD} & 6 & constant head flow\\
\texttt{WEL} & 6 & well flow \\
\texttt{WEL-TO-MVR} & 6 & well flow that is routed to Mover Package \\
Expand Down Expand Up @@ -420,6 +424,29 @@ \subsubsection{Intercell Flows}
\end{verbatim}

\newpage
\subsubsection{CSUB Package}

\vspace{5mm}
For each stress period, time step, and compaction data type that is saved to the CSUB Package binary output files as \texttt{IMETH=1} budget file type. The compaction data that are written to the CSUB Package binary files are summarized in Tables~\ref{table:binarycsub}.

\begin{longtable}{p{3.5cm} p{2cm} p{9cm}}
\caption{Data written to the CSUB Package compaction binary output files}
\tabularnewline
\hline
\textbf{Flow Type (TEXT)} & \textbf{Method Code (IMETH)} & \textbf{Description} \\
\hline
\endhead
\hline
\endfoot
\texttt{CSUB-COMPACTION} & 1 & total compaction for cell; array of size (NCELLS) \\
\texttt{CSUB-INELASTIC} & 1 & inelastic compaction for cell; array of size (NCELLS) \\
\texttt{CSUB-ELASTIC} & 1 & elastic compaction for cell; array of size (NCELLS) \\
\texttt{CSUB-INTERBED} & 1 & interbed compaction for cell; array of size (NCELLS) \\
\texttt{CSUB-COARSE} & 1 & coarse-grained compaction for cell; array of size (NCELLS) \\
\texttt{CSUB-ZDISPLACE} & 1 & z-displacement for cell; z-displacement of the upper most model cells represents subsidance at land-surface; array of size (NCELLS) \\
\label{table:binarycsub}
\end{longtable}

\subsubsection{LAK, MAW, SFR, and UZF Packages}

\vspace{5mm}
Expand Down
2 changes: 1 addition & 1 deletion doc/mf6io/mf6ivar/dfn/gwf-disu.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ name idomain
type integer
shape (nodes)
reader readarray
layered true
layered false
optional true
longname idomain existence array
description is an optional array that characterizes the existence status of a cell. If the IDOMAIN array is not specified, then all model cells exist within the solution. If the IDOMAIN value for a cell is 0, the cell does not exist in the simulation. Input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. If the IDOMAIN value for a cell is 1, the cell exists in the simulation. IDOMAIN values of -1 cannot be specified for the DISU Package.
Expand Down
4 changes: 2 additions & 2 deletions doc/mf6io/mf6ivar/md/mf6ivar.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,13 +578,13 @@
| GWF | LAK | OUTLETS | SLOPE | DOUBLE PRECISION | real value that defines the bed slope for the lake outlet. Any value can be specified if COUTTYPE is not MANNING. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. |
| GWF | LAK | PERIOD | IPER | INTEGER | integer value specifying the starting stress period number for which the data specified in the PERIOD block apply. IPER must be less than or equal to NPER in the TDIS Package and greater than zero. The IPER value assigned to a stress period block must be greater than the IPER value assigned for the previous PERIOD block. The information specified in the PERIOD block will continue to apply for all subsequent stress periods, unless the program encounters another PERIOD block. |
| GWF | LAK | PERIOD | LAKENO | INTEGER | integer value that defines the lake number associated with the specified PERIOD data on the line. LAKENO must be greater than zero and less than or equal to NLAKES. |
| GWF | LAK | PERIOD | LAKSETTING | KEYSTRING | line of information that is parsed into a keyword and values. Keyword values that can be used to start the LAKSETTING string include: STATUS, STAGE, RAINFALL, EVAPORATION, RUNOFFON, WITHDRAWAL, and AUXILIARY. |
| GWF | LAK | PERIOD | LAKSETTING | KEYSTRING | line of information that is parsed into a keyword and values. Keyword values that can be used to start the LAKSETTING string include: STATUS, STAGE, RAINFALL, EVAPORATION, RUNOFF, INFLOW, WITHDRAWAL, and AUXILIARY. |
| GWF | LAK | PERIOD | STATUS | STRING | keyword option to define lake status. STATUS can be ACTIVE, INACTIVE, or CONSTANT. By default, STATUS is ACTIVE. |
| GWF | LAK | PERIOD | STAGE | STRING | real or character value that defines the stage for the lake. The specified STAGE is only applied if the lake is a constant stage lake. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. |
| GWF | LAK | PERIOD | RAINFALL | STRING | real or character value that defines the rainfall rate $(LT^{-1})$ for the lake. Value must be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. |
| GWF | LAK | PERIOD | EVAPORATION | STRING | real or character value that defines the maximum evaporation rate $(LT^{-1})$ for the lake. Value must be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. |
| GWF | LAK | PERIOD | RUNOFF | STRING | real or character value that defines the runoff rate $(L^3 T^{-1})$ for the lake. Value must be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. |
| GWF | LAK | PERIOD | INFLOW | STRING | real or character value that defines the volumetric inflow rate $(L^3 T^{-1})$ for the lake. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. By default, inflow rates are zero for each lake. |
| GWF | LAK | PERIOD | INFLOW | STRING | real or character value that defines the volumetric inflow rate $(L^3 T^{-1})$ for the lake. Value must be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. By default, inflow rates are zero for each lake. |
| GWF | LAK | PERIOD | WITHDRAWAL | STRING | real or character value that defines the maximum withdrawal rate $(L^3 T^{-1})$ for the lake. Value must be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. |
| GWF | LAK | PERIOD | AUXILIARY | KEYWORD | keyword for specifying auxiliary variable. |
| GWF | LAK | PERIOD | AUXNAME | STRING | name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored. |
Expand Down
2 changes: 1 addition & 1 deletion doc/mf6io/mf6ivar/tex/gwf-disu-griddata.dat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ BEGIN GRIDDATA
<bot(nodes)> -- READARRAY
AREA
<area(nodes)> -- READARRAY
[IDOMAIN [LAYERED]
[IDOMAIN
<idomain(nodes)> -- READARRAY]
END GRIDDATA
4 changes: 2 additions & 2 deletions doc/mf6io/mf6ivar/tex/gwf-lak-desc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@

\item \texttt{lakeno}---integer value that defines the lake number associated with the specified PERIOD data on the line. LAKENO must be greater than zero and less than or equal to NLAKES.

\item \texttt{laksetting}---line of information that is parsed into a keyword and values. Keyword values that can be used to start the LAKSETTING string include: STATUS, STAGE, RAINFALL, EVAPORATION, RUNOFFON, WITHDRAWAL, and AUXILIARY.
\item \texttt{laksetting}---line of information that is parsed into a keyword and values. Keyword values that can be used to start the LAKSETTING string include: STATUS, STAGE, RAINFALL, EVAPORATION, RUNOFF, INFLOW, WITHDRAWAL, and AUXILIARY.

\begin{lstlisting}[style=blockdefinition]
STATUS <status>
Expand All @@ -152,7 +152,7 @@

\item \textcolor{blue}{\texttt{runoff}---real or character value that defines the runoff rate $(L^3 T^{-1})$ for the lake. Value must be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.}

\item \textcolor{blue}{\texttt{inflow}---real or character value that defines the volumetric inflow rate $(L^3 T^{-1})$ for the lake. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. By default, inflow rates are zero for each lake.}
\item \textcolor{blue}{\texttt{inflow}---real or character value that defines the volumetric inflow rate $(L^3 T^{-1})$ for the lake. Value must be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. By default, inflow rates are zero for each lake.}

\item \textcolor{blue}{\texttt{withdrawal}---real or character value that defines the maximum withdrawal rate $(L^3 T^{-1})$ for the lake. Value must be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the ``Time-Variable Input'' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.}

Expand Down
14 changes: 6 additions & 8 deletions src/Model/GroundWaterFlow/gwf3csub8.f90
Original file line number Diff line number Diff line change
Expand Up @@ -929,21 +929,19 @@ subroutine csub_bdsav(this, idvfl, icbcfl, icbcun)
if (this%ninterbeds > 0) then
naux = 0
! -- interbed elastic storage
call ubdsv06(kstp, kper, budtxt(2), this%name_model, this%name, &
this%name_model, this%name, &
ibinun, naux, this%auxname, this%ninterbeds, 1, 1, &
this%ninterbeds, this%iout, delt, pertim, totim)
call this%dis%record_srcdst_list_header(budtxt(2), this%name_model, &
this%name_model, this%name_model, this%name, naux, &
this%auxname, ibinun, this%ninterbeds, this%iout)
do ib = 1, this%ninterbeds
q = this%storagee(ib)
node = this%nodelist(ib)
call this%dis%record_mf6_list_entry(ibinun, node, node, q, naux, &
this%auxvar(:,ib))
end do
! -- interbed inelastic storage
call ubdsv06(kstp, kper, budtxt(3), this%name_model, this%name, &
this%name_model, this%name, &
ibinun, naux, this%auxname, this%ninterbeds, 1, 1, &
this%ninterbeds, this%iout, delt, pertim, totim)
call this%dis%record_srcdst_list_header(budtxt(3), this%name_model, &
this%name_model, this%name_model, this%name, naux, &
this%auxname, ibinun, this%ninterbeds, this%iout)
do ib = 1, this%ninterbeds
q = this%storagei(ib)
node = this%nodelist(ib)
Expand Down

0 comments on commit eaa131e

Please sign in to comment.