HYPE
All Classes Namespaces Files Functions Variables Pages
Data Types | Functions/Subroutines
statetype_module Module Reference

Data Types

type  aquiferstatetype
 
type  lakestatetype
 
type  miscstatetype
 
type  pointertype
 
type  riverstatetype
 
type  snowicestatetype
 
type  soilstatetype
 
type  stateinfotype
 

Functions/Subroutines

subroutine, public set_stateinfo (n, dim, stateinfo, frozenstate, soilstate, aquiferstate, riverstate, lakestate, miscstate)
 
subroutine, public allocate_model_states (n, dim, config, frozenstate, soilstate, aquiferstate, riverstate, lakestate, miscstate)
 
subroutine, public deallocate_model_states (frozenstate, soilstate, aquiferstate, riverstate, lakestate, miscstate)
 
subroutine, public initiate_modelstate_submodel (n, dim, config, indexarray, frozenstate, frozenstate2, soilstate, soilstate2, aquiferstate, aquiferstate2, riverstate, riverstate2, lakestate, lakestate2, miscstate, miscstate2)
 
subroutine, public initiate_state_zero (dim, config, frozenstate, soilstate, aquiferstate, riverstate, lakestate, miscstate)
 
subroutine allocate_frozenstate_variables (n, ns, nc, nr, nl, isglac, islrice, issheat, frozenstate)
 
subroutine deallocate_frozenstate_variables (frozenstate)
 
subroutine initiate_frozenstate_submodel (ns, n, indexarray, config, frozenstate, frozenstate2)
 
subroutine initiate_frozenstate_zero (ns, isglac, islrice, issheat, frozenstate)
 
subroutine allocate_soilstate_variables (n, ns, nc, nsl, isN, isP, isC, isS, ist1, issoil, isinf, soilstate)
 
subroutine, public deallocate_soilstate_variables (soilstate)
 
subroutine initiate_soilstate_submodel (ns, n, indexarray, soilstate, soilstate2)
 
subroutine initiate_soilstate_zero (ns, soilstate)
 
subroutine allocate_aquiferstate_variables (na, ns, aquiferstate)
 
subroutine deallocate_aquiferstate_variables (aquiferstate)
 
subroutine initiate_aquiferstate_submodel (ns, na, aquiferstate, aquiferstate2)
 
subroutine initiate_aquiferstate_zero (ns, na, aquiferstate)
 
subroutine allocate_riverstate_variables (n, ns, nr, ml, mt, isN, isP, isC, isS, isSi, ist1, isQb, iswetl, riverstate)
 
subroutine deallocate_riverstate_variables (riverstate)
 
subroutine initiate_riverstate_submodel (ns, n, config, indexarray, riverstate, riverstate2)
 
subroutine initiate_riverstate_zero (ns, isP, isNPCSS, isS, ist1, iswetl, riverstate)
 
subroutine allocate_lakestate_variables (n, dim, config, lakestate)
 
subroutine deallocate_lakestate_variables (lakestate)
 
subroutine initiate_lakestate_submodel (ns, n, config, indexarray, lakestate, lakestate2)
 
subroutine initiate_lakestate_zero (ns, config, lakestate)
 
subroutine allocate_miscstate_variables (n, ns, nc, ist1, isirr, iswtr, isqar, isflood, isgsm, iswetl, isC, miscstate)
 
subroutine deallocate_miscstate_variables (miscstate)
 
subroutine initiate_miscstate_submodel (ns, n, config, indexarray, miscstate, miscstate2)
 
subroutine initiate_miscstate_zero (ns, ist1, isirr, iswtr, isqar, isflood, isgsm, iswetl, isC, miscstate)
 
subroutine, public get_frozenstate_variables_arraysize (n, ns, size, config, dim)
 
