![]() |
MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
|
Load context for IDM generic dynamic loaders. More...
Data Types | |
| type | readstatevartype |
| Pointer type for read state variable. More... | |
| interface | setptr |
| type | keystringitemtype |
| One descriptor per expanded keystring item, so loaders iterate uniformly instead of re-deriving per-mode state. More... | |
| type | loadcontexttype |
| Input load context for generic dynamic loaders and StructArray based static loads. Classifies the input, determines in-scope parameters, and manages memory-manager scalars and array pointers. More... | |
Enumerations | |
| enum | { load_undef = 0 , list = 1 , layerarray = 2 , gridarray = 3 , keystring = 4 } |
| enum | { rs_unset = -1 , rs_none = 0 , rs_values = 1 , rs_series = 2 , rs_netcdf = 3 } |
| Read state of a period array (e.g. INRECHARGE). More... | |
Functions/Subroutines | |
| subroutine | init (this, mf6_input, blockname, named_bound) |
| Initialize the load context. | |
| subroutine | resolve_context (this) |
| Set context flags from input load_scope and component metadata. | |
| subroutine | resolve_loadtype (this) |
| Determine loadtype from block and param definitions. | |
| subroutine | resolve_dimensions (this) |
| Resolve dimension scalars and scale keystring maxbound. | |
| subroutine | scale_keystring_maxbound (this) |
| Scale maxbound (a feature or node count) by the number of KEYSTRING items, so every feature can use every setting in one period. | |
| subroutine | allocate_arrays (this) |
| allocate arrays | |
| subroutine | allocate_param (this, idt) |
| allocate a package dynamic input parameter | |
| subroutine | allocate_params (this) |
| Allocate each in-scope parameter in the memory manager. | |
| logical(lgp) function | in_scope (this, tagname) |
| Return .true. if an optional parameter is active for this load. Required/structural params are handled by the caller; generic conditions are checked first, then package-specific ones by subcomponent_type. | |
| logical(lgp) function | subindex_dependency (this, tagname, dimname, subindex_tagname) |
| Hardcoded per-package dependency for a subindex param with no SHAPE of its own – same category of special-casing as in_scope, for a dimension name and subindex field instead. | |
| logical(lgp) function | option_check (this, varname, threshold) |
| Return .true. if a memory-manager integer option variable exceeds a threshold. | |
| subroutine | build_keystring_items (this) |
| Build the per-item descriptor table, the single source of truth for how each keystring item is allocated and applied. | |
| integer(i4b) function | resolve_nfeatures (this) |
| Resolve the permanent array's feature count. The explicit DIMENSIONS dimension (named_bound) is authoritative when present; PACKAGEDATA row count is the fallback. Both present and disagreeing is an error. | |
| integer(i4b) function | resolve_item_nfeatures (this, item_tagname, dimname, default_nfeatures) |
| Per-item feature count from a named dimension, falling back to default_nfeatures if unset. Populated-then-released is an error. | |
| logical(lgp) function | shape_param_is_array (this, shape_varname) |
| Is shape_varname a per-feature array (PACKAGEDATA) rather than a package-wide scalar (DIMENSIONS)? | |
| subroutine | set_params (this) |
| set set of in scope parameters for package | |
| character(len=lenvarname) function | rsv_alloc (this, mf6varname) |
| allocate a read state variable | |
| subroutine | destroy (this) |
| destroy input context object | |
| type(inputparamdefinitiontype) function, pointer | find_setting_aggregate (mf6_input, rec_cols, nrec_col) |
| Return the KEYSTRING aggregate for the SETTING token in rec_cols, or null(). | |
| subroutine | expand_record_body (mf6_input, rec_idt, item_names, nkeystring_items) |
| Append body column names from a RECORD compound entry to item_names. | |
| logical(lgp) function, public | is_keystring_period (mf6_input) |
| Return .true. if mf6_input's PERIOD block uses keystring dispatch. | |
| logical(lgp) function, public | is_feature_keystring (mf6_input) |
| .true. if mf6_input's PERIOD block is feature-addressed (see is_feature_tag). Block-independent, unlike LoadContextType's own keystring_by_feature, which is only valid for a PERIOD-scoped instance. | |
| logical(lgp) function | is_feature_tag (tagname) |
| .true. if tagname is a record's leading id column (IFNO and its legacy package-specific aliases). Single source for both resolve_loadtype and is_feature_keystring. | |
| logical(lgp) function, public | is_advanced (mf6_input) |
| Return .true. if mf6_input is an advanced package. | |
| subroutine | keystring_item_names (this, item_names, head_nbody, item_is_body, nkeystring_items) |
| Return keystring item column names, per-head body counts, and body flags. A RECORD group's trailing columns are body members; its head and any direct-dispatch param are not. | |
| subroutine | check_developmode (this, input_name) |
| Check whether any in-scope parameter is a development-mode feature. | |
| character(len=lenvarname) function, public | rsv_name (mf6varname) |
| create read state variable name | |
| character(len=2) function, public | tslink_id (blockname) |
| time series link identifier for a static block | |
| subroutine | allocate_int1d (nrow, varname, mempath) |
| allocate int1d | |
| subroutine | allocate_dbl1d (nrow, varname, mempath) |
| allocate dbl1d | |
| subroutine | allocate_dbl2d (ncol, nrow, varname, mempath) |
| allocate dbl2d | |
| subroutine | setval (intptr, varname, mempath) |
| allocate intptr and update from input context | |
| subroutine | setptr_int (intptr, varname, mempath) |
| set intptr to varname | |
| subroutine | setptr_charstr1d (charstr1d, varname, mempath, strlen) |
| set charstr1d pointer to varname | |
| subroutine | setptr_auxvar (auxvar, mempath) |
| set auxvar pointer | |
Variables | |
| integer(i4b), parameter, public | addr_none = 0 |
| not an applied setting | |
| integer(i4b), parameter, public | addr_feature = 1 |
| addressed by leading id (IFNO/BNDNO) | |
| integer(i4b), parameter, public | addr_node = 2 |
| addressed by CELLID | |
| integer(i4b), parameter, public | addr_subindex = 3 |
| addressed by (id, subindex) | |
LoadContextType classifies each input, builds the in-scope parameter list for the active block, and manages memory-manager dimension scalars and array pointers. It is used by all dynamic loaders: ListLoadType, KeystringLoadType, LayerArrayLoadType, GridArrayLoadType, and StructArray-based static loads.
|
private |
| Enumerator | |
|---|---|
| load_undef | undefined load type |
| list | list load |
| layerarray | readasarrays load |
| gridarray | readarraygrid load |
| keystring | keystring period block load |
Definition at line 33 of file LoadContext.f90.
|
private |
Set for each period block load.
Definition at line 45 of file LoadContext.f90.
|
private |
Call after input parameters are allocated: after load_params() with create for array-based loaders, or after all mem_create_vector() calls for list-based load.
Definition at line 357 of file LoadContext.f90.

