![]() |
MODFLOW 6
version 6.9.0.dev0
USGS Modular Hydrologic Model
|
This module contains the StructArrayModule. More...
Data Types | |
| type | structarraytype |
| type for structured array More... | |
Functions/Subroutines | |
| type(structarraytype) function, pointer, public | constructstructarray (mf6_input, ncol, nrow, blocknum, mempath, component_mempath, size_init) |
| constructor for a struct_array More... | |
| subroutine, public | destructstructarray (struct_array) |
| destructor for a struct_array More... | |
| subroutine | mem_create_vector (this, icol, idt, charlen, varname) |
| create new vector in StructArrayType More... | |
| subroutine | mem_create_metadata_vector (this, icol, idt, body_start, head_nbody) |
| Create a metadata-only StructVector for a KEYWORD indicator column. More... | |
| character(len=lenvarname) function, public | idm_input_varname (idt) |
| Derive a TS-capable setting's raw input array name, distinct from its persistent array (allocated under mf6varname itself). More... | |
| integer(i4b) function | count (this) |
| subroutine | set_pointer (sv, sv_target) |
| type(structvectortype) function, pointer | get (this, idx) |
| subroutine | allocate_int_type (this, sv) |
| allocate integer input type More... | |
| subroutine | allocate_dbl_type (this, sv) |
| allocate double input type More... | |
| subroutine | allocate_charstr_type (this, sv) |
| allocate charstr input type More... | |
| subroutine | allocate_int1d_type (this, sv) |
| allocate int1d input type More... | |
| subroutine | allocate_dbl1d_type (this, sv) |
| allocate dbl1d input type More... | |
| subroutine | load_deferred_vector (this, icol) |
| subroutine | memload_vectors (this) |
| load deferred vectors into managed memory More... | |
| subroutine | log_structarray_vars (this, iout) |
| log information about the StructArrayType More... | |
| subroutine | check_reallocate (this) |
| reallocate local memory for deferred vectors if necessary More... | |
| subroutine | read_param (this, parser, sv_col, irow, timeseries, iout) |
| logical(lgp) function, public | is_auxval (idt) |
| True if idt is AUXVAL: its AUX index is resolved dynamically from a sibling AUXNAME, not feature-indexed by its own mf6varname. More... | |
| integer(i4b) function, public | find_auxname_index (auxname, auxnames, naux) |
| Find the AUX array position matching auxname, 0 if none. More... | |
| integer(i4b) function | read_from_parser (this, parser, timeseries, iout, input_name) |
| read from the block parser to fill the StructArrayType More... | |
| integer(i4b) function | read_from_parser_keystring (this, parser, timeseries, nleading, iout, input_name) |
| read keystring period block into the StructArrayType More... | |
| integer(i4b) function | read_from_binary (this, inunit, iout) |
| read from binary input to fill the StructArrayType More... | |
| subroutine | ts_update (this, tsmanager, subcomp_name, iprpak, input_name, auxname_cst, clear_strlocs, ifno_map) |
| link time-series strings in this struct array to a tsmanager More... | |
| subroutine | ts_update_dedup (this, icol, tsmanager, subcomp_name, iprpak, nrows, addr_map, category, names, featarr2d, raw2d) |
| Shared dedup-aware TS resolution for one PERIOD-block column: TS-linked rows resolve via their preserved token, remaining literal rows via remove_existing_link, then clear(). naux=1 (via both rank remaps in ts_update_indexed) covers the single-column BND case. More... | |
| subroutine | ts_update_adv (this, icol, tsmanager, subcomp_name, iprpak, nrows, ifno_map, auxname_cst, featarr2d) |
| Dedup-aware counterpart to ts_update for one MTYPE_DBL2D (AUX) PERIOD-block column. More... | |
| subroutine | ts_update_indexed (this, icol, tsmanager, subcomp_name, iprpak, nrows, row_addr, varname, featarr) |
| Dedup-aware resolution of one MTYPE_DBL PERIOD-block column into its permanent array, shared by both loaders. nrows is explicit since the list loader's row_addr is a permanent, maxbound-sized array, not sized to nrows. More... | |
This module contains the routines for reading a structured list, which consists of a separate vector for each column in the list.
|
private |
| subroutine structarraymodule::allocate_dbl1d_type | ( | class(structarraytype) | this, |
| type(structvectortype), intent(inout) | sv | ||
| ) |
| this | StructArrayType |
Definition at line 440 of file StructArray.f90.

|
private |
|
private |
| this | StructArrayType |
Definition at line 354 of file StructArray.f90.

|
private |
|
private |
| this | StructArrayType |
Definition at line 802 of file StructArray.f90.

| type(structarraytype) function, pointer, public structarraymodule::constructstructarray | ( | type(modflowinputtype), intent(in) | mf6_input, |
| integer(i4b), intent(in) | ncol, | ||
| integer(i4b), intent(in) | nrow, | ||
| integer(i4b), intent(in) | blocknum, | ||
| character(len=*), intent(in) | mempath, | ||
| character(len=*), intent(in) | component_mempath, | ||
| integer(i4b), intent(in), optional | size_init | ||
| ) |
| [in] | ncol | number of columns in the StructArrayType |
| [in] | nrow | number of rows in the StructArrayType |
| [in] | blocknum | valid block number or 0 |
| [in] | mempath | memory path for storing the vector |
| [in] | size_init | initial deferred allocation size (default 5) |
Definition at line 88 of file StructArray.f90.

