MODFLOW 6  version 6.9.0.dev0
USGS Modular Hydrologic Model
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
}
 

Functions/Subroutines

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

Variables

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