|
private |
| [in] | nrow | integer array number of rows |
| [in] | varname | variable name |
| [in] | mempath | variable mempath |
Definition at line 1266 of file LoadContext.f90.

|
private |
| [in] | ncol | integer array number of cols |
| [in] | nrow | integer array number of rows |
| [in] | varname | variable name |
| [in] | mempath | variable mempath |
Definition at line 1281 of file LoadContext.f90.

|
private |
| [in] | nrow | integer array number of rows |
| [in] | varname | variable name |
| [in] | mempath | variable mempath |
Definition at line 1251 of file LoadContext.f90.

|
private |
Called only from allocate_params(), itself called only by the LAYERARRAY/GRIDARRAY loaders – thisloadtype is never LIST here.
Definition at line 403 of file LoadContext.f90.

|
private |
Call after init() for array-based loaders (LAYERARRAY, GRIDARRAY) that need memory-manager storage allocated for every in-scope parameter. Loaders access thisparams and size(thisparams) directly.
Definition at line 455 of file LoadContext.f90.

|
private |
Definition at line 604 of file LoadContext.f90.

|
private |
Definition at line 1189 of file LoadContext.f90.

|
private |
Definition at line 928 of file LoadContext.f90.
|
private |
Definition at line 994 of file LoadContext.f90.