|
private |
| this | StructArrayType |
Definition at line 252 of file StructArray.f90.
| subroutine, public structarraymodule::destructstructarray | ( | type(structarraytype), intent(inout), pointer | struct_array | ) |
| [in,out] | struct_array | StructArrayType to destroy |
Definition at line 138 of file StructArray.f90.

| integer(i4b) function, public structarraymodule::find_auxname_index | ( | character(len=*), intent(in) | auxname, |
| type(characterstringtype), dimension(:), intent(in) | auxnames, | ||
| integer(i4b), intent(in) | naux | ||
| ) |
|
private |
| this | StructArrayType |
Definition at line 264 of file StructArray.f90.

| character(len=lenvarname) function, public structarraymodule::idm_input_varname | ( | type(inputparamdefinitiontype), intent(in) | idt | ) |
Definition at line 237 of file StructArray.f90.


| logical(lgp) function, public structarraymodule::is_auxval | ( | type(inputparamdefinitiontype), intent(in) | idt | ) |
| subroutine structarraymodule::load_deferred_vector | ( | class(structarraytype) | this, |
| integer(i4b), intent(in) | icol | ||
| ) |
| this | StructArrayType |
Definition at line 503 of file StructArray.f90.

|
private |
| this | StructArrayType | |
| [in] | iout | unit number for output |
Definition at line 750 of file StructArray.f90.
|
private |
Sets idt, body_start, and head_nbody but allocates no data arrays. Used for KEYWORD indicator columns that have been consolidated into the SETTING column; these vectors serve only as dispatch-map entries.
| this | StructArrayType | |
| [in] | icol | column index |
| idt | input definition (for tagname lookup) | |
| [in] | body_start | SA column index of the head's first body (0 if none) |
| [in] | head_nbody | number of body columns following the head |
Definition at line 210 of file StructArray.f90.
|
private |
| this | StructArrayType | |
| [in] | icol | column to create |
| [in] | charlen | override character length for charstr1d |
| [in] | varname | override the memory-manager name (default idtmf6varname) |
Definition at line 149 of file StructArray.f90.

| subroutine structarraymodule::memload_vectors | ( | class(structarraytype) | this | ) |
| integer(i4b) function structarraymodule::read_from_binary | ( | class(structarraytype) | this, |
| integer(i4b), intent(in) | inunit, | ||
| integer(i4b), intent(in) | iout | ||
| ) |
| this | StructArrayType | |
| [in] | inunit | unit number for binary input |
| [in] | iout | unit number for output |
Definition at line 1295 of file StructArray.f90.

|
private |
| this | StructArrayType | |
| [in,out] | parser | block parser to read from |
| [in] | iout | unit number for output |
| [in] | input_name | input filename for error messages |
Definition at line 1070 of file StructArray.f90.

|
private |
Each input line contains nleading fixed columns followed by a dispatch keyword. Two dispatch modes are supported:
Simple dispatch: keyword matches a DOUBLE/STRING/INTEGER column. One value token is read from the parser into that column. All other member columns receive their sentinel for that row.
Compound dispatch: keyword matches a KEYWORD-type column (e.g. FLOWING_WELL). No parser token is read for the KEYWORD column — the dispatch keyword itself is stored. Subsequent non-KEYWORD columns (the compound sub-members, e.g. FWELEV/FWCOND/FWRLEN) are read from the parser in order until the next KEYWORD column or the end of the member columns.
No-value KEYWORD dispatch: a KEYWORD column with no sub-members immediately following stores the dispatch keyword and reads nothing further.
| this | StructArrayType | |
| [in,out] | parser | block parser to read from |
| [in] | timeseries | .true. when TS files loaded |
| [in] | nleading | number of leading (fixed) columns |
| [in] | iout | unit number for output |
| [in] | input_name | input filename for error messages |
Definition at line 1148 of file StructArray.f90.

|
private |
| this | StructArrayType | |
| [in,out] | parser | block parser to read from |
| [in] | iout | unit number for output |
Definition at line 910 of file StructArray.f90.

|
private |
|
private |
Iterates over struct vectors that carry deferred TS tokens and registers each with the supplied tsmanager. Handles both BND (MTYPE_DBL / dbl1d) and AUX (MTYPE_DBL2D / dbl2d) columns. Pass auxname_cst only when AUX columns may carry time series.
| [in] | clear_strlocs | if .false. strlocs are preserved for re-registration (default .true.) |
| [in] | ifno_map | if present, maps ts_strlocrow (PACKAGEDATA row) to its feature number, used as the TS link row address |
Definition at line 1403 of file StructArray.f90.

|
private |
| [in] | nrows | rows read this period |
| [in] | ifno_map | PERIOD row -> feature index |
| [in] | auxname_cst | AUX column names, indexed 1..naux |
| [in] | featarr2d | permanent dbl2d (AUX) target |
Definition at line 1550 of file StructArray.f90.
|
private |
| [in] | category | 'AUX' or 'BND' |
| [in] | nrows | rows read this period |
| [in] | addr_map | PERIOD row -> feature index |
| [in] | names | size naux |
| [in] | featarr2d | (naux, nfeatures) permanent target |
| [in] | raw2d | (naux, nrows) raw column source |
Definition at line 1490 of file StructArray.f90.

|
private |