![]() |
MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
|
type for structured array More...

Public Member Functions | |
| procedure | mem_create_vector (this, icol, idt, charlen, varname) |
| create new vector in StructArrayType | |
| procedure | mem_create_metadata_vector (this, icol, idt, body_start, head_nbody) |
| Create a metadata-only StructVector for a KEYWORD indicator column. | |
| procedure | count (this) |
| procedure | get (this, idx) |
| procedure | allocate_int_type (this, sv) |
| allocate integer input type | |
| procedure | allocate_dbl_type (this, sv) |
| allocate double input type | |
| procedure | allocate_charstr_type (this, sv) |
| allocate charstr input type | |
| procedure | allocate_int1d_type (this, sv) |
| allocate int1d input type | |
| procedure | allocate_dbl1d_type (this, sv) |
| allocate dbl1d input type | |
| procedure | read_param (this, parser, sv_col, irow, timeseries, iout) |
| procedure | read_from_parser (this, parser, timeseries, iout, input_name) |
| read from the block parser to fill the StructArrayType | |
| procedure | read_from_parser_keystring (this, parser, timeseries, nleading, iout, input_name) |
| read keystring period block into the StructArrayType | |
| procedure | read_from_binary (this, inunit, iout) |
| read from binary input to fill the StructArrayType | |
| procedure | memload_vectors (this) |
| load deferred vectors into managed memory | |
| procedure | load_deferred_vector (this, icol) |
| procedure | log_structarray_vars (this, iout) |
| log information about the StructArrayType | |
| procedure | check_reallocate (this) |
| reallocate local memory for deferred vectors if necessary | |
| procedure | 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 | |
| procedure | 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. | |
| procedure | 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. | |
Public Attributes | |
| integer(i4b) | ncol |
| integer(i4b) | nrow |
| integer(i4b) | blocknum |
| logical(lgp) | deferred_shape = .false. |
| integer(i4b) | deferred_size_init = 5 |
| character(len=lenmempath) | mempath |
| character(len=lenmempath) | component_mempath |
| type(structvectortype), dimension(:), allocatable | struct_vectors |
| integer(i4b), dimension(:), allocatable | startidx |
| integer(i4b), dimension(:), allocatable | numcols |
| type(modflowinputtype) | mf6_input |
Private Member Functions | |
| procedure, private | 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. | |
This type is used to read and store a list that consists of multiple one-dimensional vectors.
Definition at line 47 of file StructArray.f90.
| procedure structarraymodule::structarraytype::allocate_charstr_type | ( | class(structarraytype) | this, |
| type(structvectortype), intent(inout) | sv ) |
| this | StructArrayType |
Definition at line 66 of file StructArray.f90.
| procedure structarraymodule::structarraytype::allocate_dbl1d_type | ( | class(structarraytype) | this, |
| type(structvectortype), intent(inout) | sv ) |
| this | StructArrayType |
Definition at line 68 of file StructArray.f90.
| procedure structarraymodule::structarraytype::allocate_dbl_type | ( | class(structarraytype) | this, |
| type(structvectortype), intent(inout) | sv ) |
| this | StructArrayType |
Definition at line 65 of file StructArray.f90.
| procedure structarraymodule::structarraytype::allocate_int1d_type | ( | class(structarraytype) | this, |
| type(structvectortype), intent(inout) | sv ) |
| this | StructArrayType |
Definition at line 67 of file StructArray.f90.
| procedure structarraymodule::structarraytype::allocate_int_type | ( | class(structarraytype) | this, |
| type(structvectortype), intent(inout) | sv ) |
| this | StructArrayType |
Definition at line 64 of file StructArray.f90.
| procedure structarraymodule::structarraytype::check_reallocate | ( | class(structarraytype) | this | ) |
| this | StructArrayType |
Definition at line 76 of file StructArray.f90.
| procedure structarraymodule::structarraytype::count | ( | class(structarraytype) | this | ) |
| this | StructArrayType |
Definition at line 62 of file StructArray.f90.
| procedure structarraymodule::structarraytype::get | ( | class(structarraytype) | this, |
| integer(i4b), intent(in) | idx ) |
| this | StructArrayType |
Definition at line 63 of file StructArray.f90.
| procedure structarraymodule::structarraytype::load_deferred_vector | ( | class(structarraytype) | this, |
| integer(i4b), intent(in) | icol ) |
| this | StructArrayType |
Definition at line 74 of file StructArray.f90.
| procedure structarraymodule::structarraytype::log_structarray_vars | ( | class(structarraytype) | this, |
| integer(i4b), intent(in) | iout ) |
| this | StructArrayType | |
| [in] | iout | unit number for output |
Definition at line 75 of file StructArray.f90.
| procedure structarraymodule::structarraytype::mem_create_metadata_vector | ( | class(structarraytype) | this, |
| integer(i4b), intent(in) | icol, | ||
| type(inputparamdefinitiontype), pointer | idt, | ||
| integer(i4b), intent(in) | body_start, | ||
| integer(i4b), intent(in) | head_nbody ) |
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 61 of file StructArray.f90.
| procedure structarraymodule::structarraytype::mem_create_vector | ( | class(structarraytype) | this, |
| integer(i4b), intent(in) | icol, | ||
| type(inputparamdefinitiontype), pointer | idt, | ||
| integer(i4b), intent(in), optional | charlen, | ||
| character(len=*), intent(in), optional | varname ) |
| 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 60 of file StructArray.f90.
| procedure structarraymodule::structarraytype::memload_vectors | ( | class(structarraytype) | this | ) |
| this | StructArrayType |
Definition at line 73 of file StructArray.f90.
| procedure structarraymodule::structarraytype::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 72 of file StructArray.f90.
| procedure structarraymodule::structarraytype::read_from_parser | ( | class(structarraytype) | this, |
| type(blockparsertype), intent(inout) | parser, | ||
| logical(lgp), intent(in) | timeseries, | ||
| integer(i4b), intent(in) | iout, | ||
| character(len=*), intent(in) | input_name ) |
| 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 70 of file StructArray.f90.
| procedure structarraymodule::structarraytype::read_from_parser_keystring | ( | class(structarraytype) | this, |
| type(blockparsertype), intent(inout) | parser, | ||
| logical(lgp), intent(in) | timeseries, | ||
| integer(i4b), intent(in) | nleading, | ||
| integer(i4b), intent(in) | iout, | ||
| character(len=*), intent(in) | input_name ) |
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 71 of file StructArray.f90.
| procedure structarraymodule::structarraytype::read_param | ( | class(structarraytype) | this, |
| type(blockparsertype), intent(inout) | parser, | ||
| integer(i4b), intent(in) | sv_col, | ||
| integer(i4b), intent(in) | irow, | ||
| logical(lgp), intent(in) | timeseries, | ||
| integer(i4b), intent(in) | iout ) |
| this | StructArrayType | |
| [in,out] | parser | block parser to read from |
| [in] | iout | unit number for output |
Definition at line 69 of file StructArray.f90.
| procedure structarraymodule::structarraytype::ts_update | ( | class(structarraytype), intent(inout) | this, |
| type(timeseriesmanagertype), intent(inout), pointer | tsmanager, | ||
| character(len=*), intent(in) | subcomp_name, | ||
| integer(i4b), intent(in) | iprpak, | ||
| character(len=*), intent(in) | input_name, | ||
| type(characterstringtype), dimension(:), intent(in), optional, pointer | auxname_cst, | ||
| logical(lgp), intent(in), optional | clear_strlocs, | ||
| integer(i4b), dimension(:), intent(in), optional | ifno_map ) |
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 (block row) to its key, used as the TS link row address |
Definition at line 77 of file StructArray.f90.
| procedure structarraymodule::structarraytype::ts_update_adv | ( | class(structarraytype), intent(inout) | this, |
| integer(i4b), intent(in) | icol, | ||
| type(timeseriesmanagertype), intent(inout), pointer | tsmanager, | ||
| character(len=*), intent(in) | subcomp_name, | ||
| integer(i4b), intent(in) | iprpak, | ||
| integer(i4b), intent(in) | nrows, | ||
| integer(i4b), dimension(:), intent(in) | ifno_map, | ||
| type(characterstringtype), dimension(:), intent(in), pointer | auxname_cst, | ||
| real(dp), dimension(:, :), intent(in), pointer | featarr2d ) |
| [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 78 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 80 of file StructArray.f90.
| procedure structarraymodule::structarraytype::ts_update_indexed | ( | class(structarraytype), intent(inout) | this, |
| integer(i4b), intent(in) | icol, | ||
| type(timeseriesmanagertype), intent(inout), pointer | tsmanager, | ||
| character(len=*), intent(in) | subcomp_name, | ||
| integer(i4b), intent(in) | iprpak, | ||
| integer(i4b), intent(in) | nrows, | ||
| integer(i4b), dimension(:), intent(in) | row_addr, | ||
| character(len=*), intent(in) | varname, | ||
| real(dp), dimension(:), intent(in), pointer, contiguous | featarr ) |
| [in] | nrows | rows to process this period |
Definition at line 79 of file StructArray.f90.
| integer(i4b) structarraymodule::structarraytype::blocknum |
Definition at line 50 of file StructArray.f90.
| character(len=lenmempath) structarraymodule::structarraytype::component_mempath |
Definition at line 54 of file StructArray.f90.
| logical(lgp) structarraymodule::structarraytype::deferred_shape = .false. |
Definition at line 51 of file StructArray.f90.
| integer(i4b) structarraymodule::structarraytype::deferred_size_init = 5 |
Definition at line 52 of file StructArray.f90.
| character(len=lenmempath) structarraymodule::structarraytype::mempath |
Definition at line 53 of file StructArray.f90.
| type(modflowinputtype) structarraymodule::structarraytype::mf6_input |
Definition at line 58 of file StructArray.f90.
| integer(i4b) structarraymodule::structarraytype::ncol |
Definition at line 48 of file StructArray.f90.
| integer(i4b) structarraymodule::structarraytype::nrow |
Definition at line 49 of file StructArray.f90.
| integer(i4b), dimension(:), allocatable structarraymodule::structarraytype::numcols |
Definition at line 57 of file StructArray.f90.
| integer(i4b), dimension(:), allocatable structarraymodule::structarraytype::startidx |
Definition at line 56 of file StructArray.f90.
| type(structvectortype), dimension(:), allocatable structarraymodule::structarraytype::struct_vectors |
Definition at line 55 of file StructArray.f90.