subroutine, public set_frozenstate_variables_to_array (n, size, config, frozenstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public set_frozenstate_variables_from_array (n, nsfil, size, config, frozenstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public get_soilstate_variables_arraysize (n, ns, size, config, dim)
 
subroutine, public set_soilstate_variables_to_array (n, size, config, soilstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public set_soilstate_variables_from_array (n, nsfil, size, config, soilstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public get_reset_soilstate_variables_arraysize (n, size, config, dim)
 
subroutine, public set_reset_soilstate_variables_to_array (n, size, config, soilstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public set_reset_soilstate_variables_from_array (n, size, config, soilstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public get_aquiferstate_variables_arraysize (ns, size, dim)
 
subroutine, public set_aquiferstate_variables_to_array (size, aquiferstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public set_aquiferstate_variables_from_array (nsfil, size, aquiferstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public get_riverstate_variables_arraysize (n, ns, size, config, dim)
 
subroutine, public set_riverstate_variables_to_array (n, size, config, riverstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public set_riverstate_variables_from_array (n, nsfil, size, config, statefile, riverstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public get_lakestate_variables_arraysize (n, ns, size, config, dim)
 
subroutine, public set_lakestate_variables_to_array (n, size, config, lakestate, iarrfirst, iarrlast, dim, array)
 
subroutine, public set_lakestate_variables_from_array (n, nsfil, size, config, lakestate, iarrfirst, iarrlast, dim, array)
 
subroutine, public get_miscstate_variables_arraysize (n, size, config, dim)
 
subroutine, public set_miscstate_variables_to_array (n, size, config, miscstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public set_miscstate_variables_from_array (n, nsfil, size, statefile, config, miscstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public get_reset_miscstate_variables_arraysize (n, size, config, dim)
 
subroutine, public set_reset_miscstate_variables_to_array (n, size, config, miscstate, iarrfirst, iarrlast, dim, array)
 
subroutine, public set_reset_miscstate_variables_from_array (n, size, config, miscstate, iarrfirst, iarrlast, dim, array)
 

Detailed Description

Types for state variables for the HYPE model (HYdrological Predictions for the Environment)

Five types are distinguished; four for different hydrological features in the landscape (snow and ice, soil, river and lake), and one for miscellaneous states. Not all state variables are states of the hydrological model, but hold memory of older values or averages that is needed if the model is restarted. Each statetype has seven subroutines that handle the state variables as a group; allocation, deallocation, initiation (to zero), initiation for submodel simulation, get size of states/array, write to array and read from array.

Function/Subroutine Documentation

◆ allocate_aquiferstate_variables()

subroutine statetype_module::allocate_aquiferstate_variables ( integer, intent(in)  na,
integer, intent(in)  ns,
type(aquiferstatetype), intent(inout)  aquiferstate 
)
private

Allocate aquifer state variables for the model.

Consequences Memory will be allocated

Parameters
[in]naNumber of aquifers
[in]nsNumber of substances
[in,out]aquiferstateaquifer states
+ Here is the caller graph for this function:

◆ allocate_frozenstate_variables()

subroutine statetype_module::allocate_frozenstate_variables ( integer, intent(in)  n,
integer, intent(in)  ns,
integer, intent(in)  nc,
integer, intent(in)  nr,
integer, intent(in)  nl,
logical, intent(in)  isglac,
logical, intent(in)  islrice,
logical, intent(in)  issheat,
type(snowicestatetype), intent(inout)  frozenstate 
)
private

Allocate snow and ice state variables for the model.

Consequences Memory will be allocated

Parameters
[in]nNumber of subbasins
[in]nsNumber of substances
[in]ncNumber of classes
[in]nrNumber of river types
[in]nlNumber of lake types
[in]isglacStatus of glacier simulation
[in]islriceStatus of lakeriver ice model
[in]issheatStatus of snow heat model
[in,out]frozenstateSnow and ice states
+ Here is the caller graph for this function:

◆ allocate_lakestate_variables()

subroutine statetype_module::allocate_lakestate_variables ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  dim,
type(stateconfigurationtype), intent(in)  config,
type(lakestatetype), intent(inout)  lakestate 
)
private

Allocate lake state variables for the model.

Consequences Memory will be allocated

Parameters
[in]nnumber of subbasins
[in]dimsimulation dimensions
[in]configsimulation configuration
[in,out]lakestateLake states
+ Here is the caller graph for this function:

◆ allocate_miscstate_variables()

subroutine statetype_module::allocate_miscstate_variables ( integer, intent(in)  n,
integer, intent(in)  ns,
integer, intent(in)  nc,
logical, intent(in)  ist1,
logical, intent(in)  isirr,
logical, intent(in)  iswtr,
logical, intent(in)  isqar,
logical, intent(in)  isflood,
logical, intent(in)  isgsm,
logical, intent(in)  iswetl,
logical, intent(in)  isC,
type(miscstatetype), intent(inout)  miscstate 
)
private

Allocate miscellaneous state variables for the model.

Consequences Memory will be allocated

Parameters
[in]nnumber of subbasins
[in]nsnumber of substances
[in]ncnumber of classes
[in]ist1Status of T1 simulation
[in]isirrStatus of irrigation simulation
[in]iswtrStatus of water transfer
[in]isqarStatus of updating q with AR
[in]isfloodStatus of flooded area simulation
[in]isgsmStatus of growth season model
[in]iswetlStatus of wetland simulation
[in]iscStatus of organic carbon simulation
[in,out]miscstatemisc state
+ Here is the caller graph for this function:

◆ allocate_model_states()

subroutine, public statetype_module::allocate_model_states ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  dim,
type(stateconfigurationtype), intent(in)  config,
type(snowicestatetype), intent(inout)  frozenstate,
type(soilstatetype), intent(inout)  soilstate,
type(aquiferstatetype), intent(inout)  aquiferstate,
type(riverstatetype), intent(inout)  riverstate,
type(lakestatetype), intent(inout)  lakestate,
type(miscstatetype), intent(inout)  miscstate 
)

Allocate state variables for the model.

Consequences Memory will be allocated

Parameters
[in]nNumber of subbasins
[in]dimsimulation dimensions
[in]configsimulation configuration
[in,out]frozenstateSnow and ice states
[in,out]soilstateSoil states
[in,out]aquiferstateAquifer states
[in,out]riverstateRiver states
[in,out]lakestateLake states
[in,out]miscstateMisc states
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ allocate_riverstate_variables()

subroutine statetype_module::allocate_riverstate_variables ( integer, intent(in)  n,
integer, intent(in)  ns,
integer, intent(in)  nr,
integer, intent(in)  ml,
integer, intent(in)  mt,
logical, intent(in)  isN,
logical, intent(in)  isP,
logical, intent(in)  isC,
logical, intent(in)  isS,
logical, intent(in)  isSi,
logical, intent(in)  ist1,
logical, intent(in)  isQb,
logical, intent(in)  iswetl,
type(riverstatetype), intent(inout)  riverstate 
)
private

Allocate river state variables for the model.

Consequences Memory will be allocated

Parameters
[in]nnumber of subbasins
[in]nsnumber of substances
[in]nrnumber of river types
[in]mlmaximum river lag steps
[in]mttimestep per day
[in]isnStatus of nitrogen simulation
[in]ispStatus of phosphorus simulation
[in]iscStatus of organic carbon simulation
[in]issStatus of suspended sediment simulation
[in]issiStatus of silica simulation
[in]ist1Status of T1 simulation
[in]isqbStatus of bankful flow simulation
[in]iswetlStatus of wetland simulation
[in,out]riverstateRiver states
+ Here is the caller graph for this function:

◆ allocate_soilstate_variables()

subroutine statetype_module::allocate_soilstate_variables ( integer, intent(in)  n,
integer, intent(in)  ns,
integer, intent(in)  nc,
integer, intent(in)  nsl,
logical, intent(in)  isN,
logical, intent(in)  isP,
logical, intent(in)  isC,
logical, intent(in)  isS,
logical, intent(in)  ist1,
logical, intent(in)  issoil,
logical, intent(in)  isinf,
type(soilstatetype), intent(inout)  soilstate 
)
private

Allocate soil state variables for the model.

Consequences Memory will be allocated

Parameters
[in]nNumber of subbasins
[in]nsNumber of substances
[in]ncNumber of classes
[in]nslNumber of soil layers
[in]isnStatus of nitrogen simulation
[in]ispStatus of phosphorus simulation
[in]iscStatus of organic carbon simulation
[in]issStatus of suspended sediment simulation
[in]ist1Status of T1simulation
[in]issoilStatus of soil leakage model == 2
[in]isinfStatus of infiltration model == 1
[in,out]soilstateSoil states
+ Here is the caller graph for this function:

◆ deallocate_aquiferstate_variables()

subroutine statetype_module::deallocate_aquiferstate_variables ( type(aquiferstatetype), intent(inout)  aquiferstate)
private

Deallocate aquifer states.

Parameters
[in,out]aquiferstateaquifer states
+ Here is the caller graph for this function:

◆ deallocate_frozenstate_variables()

subroutine statetype_module::deallocate_frozenstate_variables ( type(snowicestatetype), intent(inout)  frozenstate)
private

Deallocate snow and ice states.

Parameters
[in,out]frozenstateRiver states
+ Here is the caller graph for this function:

◆ deallocate_lakestate_variables()

subroutine statetype_module::deallocate_lakestate_variables ( type(lakestatetype), intent(inout)  lakestate)
private

Deallocate lake states used for temporary storage of initial state for submodel simulation.

Parameters
[in,out]lakestateLake states
+ Here is the caller graph for this function:

◆ deallocate_miscstate_variables()

subroutine statetype_module::deallocate_miscstate_variables ( type(miscstatetype), intent(inout)  miscstate)
private

Deallocate miscellaneous states used for temporary storage of initial state for submodel simulation.

Parameters
[in,out]miscstatemisc state
+ Here is the caller graph for this function:

◆ deallocate_model_states()

subroutine, public statetype_module::deallocate_model_states ( type(snowicestatetype), intent(inout)  frozenstate,
type(soilstatetype), intent(inout)  soilstate,
type(aquiferstatetype), intent(inout)  aquiferstate,
type(riverstatetype), intent(inout)  riverstate,
type(lakestatetype), intent(inout)  lakestate,
type(miscstatetype), intent(inout)  miscstate 
)

Deallocate model states.

Parameters
[in,out]frozenstateSnow and ice states
[in,out]soilstateSoil states
[in,out]aquiferstateAquifer states
[in,out]riverstateRiver states
[in,out]lakestateLake states
[in,out]miscstateMisc states
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deallocate_riverstate_variables()

subroutine statetype_module::deallocate_riverstate_variables ( type(riverstatetype), intent(inout)  riverstate)
private

Deallocate river states.

Parameters
[in,out]riverstateRiver states
+ Here is the caller graph for this function:

◆ deallocate_soilstate_variables()

subroutine, public statetype_module::deallocate_soilstate_variables ( type(soilstatetype), intent(inout)  soilstate)

Deallocate soil states.

Parameters
[in,out]soilstateSoil states
+ Here is the caller graph for this function:

◆ get_aquiferstate_variables_arraysize()

subroutine, public statetype_module::get_aquiferstate_variables_arraysize ( integer, intent(in)  ns,
type(statedimensiontype), intent(in)  size,
integer, intent(out)  dim 
)

Get number of aquifer states.

Parameters
[in]nsNumber of substances
[in]sizesimulation dimensions
[out]dimNumber of array elements
+ Here is the caller graph for this function:

◆ get_frozenstate_variables_arraysize()

subroutine, public statetype_module::get_frozenstate_variables_arraysize ( integer, intent(in)  n,
integer, intent(in)  ns,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
integer, intent(out)  dim 
)

Get number of frozen states.

Parameters
[in]nNumber of subbasins
[in]nsNumber of substances
[in]sizesimulation dimensions
[in]configsimulation configuration
[out]dimNumber of array elements
+ Here is the caller graph for this function:

◆ get_lakestate_variables_arraysize()

subroutine, public statetype_module::get_lakestate_variables_arraysize ( integer, intent(in)  n,
integer, intent(in)  ns,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
integer, intent(out)  dim 
)

Get number of lake states.

Parameters
[in]nNumber of subbasins
[in]nsNumber of substances
[in]sizesimulation dimensions
[in]configsimulation configuration
[out]dimNumber of array elements
+ Here is the caller graph for this function:

◆ get_miscstate_variables_arraysize()

subroutine, public statetype_module::get_miscstate_variables_arraysize ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
integer, intent(out)  dim 
)

Get number of miscellaneous states.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[out]dimNumber of array elements
+ Here is the caller graph for this function:

◆ get_reset_miscstate_variables_arraysize()

subroutine, public statetype_module::get_reset_miscstate_variables_arraysize ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
integer, intent(out)  dim 
)

Get number of miscellaneous states.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[out]dimNumber of array elements
+ Here is the caller graph for this function:

◆ get_reset_soilstate_variables_arraysize()

subroutine, public statetype_module::get_reset_soilstate_variables_arraysize ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
integer, intent(out)  dim 
)

Get number of soil states.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[out]dimNumber of array elements
+ Here is the caller graph for this function:

◆ get_riverstate_variables_arraysize()

subroutine, public statetype_module::get_riverstate_variables_arraysize ( integer, intent(in)  n,
integer, intent(in)  ns,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
integer, intent(out)  dim 
)

Get number of river states.

Parameters
[in]nNumber of subbasins
[in]nsNumber of substances
[in]sizesimulation dimensions
[in]configsimulation configuration
[out]dimNumber of array elements
+ Here is the caller graph for this function:

◆ get_soilstate_variables_arraysize()

subroutine, public statetype_module::get_soilstate_variables_arraysize ( integer, intent(in)  n,
integer, intent(in)  ns,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
integer, intent(out)  dim 
)

Get number of soil states.

Parameters
[in]nNumber of subbasins
[in]nsNumber of substances
[in]sizesimulation dimensions
[in]configsimulation configuration
[out]dimNumber of array elements
+ Here is the caller graph for this function:

◆ initiate_aquiferstate_submodel()

subroutine statetype_module::initiate_aquiferstate_submodel ( integer, intent(in)  ns,
integer, intent(in)  na,
type(aquiferstatetype), intent(inout)  aquiferstate,
type(aquiferstatetype), intent(in)  aquiferstate2 
)
private

Initiate submodel aquifer states by temporary storage of initial state (copy)

Parameters
[in]nsnumber of substances
[in]naNumber of aquifers
[in,out]aquiferstateaquifer state, submodel
[in]aquiferstate2aquifer state, whole model setup
+ Here is the caller graph for this function:

◆ initiate_aquiferstate_zero()

subroutine statetype_module::initiate_aquiferstate_zero ( integer, intent(in)  ns,
integer, intent(in)  na,
type(aquiferstatetype), intent(inout)  aquiferstate 
)
private

Initiate aquifer states to zero.

Parameters
[in]nsnumber of substances
[in]nanumber of aquifers
[in,out]aquiferstateaquifer states
+ Here is the caller graph for this function:

◆ initiate_frozenstate_submodel()

subroutine statetype_module::initiate_frozenstate_submodel ( integer, intent(in)  ns,
integer, intent(in)  n,
integer, dimension(n), intent(in)  indexarray,
type(stateconfigurationtype), intent(in)  config,
type(snowicestatetype), intent(inout)  frozenstate,
type(snowicestatetype), intent(in)  frozenstate2 
)
private

Initiate submodel snow and ice states by temporary storage of initial state.

Parameters
[in]nsnumber of substances
[in]nnumber of subbasins in states to be set
[in]indexarrayindex for basemodel
[in]configsimulation configuration
[in,out]frozenstateSnow and ice state, submodel
[in]frozenstate2Snow and ice state, whole model setup
+ Here is the caller graph for this function:

◆ initiate_frozenstate_zero()

subroutine statetype_module::initiate_frozenstate_zero ( integer, intent(in)  ns,
logical, intent(in)  isglac,
logical, intent(in)  islrice,
logical, intent(in)  issheat,
type(snowicestatetype), intent(inout)  frozenstate 
)
private

Initiate snow and ice states to zero.

Parameters
[in]nsnumber of substances
[in]isglacStatus of glacier simulation
[in]islriceStatus of lakeriver ice model
[in]issheatStatus of snow heat model
[in,out]frozenstateSnow and ice states
+ Here is the caller graph for this function:

◆ initiate_lakestate_submodel()

subroutine statetype_module::initiate_lakestate_submodel ( integer, intent(in)  ns,
integer, intent(in)  n,
type(stateconfigurationtype), intent(in)  config,
integer, dimension(n), intent(in)  indexarray,
type(lakestatetype), intent(inout)  lakestate,
type(lakestatetype), intent(in)  lakestate2 
)
private

Initiate submodel lake states by temporary storage of initial state.

Parameters
[in]nsnumber of substances
[in]nnumber of subbasins in states to be set
[in]configsimulation configuration
[in]indexarrayindex for basemodel
[in,out]lakestateLake state, submodel
[in]lakestate2Lake state, whole model setup
+ Here is the caller graph for this function:

◆ initiate_lakestate_zero()

subroutine statetype_module::initiate_lakestate_zero ( integer, intent(in)  ns,
type(stateconfigurationtype), intent(in)  config,
type(lakestatetype), intent(inout)  lakestate 
)
private

Initiate lake states to zero.

Parameters
[in]nsnumber of substances
[in]configsimulation configuration
[in,out]lakestateLake state, submodel
+ Here is the caller graph for this function:

◆ initiate_miscstate_submodel()

subroutine statetype_module::initiate_miscstate_submodel ( integer, intent(in)  ns,
integer, intent(in)  n,
type(stateconfigurationtype), intent(in)  config,
integer, dimension(n), intent(in)  indexarray,
type(miscstatetype), intent(inout)  miscstate,
type(miscstatetype), intent(in)  miscstate2 
)
private

Initiate submodel miscellaneous states by temporary storage of initial state.

Parameters
[in]nsnumber of substances
[in]nnumber of subbasins in states to be set
[in]configsimulation configuration
[in]indexarrayindex for basemodel
[in,out]miscstatemisc state, submodel
[in]miscstate2misc state, whole model setup
+ Here is the caller graph for this function:

◆ initiate_miscstate_zero()

subroutine statetype_module::initiate_miscstate_zero ( integer, intent(in)  ns,
logical, intent(in)  ist1,
logical, intent(in)  isirr,
logical, intent(in)  iswtr,
logical, intent(in)  isqar,
logical, intent(in)  isflood,
logical, intent(in)  isgsm,
logical, intent(in)  iswetl,
logical, intent(in)  isC,
type(miscstatetype), intent(inout)  miscstate 
)
private

Initiate miscellaneous states to zero.

Parameters
[in]nsnumber of substances
[in]ist1Status of T1 simulation
[in]isirrStatus of irrigation simulation
[in]iswtrStatus of water transfer
[in]isqarStatus of updating q with AR
[in]isfloodStatus of flooded area simulation
[in]isgsmStatus of growth season model
[in]iswetlStatus of wetland simulation
[in]iscStatus of organic carbon simulation
[in,out]miscstatemisc state, submodel
+ Here is the caller graph for this function:

◆ initiate_modelstate_submodel()

subroutine, public statetype_module::initiate_modelstate_submodel ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  dim,
type(stateconfigurationtype), intent(in)  config,
integer, dimension(n), intent(in)  indexarray,
type(snowicestatetype), intent(inout)  frozenstate,
type(snowicestatetype), intent(in)  frozenstate2,
type(soilstatetype), intent(inout)  soilstate,
type(soilstatetype), intent(in)  soilstate2,
type(aquiferstatetype), intent(inout)  aquiferstate,
type(aquiferstatetype), intent(in)  aquiferstate2,
type(riverstatetype), intent(inout)  riverstate,
type(riverstatetype), intent(in)  riverstate2,
type(lakestatetype), intent(inout)  lakestate,
type(lakestatetype), intent(in)  lakestate2,
type(miscstatetype), intent(inout)  miscstate,
type(miscstatetype), intent(in)  miscstate2 
)

Initiate states for submodel.

Parameters
[in]nNumber of subbasins (submodel)
[in]dimsimulation dimensions
[in]configsimulation configuration
[in]indexarrayindex for basemodel
[in,out]frozenstateSnow and ice state, submodel
[in]frozenstate2Snow and ice state, whole model setup
[in,out]soilstateSoil states, submodel
[in]soilstate2Soil states, whole model setup
[in,out]aquiferstateAquifer states, submodel
[in]aquiferstate2Aquifer states, whole model setup
[in,out]riverstateRiver states, submodel
[in]riverstate2River states, whole model setup
[in,out]lakestateLake states, submodel
[in]lakestate2Lake states, whole model setup
[in,out]miscstateMisc states, submodel
[in]miscstate2Misc states, whole model setup
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initiate_riverstate_submodel()

subroutine statetype_module::initiate_riverstate_submodel ( integer, intent(in)  ns,
integer, intent(in)  n,
type(stateconfigurationtype), intent(in)  config,
integer, dimension(n), intent(in)  indexarray,
type(riverstatetype), intent(inout)  riverstate,
type(riverstatetype), intent(in)  riverstate2 
)
private

Initiate submodel river states by temporary storage of initial state.

Parameters
[in]nsnumber of substances
[in]nnumber of subbasins in states to be set
[in]configsimulation configuration
[in]indexarrayindex for basemodel
[in,out]riverstateRiver state, submodel
[in]riverstate2River state, whole model setup
+ Here is the caller graph for this function:

◆ initiate_riverstate_zero()

subroutine statetype_module::initiate_riverstate_zero ( integer, intent(in)  ns,
logical, intent(in)  isP,
logical, intent(in)  isNPCSS,
logical, intent(in)  isS,
logical, intent(in)  ist1,
logical, intent(in)  iswetl,
type(riverstatetype), intent(inout)  riverstate 
)
private

Initiate river states to zero.

Parameters
[in]nsnumber of substances
[in]ispStatus of phosphorus simulation
[in]isnpcssStatus of N, P, C, S or Si simulation
[in]issStatus of suspended sediment simulation
[in]ist1Status of T1 simulation
[in]iswetlStatus of wetland simulation
[in,out]riverstateRiver states
+ Here is the caller graph for this function:

◆ initiate_soilstate_submodel()

subroutine statetype_module::initiate_soilstate_submodel ( integer, intent(in)  ns,
integer, intent(in)  n,
integer, dimension(n), intent(in)  indexarray,
type(soilstatetype), intent(inout)  soilstate,
type(soilstatetype), intent(in)  soilstate2 
)
private

Initiate submodel soil states by temporary storage of initial state.

Parameters
[in]nsnumber of substances
[in]nnumber of subbasins in states to be set
[in]indexarrayindex for basemodel
[in,out]soilstateSoil state, submodel
[in]soilstate2Soil state, whole model setup
+ Here is the caller graph for this function:

◆ initiate_soilstate_zero()

subroutine statetype_module::initiate_soilstate_zero ( integer, intent(in)  ns,
type(soilstatetype), intent(inout)  soilstate 
)
private

Initiate soil states to zero.

Parameters
[in]nsnumber of substances
[in,out]soilstateSoil states
+ Here is the caller graph for this function:

◆ initiate_state_zero()

subroutine, public statetype_module::initiate_state_zero ( type(statedimensiontype), intent(in)  dim,
type(stateconfigurationtype), intent(in)  config,
type(snowicestatetype), intent(inout)  frozenstate,
type(soilstatetype), intent(inout)  soilstate,
type(aquiferstatetype), intent(inout)  aquiferstate,
type(riverstatetype), intent(inout)  riverstate,
type(lakestatetype), intent(inout)  lakestate,
type(miscstatetype), intent(inout)  miscstate 
)

Initiate states to zero.

Parameters
[in]dimsimulation dimensions
[in]configsimulation configuration
[in,out]frozenstateSnow and ice states
[in,out]soilstateSoil states
[in,out]aquiferstateAquifer states
[in,out]riverstateRiver states
[in,out]lakestateLake states
[in,out]miscstateMisc states
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_aquiferstate_variables_from_array()

subroutine, public statetype_module::set_aquiferstate_variables_from_array ( integer, intent(in)  nsfil,
type(statedimensiontype), intent(in)  size,
type(aquiferstatetype), intent(inout)  aquiferstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(in)  array 
)

Read aquifer state variables from array.

Parameters
[in]nsfilNumber of substances read from file
[in]sizesimulation dimensions
[in,out]aquiferstateaquifer states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[in]arrayArray of states
+ Here is the caller graph for this function:

◆ set_aquiferstate_variables_to_array()

subroutine, public statetype_module::set_aquiferstate_variables_to_array ( type(statedimensiontype), intent(in)  size,
type(aquiferstatetype), intent(in)  aquiferstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(out)  array 
)

Write aquifer state variables to array.

Parameters
[in]sizesimulation dimensions
[in]aquiferstateaquifer states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[out]arrayArray of states
+ Here is the caller graph for this function:

◆ set_frozenstate_variables_from_array()

subroutine, public statetype_module::set_frozenstate_variables_from_array ( integer, intent(in)  n,
integer, intent(in)  nsfil,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(snowicestatetype), intent(inout)  frozenstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(in)  array 
)

Read snow and ice state variables from array.

Parameters
[in]nNumber of subbasins
[in]nsfilNumber of substances read from file
[in]sizesimulation dimensions
[in]configsimulation configuration
[in,out]frozenstateSnow and ice states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[in]arrayArray of states
+ Here is the caller graph for this function:

◆ set_frozenstate_variables_to_array()

subroutine, public statetype_module::set_frozenstate_variables_to_array ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(snowicestatetype), intent(in)  frozenstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(out)  array 
)

Write snow and ice state variables to array.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[in]frozenstateSnow and ice states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[out]arrayArray of states
+ Here is the caller graph for this function:

◆ set_lakestate_variables_from_array()

subroutine, public statetype_module::set_lakestate_variables_from_array ( integer, intent(in)  n,
integer, intent(in)  nsfil,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(lakestatetype), intent(inout)  lakestate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(in)  array 
)

Read lake state variables from array.

Parameters
[in]nNumber of subbasins
[in]nsfilNumber of substances of file
[in]sizesimulation dimensions
[in]configsimulation configuration
[in,out]lakestatelake states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[in]arrayArray of states
+ Here is the caller graph for this function:

◆ set_lakestate_variables_to_array()

subroutine, public statetype_module::set_lakestate_variables_to_array ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(lakestatetype), intent(in)  lakestate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(out)  array 
)

Write lake state variables to array.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[in]lakestatelake states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[out]arrayArray of states
+ Here is the caller graph for this function:

◆ set_miscstate_variables_from_array()

subroutine, public statetype_module::set_miscstate_variables_from_array ( integer, intent(in)  n,
integer, intent(in)  nsfil,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  statefile,
type(stateconfigurationtype), intent(in)  config,
type(miscstatetype), intent(inout)  miscstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(in)  array 
)

Read misc state variables from array.

Parameters
[in]nNumber of subbasins
[in]nsfilNumber of substances of file
[in]sizesimulation dimensions
[in]statefilestate file simulation configuration
[in]configsimulation configuration
[in,out]miscstatemisc states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[in]arrayArray of states
+ Here is the caller graph for this function:

◆ set_miscstate_variables_to_array()

subroutine, public statetype_module::set_miscstate_variables_to_array ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(miscstatetype), intent(in)  miscstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(out)  array 
)

Write miscellaneous state variables to array.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[in]miscstatemisc states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[out]arrayArray of states
+ Here is the caller graph for this function:

◆ set_reset_miscstate_variables_from_array()

subroutine, public statetype_module::set_reset_miscstate_variables_from_array ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(miscstatetype), intent(inout)  miscstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(in)  array 
)

Read misc state variables from array.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[in,out]miscstatemisc states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[in]arrayArray of states
+ Here is the caller graph for this function:

◆ set_reset_miscstate_variables_to_array()

subroutine, public statetype_module::set_reset_miscstate_variables_to_array ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(miscstatetype), intent(in)  miscstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(out)  array 
)

Write miscellaneous state variables to array.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[in]miscstatemisc states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[out]arrayArray of states
+ Here is the caller graph for this function:

◆ set_reset_soilstate_variables_from_array()

subroutine, public statetype_module::set_reset_soilstate_variables_from_array ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(soilstatetype), intent(inout)  soilstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(in)  array 
)