|
private |
Definition at line 962 of file LoadContext.f90.


|
private |
Definition at line 474 of file LoadContext.f90.


| subroutine loadcontextmodule::init | ( | class(loadcontexttype) | this, |
| type(modflowinputtype), intent(in) | mf6_input, | ||
| character(len=*), intent(in), optional | blockname, | ||
| character(len=*), intent(in), optional | named_bound ) |
Classifies the input, builds the in-scope parameter list, and resolves memory-manager dimension scalars.
Definition at line 157 of file LoadContext.f90.

| logical(lgp) function, public loadcontextmodule::is_advanced | ( | type(modflowinputtype), intent(in) | mf6_input | ) |
Definition at line 1096 of file LoadContext.f90.


| logical(lgp) function, public loadcontextmodule::is_feature_keystring | ( | type(modflowinputtype), intent(in) | mf6_input | ) |
Definition at line 1060 of file LoadContext.f90.


|
private |
Definition at line 1083 of file LoadContext.f90.

| logical(lgp) function, public loadcontextmodule::is_keystring_period | ( | type(modflowinputtype), intent(in) | mf6_input | ) |
Definition at line 1028 of file LoadContext.f90.


|
private |
Definition at line 1106 of file LoadContext.f90.

|
private |
Definition at line 585 of file LoadContext.f90.


|
private |
Definition at line 190 of file LoadContext.f90.

|
private |
Definition at line 293 of file LoadContext.f90.

|
private |
Definition at line 755 of file LoadContext.f90.

|
private |
Definition at line 222 of file LoadContext.f90.

|
private |
Definition at line 702 of file LoadContext.f90.

|
private |
Create a read state variable, e.g. 'INRECHARGE', set to RS_UNSET. Loaders update it for each period block (see RS_*).
Definition at line 914 of file LoadContext.f90.

| character(len=lenvarname) function, public loadcontextmodule::rsv_name | ( | character(len=*), intent(in) | mf6varname | ) |
Definition at line 1216 of file LoadContext.f90.

|
private |
Definition at line 333 of file LoadContext.f90.
|
private |
Definition at line 817 of file LoadContext.f90.

|
private |
Definition at line 1350 of file LoadContext.f90.
|
private |
Definition at line 1331 of file LoadContext.f90.
|
private |
Definition at line 1314 of file LoadContext.f90.
|
private |
Definition at line 1300 of file LoadContext.f90.

|
private |
Definition at line 794 of file LoadContext.f90.
|
private |
Definition at line 562 of file LoadContext.f90.
| character(len=2) function, public loadcontextmodule::tslink_id | ( | character(len=*), intent(in) | blockname | ) |
Return the identifier used to name a static block's time series link variables (TSLINK_<id>, TSLINKVARS_<id>), or an empty string if the block has none.
Definition at line 1236 of file LoadContext.f90.

| integer(i4b), parameter, public loadcontextmodule::addr_feature = 1 |
Definition at line 66 of file LoadContext.f90.
| integer(i4b), parameter, public loadcontextmodule::addr_node = 2 |
Definition at line 67 of file LoadContext.f90.
| integer(i4b), parameter, public loadcontextmodule::addr_none = 0 |
Definition at line 65 of file LoadContext.f90.
| integer(i4b), parameter, public loadcontextmodule::addr_subindex = 3 |
Definition at line 68 of file LoadContext.f90.