MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
LoadContext.f90 File Reference

Go to the source code of this file.

Data Types

type  loadcontextmodule::readstatevartype
 Pointer type for read state variable. More...
interface  loadcontextmodule::setptr
type  loadcontextmodule::keystringitemtype
 One descriptor per expanded keystring item, so loaders iterate uniformly instead of re-deriving per-mode state. More...
type  loadcontextmodule::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...

Modules

module  loadcontextmodule
 Load context for IDM generic dynamic loaders.

Enumerations

enum  {
  loadcontextmodule::load_undef = 0 , loadcontextmodule::list = 1 , loadcontextmodule::layerarray = 2 , loadcontextmodule::gridarray = 3 ,
  loadcontextmodule::keystring = 4
}
enum  {
  loadcontextmodule::rs_unset = -1 , loadcontextmodule::rs_none = 0 , loadcontextmodule::rs_values = 1 , loadcontextmodule::rs_series = 2 ,
  loadcontextmodule::rs_netcdf = 3
}
 Read state of a period array (e.g. INRECHARGE). More...

Functions/Subroutines

subroutine loadcontextmodule::init (this, mf6_input, blockname, named_bound)
 Initialize the load context.
subroutine loadcontextmodule::resolve_context (this)
 Set context flags from input load_scope and component metadata.
subroutine loadcontextmodule::resolve_loadtype (this)
 Determine loadtype from block and param definitions.
subroutine loadcontextmodule::resolve_dimensions (this)
 Resolve dimension scalars and scale keystring maxbound.
subroutine loadcontextmodule::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 loadcontextmodule::allocate_arrays (this)
 allocate arrays
subroutine loadcontextmodule::allocate_param (this, idt)
 allocate a package dynamic input parameter
subroutine loadcontextmodule::allocate_params (this)
 Allocate each in-scope parameter in the memory manager.
logical(lgp) function loadcontextmodule::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 loadcontextmodule::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 loadcontextmodule::option_check (this, varname, threshold)
 Return .true. if a memory-manager integer option variable exceeds a threshold.
subroutine loadcontextmodule::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 loadcontextmodule::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 loadcontextmodule::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 loadcontextmodule::shape_param_is_array (this, shape_varname)
 Is shape_varname a per-feature array (PACKAGEDATA) rather than a package-wide scalar (DIMENSIONS)?
subroutine loadcontextmodule::set_params (this)
 set set of in scope parameters for package
character(len=lenvarname) function loadcontextmodule::rsv_alloc (this, mf6varname)
 allocate a read state variable
subroutine loadcontextmodule::destroy (this)
 destroy input context object
type(inputparamdefinitiontype) function, pointer loadcontextmodule::find_setting_aggregate (mf6_input, rec_cols, nrec_col)
 Return the KEYSTRING aggregate for the SETTING token in rec_cols, or null().
subroutine loadcontextmodule::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 loadcontextmodule::is_keystring_period (mf6_input)
 Return .true. if mf6_input's PERIOD block uses keystring dispatch.
logical(lgp) function, public loadcontextmodule::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 loadcontextmodule::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 loadcontextmodule::is_advanced (mf6_input)
 Return .true. if mf6_input is an advanced package.
subroutine loadcontextmodule::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 loadcontextmodule::check_developmode (this, input_name)
 Check whether any in-scope parameter is a development-mode feature.
character(len=lenvarname) function, public loadcontextmodule::rsv_name (mf6varname)
 create read state variable name
character(len=2) function, public loadcontextmodule::tslink_id (blockname)
 time series link identifier for a static block
subroutine loadcontextmodule::allocate_int1d (nrow, varname, mempath)
 allocate int1d
subroutine loadcontextmodule::allocate_dbl1d (nrow, varname, mempath)
 allocate dbl1d
subroutine loadcontextmodule::allocate_dbl2d (ncol, nrow, varname, mempath)
 allocate dbl2d
subroutine loadcontextmodule::setval (intptr, varname, mempath)
 allocate intptr and update from input context
subroutine loadcontextmodule::setptr_int (intptr, varname, mempath)
 set intptr to varname
subroutine loadcontextmodule::setptr_charstr1d (charstr1d, varname, mempath, strlen)
 set charstr1d pointer to varname
subroutine loadcontextmodule::setptr_auxvar (auxvar, mempath)
 set auxvar pointer

Variables

integer(i4b), parameter, public loadcontextmodule::addr_none = 0
 not an applied setting
integer(i4b), parameter, public loadcontextmodule::addr_feature = 1
 addressed by leading id (IFNO/BNDNO)
integer(i4b), parameter, public loadcontextmodule::addr_node = 2
 addressed by CELLID
integer(i4b), parameter, public loadcontextmodule::addr_subindex = 3
 addressed by (id, subindex)