Read soil state variables from array.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[in,out]soilstateSoil states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[in]arrayArray of states
+ Here is the caller graph for this function:

◆ set_reset_soilstate_variables_to_array()

subroutine, public statetype_module::set_reset_soilstate_variables_to_array ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(soilstatetype), intent(in)  soilstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(out)  array 
)

Write soil state variables to array.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[in]soilstateSoil states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[out]arrayArray of states
+ Here is the caller graph for this function:

◆ set_riverstate_variables_from_array()

subroutine, public statetype_module::set_riverstate_variables_from_array ( integer, intent(in)  n,
integer, intent(in)  nsfil,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(stateconfigurationtype), intent(in)  statefile,
type(riverstatetype), intent(inout)  riverstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(in)  array 
)

Read river state variables from array.

Parameters
[in]nNumber of subbasins
[in]nsfilNumber of substances of file
[in]sizesimulation dimensions
[in]configsimulation configuration
[in]statefilestate file simulation configuration
[in,out]riverstateRiver states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[in]arrayArray of states
+ Here is the caller graph for this function:

◆ set_riverstate_variables_to_array()

subroutine, public statetype_module::set_riverstate_variables_to_array ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(riverstatetype), intent(in)  riverstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(out)  array 
)

Write river state variables to array.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[in]riverstateRiver states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[out]arrayArray of states
+ Here is the caller graph for this function:

◆ set_soilstate_variables_from_array()

subroutine, public statetype_module::set_soilstate_variables_from_array ( integer, intent(in)  n,
integer, intent(in)  nsfil,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(soilstatetype), intent(inout)  soilstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(in)  array 
)

Read soil state variables from array.

Parameters
[in]nNumber of subbasins
[in]nsfilNumber of substances read from file
[in]sizesimulation dimensions
[in]configsimulation configuration
[in,out]soilstateSoil states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[in]arrayArray of states
+ Here is the caller graph for this function:

◆ set_soilstate_variables_to_array()

subroutine, public statetype_module::set_soilstate_variables_to_array ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  size,
type(stateconfigurationtype), intent(in)  config,
type(soilstatetype), intent(in)  soilstate,
integer, intent(in)  iarrfirst,
integer, intent(in)  iarrlast,
integer, intent(in)  dim,
real, dimension(dim), intent(out)  array 
)

Write soil state variables to array.

Parameters
[in]nNumber of subbasins
[in]sizesimulation dimensions
[in]configsimulation configuration
[in]soilstateSoil states
[in]iarrfirstIndex of first array element
[in]iarrlastIndex of last array element
[in]dimNumber of array elements
[out]arrayArray of states
+ Here is the caller graph for this function:

◆ set_stateinfo()

subroutine, public statetype_module::set_stateinfo ( integer, intent(in)  n,
type(statedimensiontype), intent(in)  dim,
type(stateinfotype), dimension(:), intent(inout), allocatable  stateinfo,
type(snowicestatetype), intent(in), target  frozenstate,
type(soilstatetype), intent(in), target  soilstate,
type(aquiferstatetype), intent(in), target  aquiferstate,
type(riverstatetype), intent(in), target  riverstate,
type(lakestatetype), intent(in), target  lakestate,
type(miscstatetype), intent(in), target  miscstate 
)

Allocate state information variable and assign the information.

Consequences Memory will be allocated

Parameters
[in]nNumber of subbasins
[in]dimsimulation dimensions
[in]frozenstateSnow and ice states
[in]soilstateSoil states
[in]aquiferstateAquifer states
[in]riverstateRiver states
[in]lakestateLake states
[in]miscstateMisc states
+ Here is the caller graph for this function: