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

Data Types

type  aquifertype
 
type  basintype
 
type  branchtype
 
type  changeoutvartype
 
type  classbasintype
 
type  classtype
 
type  cropdatatype
 
type  cropirrdatatype
 
type  damtype
 
type  depositiontype
 
type  floodtype
 
type  glaciertype
 
type  iceseasonratingcurvetype
 
type  irrigationtype
 
type  lakebasintype
 
type  lakesectiontype
 
type  modparidtype
 
type  newlaketype
 
type  npcloadtype
 
type  outlettype
 
type  outvaridtype
 
type  pathtype
 
type  pointsourcedatatype
 
type  pointsourcetype
 
type  riverratingtype
 
type  rrcqtype
 
type  rrcw0type
 
type  rrcwtype
 
type  sectorratingcurvetype
 
type  sedimentmanagementtype
 
type  simulationconfigurationtype
 
type  soilleakagedatatype
 
type  sourceapptype
 
type  stateconfigurationtype
 
type  statedimensiontype
 
type  t1loadtype
 
type  timeinformationtype
 
type  updatetype
 
type  watertransfertype
 
type  wetlandtype
 

Functions/Subroutines

subroutine allocate_outvar (nout, noutclass)
 
subroutine set_accload_to_zero ()
 
subroutine accumulate_class_load (isub, varindex, values)
 
subroutine accumulate_basin_load (isub, varindex, values)
 
subroutine deallocate_modvar (n)
 
subroutine deallocate_glacier ()
 
subroutine allocate_modelparameters (ns, nregpar)
 
subroutine allocate_basinvariables (ns)
 
subroutine initialize_simulation_configuration ()
 
subroutine allocate_initialize_modeloptions ()
 
character(len=2) function substance_name (i)
 
subroutine set_update_method_names ()
 
subroutine find_next_watertransfer (i, lastwt, wtindex)
 
subroutine find_next_pointsource (isb, lastps, nps, psdata, nextps)
 
subroutine set_xobsoutvarindex ()
 
subroutine initiate_xobsinformation (array, n)
 
subroutine save_xobsinformation (n, var2, ns)
 
subroutine set_recharge_discharge_classes (n, indata)
 
subroutine calculate_class_discharge_divisor ()
 
logical function isdischargeclass (j)
 
logical function isfirstdischargeclass (j)
 
subroutine set_soildepth_classdata (nlayer, depth, geoclassdata)
 
subroutine set_class_current_soildepth (nlayer, slc, depth)
 
subroutine set_coded_classes (dim, array, ilakearg, olakearg, lriverarg, mriverarg, iwetarg, owetarg)
 
real function, dimension(nsubst) get_current_soilleakage_memory (icl, isub, nsubst)
 
subroutine initiate_cropdata ()
 
subroutine set_cropdataindex (n, id, reg, cindex)
 
subroutine find_croppart (i, j, kcrop, row, part)
 
integer function get_current_petmodel (i)
 
logical function endofday (ts)
 
integer function get_pseudo_dayno (dn, latitude)
 
logical function in_season_end (begjd, endjd)
 
logical function in_season_period (begjd, period)
 
subroutine get_class_wet_deposition (i, ns, iluse, veg, conc)
 
subroutine set_class_deposition (i, ns, iluse, veg, source)
 
integer function get_deposition_vegindex (isubst, idep, veg, iluse)
 
integer function get_deposition_timeindex (isubst, idep)
 
subroutine find_lbtype (isub, ldtype)
 
subroutine find_lakebasins (isub, status)
 
subroutine check_connected_subbasins (i2, i3, isource, ibranch)
 
logical function is_upstream_lakebasin (ldtype)
 
subroutine sum_upstream_area (n, areasum)
 

Variables

character(len=24), parameter model_version_string = '5.29.0'
 
Miscellaneous constant parameters
integer, parameter max_classoutvar = 11
 
integer, parameter some_basinoutvar = 23
 
integer, parameter max_noutvar = 10000
 
integer, parameter maxsoillayers = 3
 
integer, parameter max_pstype = 8
 
integer, parameter max_subid = 9999999
 
integer, parameter maxlakesections = 10
 
real, parameter missing_value = -9999.
 
real, parameter def_min = -1.1E38
 
real, parameter def_max = 1.1E38
 
real, parameter realzero = 1.E-37
 
double precision, parameter doublezero = 1.D-307
 
real, parameter pi = 3.1415927
 
real, parameter solar = 0.0820
 
real, parameter cwater = 4.2
 
real, parameter cice = 2.1
 
real, parameter lfreezing = 335.
 
real, parameter lfreezing2 = 335000.
 
real, parameter lfusion = 334000.
 
real, parameter kice = 2.2
 
real, parameter icedensity = 917.
 
real, parameter dice = 0.917
 
real, parameter waterdensity = 1000.
 
Model parameter dependence type parameters

These codes are used for identifying which model parameter-array to find a specific parameter in.

integer, parameter m_gpar = 1
 
integer, parameter m_spar = 2
 
integer, parameter m_lpar = 3
 
integer, parameter m_bpar = 4
 
integer, parameter m_rpar = 5
 
integer, parameter m_ldpar = 6
 
integer, parameter m_mpar = 7
 
integer, parameter nregiondivisions = 6
 
Output variable type parameters; code for accumulation of data

These codes are used to define how a period value of a variable is calculated.

integer, parameter i_sum = 0
 
integer, parameter i_mean = 1
 
integer, parameter i_wmean = 2
 
integer, parameter i_wmean2 = 3
 
integer, parameter i_end = 4
 
Output variable type parameters; code for class type

These codes are used to define if class values can be had.

integer, parameter i_notdef = 0
 
integer, parameter i_class = 1
 
Output variable type parameters; code for base area for upstream output calculation

These codes are used to define how to calculate upstream value.

integer, parameter i_basin = 1
 
integer, parameter i_land = 2
 
integer, parameter i_scale3 = 3
 
integer, parameter i_scale12 = 4
 
integer, parameter i_scale9 = 5
 
integer, parameter i_scale6 = 6
 
Output variable observation type parameters; code for observation variable
integer, parameter i_recvar = 1
 
integer, parameter i_regrec = 2
 
integer, parameter i_otherrec = 3
 
Global simulation time variables for the time resolution

These variables are used to retrieve the simulation time resolution set by the info file.

integer simtimestep = 0
 
character(len=4) simtimeunit = '?'
 
Variables for configuration of simulation

HYSS make available variables to hold information on the configuration of the simulation.

integer i_in
 
integer i_on
 
integer i_sp
 
integer i_pp
 
integer i_t1
 
integer i_t2
 
integer i_oc
 
integer i_ss
 
integer i_ae
 
integer i_dsi
 
integer i_asi
 
integer, parameter max_substances = 11
 
logical simulatesubstances
 
type(simulationconfigurationtypesimulate
 
type(stateconfigurationtypeconduct
 
logical irrunlimited
 
logical soiliniwet
 
logical conductxoms
 
logical conductwb
 
logical conductregest
 
logical conductbasinpetmodel
 
logical conductbasinlocsoil
 
logical conductwarning
 
logical conducticecurve
 
logical conductdamconstruction
 
integer, parameter p_snowfall = 1
 
integer, parameter p_snowmelt = 2
 
integer, parameter p_lakeriverice = 3
 
integer, parameter p_petmodel = 4
 
integer, parameter p_deepgroundwater = 5
 
integer, parameter p_swtemperature = 6
 
integer, parameter p_snowevap = 7
 
integer, parameter p_growthstart = 8
 
integer, parameter p_floodplain = 9
 
integer, parameter p_snowdensity = 10
 
integer, parameter p_glacierini = 11
 
integer, parameter p_infiltration = 12
 
integer, parameter p_erosion = 13
 
integer, parameter p_wetland = 14
 
integer, parameter p_soilleakage = 15
 
integer, parameter p_snowfalldist = 16
 
integer, parameter p_frozensoil = 17
 
integer, parameter p_snowheat = 18
 
integer, parameter p_surfacerunoff = 19
 
integer, parameter p_connectivity = 20
 
integer, parameter p_siltation = 21
 
integer, parameter p_siltation2 = 22
 
integer, parameter p_sedresusp = 23
 
integer, parameter p_rivermodel = 24
 
integer, parameter p_diffusesource = 25
 
integer, parameter p_t2rivermodel = 26
 
integer, parameter p_redischarge = 27
 
integer, parameter p_t1model = 28
 
integer, parameter p_snowpackreset = 29
 
integer, parameter num_modelprocess = 29
 
character(len=17), dimension(:), allocatable modeloptionname
 
integer, dimension(:), allocatable modeloption
 
integer, dimension(num_modelprocessmaxmodelsinoption
 
character(len=64), dimension(0:maxmodelsinoption(p_petmodel) -1) petmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_snowfall) -1) snowfallmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_snowfalldist) -1) snowfalldistmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_snowmelt) -1) snowmeltmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_lakeriverice) -1) lakerivericemodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_deepgroundwater) -1) deepgroundwatermodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_swtemperature) -1) swtemperaturemodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_snowevap) -1) snowevapmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_growthstart) -1) growthstartmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_floodplain) -1) floodplainmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_snowdensity) -1) snowdensitymodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_glacierini) -1) glacierinimodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_infiltration) -1) infiltrationmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_erosion) -1) erosionmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_wetland) -1) wetlandmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_soilleakage) -1) soilleakmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_frozensoil) -1) frozensoilmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_snowheat) -1) snowheatmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_surfacerunoff) -1) surfacerunoffmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_connectivity) -1) connectivitymodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_siltation) -1) siltationmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_siltation2) -1) siltation2modelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_sedresusp) -1) sedresuspmodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_rivermodel) -1) rivermodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_diffusesource) -1) diffusesourcemodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_t2rivermodel) -1) t2rivermodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_redischarge) -1) redischargemodelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_t1model) -1) t1modelnames
 
character(len=64), dimension(0:maxmodelsinoption(p_snowpackreset) -1) snowpackresetmodelnames
 
Variables for input data

HYSS make available variables to hold input data for simulation, both static geographical data and time series data for forcing the model and for evaluation. Variables ending with suffix i are dependent on subbasin.

real, dimension(:), allocatable tempi
 
real, dimension(:), allocatable preci
 
real, dimension(:), allocatable qobsi
 
real, dimension(:), allocatable wobsi
 
real, dimension(:), allocatable xobsi
 
real, dimension(:), allocatable xoregobsi
 
real, dimension(:), allocatable xcgobsi
 
integer, dimension(:), allocatable wobsindex
 
integer, dimension(:,:), allocatable xobsindex
 
integer, dimension(:,:), allocatable xoregindex
 
integer, dimension(:,:,:), allocatable xcgobsindex
 
real, dimension(:), allocatable snowfraci
 
real, dimension(:), allocatable shortwavei
 
real, dimension(:), allocatable windi
 
real, dimension(:), allocatable uwindi
 
real, dimension(:), allocatable vwindi
 
real, dimension(:), allocatable humidi
 
real, dimension(:), allocatable tmini
 
real, dimension(:), allocatable tmaxi
 
type(basintype), dimension(:), allocatable basin
 
real, dimension(:), allocatable upstreamarea
 
real, dimension(:), allocatable landarea
 
real, dimension(:), allocatable tobselevation
 
real, dimension(:,:), allocatable tilefraction
 
type(damtype), dimension(:), allocatable dam
 
type(newlaketype), dimension(:), allocatable slake
 
type(lakebasintype), dimension(:), allocatable lakebasin
 
type(newlaketype), dimension(:), allocatable elake
 
type(lakesectiontype), dimension(:,:), allocatable lakesectiondata
 
type(pathtype), dimension(:), allocatable path
 
type(pathtype), dimension(:), allocatable pathsubid
 
type(branchtype), dimension(:), allocatable branchdata
 
type(branchtype), dimension(:), allocatable branchsubid
 
type(glaciertype), dimension(:), allocatable glacier
 
type(aquifertype), dimension(:), allocatable aquifer
 
type(npcloadtype), dimension(:), allocatable load
 
type(depositiontypedeposition
 
type(depositiontype), dimension(:), allocatable deposition2
 
type(t1loadtype), dimension(:), allocatable tload
 
type(pointsourcedatatype), dimension(:), allocatable psinfo
 
type(pointsourcetype), dimension(:), allocatable psload
 
type(pointsourcedatatype), dimension(:), allocatable absinfo
 
type(pointsourcetype), dimension(:), allocatable absload
 
type(classbasintype), dimension(:,:), allocatable classbasin
 
real, dimension(:,:,:), allocatable classbasin_wsf
 
type(classtype), dimension(:), allocatable classdata
 
type(cropdatatype), dimension(:), allocatable cropdata
 
type(cropirrdatatype), dimension(:), allocatable cropirrdata
 
type(irrigationtype), dimension(:), allocatable irrigationsystem
 
type(watertransfertype), dimension(:), allocatable watertransfer
 
type(wetlandtype), dimension(:,:), allocatable wetland
 
type(floodtype), dimension(:), allocatable flooding
 
type(soilleakagedatatypesoilleak
 
type(riverratingtype), dimension(:), allocatable rrcdata
 
integer, dimension(:), allocatable petmodel
 
integer, dimension(:,:), allocatable cropindex
 
integer, dimension(:), allocatable damindex
 
integer, dimension(:), allocatable lakeindex
 
integer, dimension(:), allocatable glacierindex
 
integer, dimension(:), allocatable lakebasinindex
 
integer, dimension(:), allocatable floodindex
 
integer, dimension(:), allocatable branchindex
 
logical, dimension(:), allocatable tloadexist
 
Variables for configuration of model set-up

HYSS make available variables to hold information on the configuration of the model set-up.

integer, parameter i_open = 1
 
integer, parameter i_forest = 2
 
integer, parameter i_water = 3
 
real, dimension(:,:), allocatable soildepth
 
real, dimension(:,:), allocatable soilthick
 
type(statedimensiontypestatesize
 
integer nsub
 
integer numsubstances
 
integer ncrop
 
integer nluse
 
integer nsoil
 
integer nclass
 
integer num_classgroup
 
integer numrotations
 
integer nrechargeclasses
 
integer ndischargeclasses
 
integer, dimension(:), allocatable rechargeclasses
 
integer, dimension(:), allocatable dischargeclasses
 
real, dimension(:,:), allocatable rechargefraction
 
real, dimension(:), allocatable disdivisor
 
integer, dimension(:), allocatable regiondivision
 
integer, dimension(nregiondivisionsnregions
 
integer naquifers
 
integer nglaciers
 
integer nwtransfer
 
integer npsused = 0
 
integer nabsused = 0
 
integer, parameter nrivertypes = 2
 
integer, parameter nlaketypes = 2
 
integer, parameter olake_model = 1
 
integer, parameter ilake_model = 2
 
integer, parameter lriver_model = 11
 
integer, parameter mriver_model = 12
 
integer, parameter iwet_model = 13
 
integer, parameter owet_model = 14
 
integer, parameter glacier_model = 3
 
integer, parameter traveltime_model = 5
 
integer, parameter rzleak_model = 6
 
integer, dimension(:,:), allocatable classmodel
 
integer slc_olake
 
integer slc_ilake
 
integer slc_lriver
 
integer slc_mriver
 
integer slc_iwet
 
integer slc_owet
 
Time variables

HYSS make available variables to hold information on time
during simulation run and for model set-up.

type(timeinformationtypecurrent_time
 
integer seconds_per_timestep
 
integer timesteps_per_day
 
logical firstoutstep
 
Output variables

HYSS make available variables to hold output values and information on output variables.

logical conductload
 
integer max_basinoutvar
 
integer num_basinsource
 
integer max_outvar
 
integer max_xobsoutvar
 
type(outvaridtype), dimension(:), allocatable outvarid
 
integer, dimension(:), allocatable xobsoutvarindex
 
integer, dimension(:), allocatable outvarxobsindex
 
integer noutvar
 
integer noutvarclass
 
logical, dimension(:), allocatable outvarstatus
 
real, dimension(:,:), allocatable outvar
 
integer, dimension(:), allocatable outvarindex
 
integer, dimension(:), allocatable outvarclassindex
 
real, dimension(:,:,:), allocatable outvarclassdata
 
real, dimension(:,:,:), allocatable outvarclassfraction
 
type(sourceapptypeaccload
 
type(changeoutvartype), dimension(:), allocatable changecritvar
 
integer, dimension(:), allocatable obsfuncoutvar
 
character(len=6), dimension(max_classoutvar), parameter classloadheadings = ['WetAtm','DryAtm','Fertil','PDecay','RuralA','GrwSIn','IrrSrc','Runoff','RzLay3','RfLay3','RhLay3']
 
character(len=6), dimension(some_basinoutvar+1), parameter basinloadheadings = ['RuralB','Rgrwmr','Wtrans','Rgrwol','A ','B ','C ','D ','E ','F ','G ','H ','I ','J ','K ','L ','MA ','M ','N ','O ','P ','Q ','R ','S ']
 
Model parameter variables

HYSS make available variables to hold information on and values for model parameters.

integer max_par
 
type(modparidtype), dimension(:), allocatable modparid
 
real, dimension(:), allocatable genpar
 
real, dimension(:,:), allocatable basinpar
 
real, dimension(:,:), allocatable, target landpar
 
real, dimension(:,:), allocatable, target soilpar
 
real, dimension(:,:), allocatable, target regpar
 
real, dimension(:,:), allocatable, target monthpar
 
real, dimension(:,:), allocatable lakedatapar_ini
 
real, dimension(:,:), allocatable lakedatapar
 
integer, dimension(:,:), allocatable lakedataparindex
 
Parameters for updating; code and dimension.

Several updating methods exist. These can be used separately or together.

integer, parameter i_quseobs = 1
 
integer, parameter i_tpcorr = 2
 
integer, parameter i_wendupd = 3
 
integer, parameter i_qar = 4
 
integer, parameter i_war = 5
 
integer, parameter i_tncorr = 6
 
integer, parameter i_tnloccorr = 7
 
integer, parameter i_tploccorr = 8
 
integer, parameter i_cuseobs = 9
 
integer, parameter dim_update = 9
 
Variables for updating

HYSS make available variables to hold information on updating. Several different updating functions exist.

logical, dimension(dim_updatedoupdate
 
integer wobsvarindex
 
type(updatetype), dimension(dim_updateuseinupdate
 

Detailed Description

Declaration of model data types and variables.

This is the interface between the model and the simulation system "HYSS". NOTE: everything is public

The module modvar contains data types, constants, variables, and procedures that are HYSS provide for the model. It also holds procedures for allocating and setting its variables and to locate data in them.

The constants define specific numbers, dimensions of arrays, and codes for accumulation period, model parameter dependence and updating methods.

The variables are for holding input data on model set-up, substance modelled, forcing data of current time step, state variables that are common for hydrological models, variables of (current) time, size of model set-up, settings for the model run (e.g. output, model parameter values, updating information), and variables for temporary state transformation.

Function/Subroutine Documentation

◆ accumulate_basin_load()

subroutine modvar::accumulate_basin_load ( integer, intent(in)  isub,
integer, intent(in)  varindex,
real, dimension(numsubstances), intent(in)  values 
)

Accumulate load of variable given by varindex for accumulation of classloads.

◆ accumulate_class_load()

subroutine modvar::accumulate_class_load ( integer, intent(in)  isub,
integer, intent(in)  varindex,
real, dimension(numsubstances,nclass), intent(in)  values 
)

Accumulate load of variable given by varindex for accumulation of classloads.

◆ allocate_basinvariables()

subroutine modvar::allocate_basinvariables ( integer, intent(in)  ns)

Allocate variables for subbasin information.

Consequences Module variables for indata are allocated.

Parameters
[in]nsnumber of subbasins
+ Here is the caller graph for this function:

◆ allocate_initialize_modeloptions()

subroutine modvar::allocate_initialize_modeloptions

Allocate and set model optional structure variable. Use only small letters.

Consequences Module variables for model options are allocated.

+ Here is the caller graph for this function:

◆ allocate_modelparameters()

subroutine modvar::allocate_modelparameters ( integer, intent(in)  ns,
integer, intent(out)  nregpar 
)

Allocate the model parameter variables.

Consequences Six module variables for model parameters are allocated.

Parameters
[in]nsnumber of subbasins
[out]nregparnumber of regional parameters

Algorithm
Calculate number of model parameters of each dependence type

Allocate variables for holding model parameter values

Initialize variables to zero

+ Here is the caller graph for this function:

◆ allocate_outvar()

subroutine modvar::allocate_outvar ( integer, intent(in)  nout,
integer, intent(in)  noutclass 
)

Allocate variables for sending output from model to HYSS.

Consequences Module variables outvar, outvarclassdata, outvarclassfraction, accdata (slcclass and basin) may be allocated.

Parameters
[in]noutnumber of output variables to be calculated
[in]noutclassnumber of output variables to be calculated for classes
[in]noutclassMaximum number of sources types to basin (3 (ruralB,grw,trans) + max_pstypes)
+ Here is the caller graph for this function:

◆ calculate_class_discharge_divisor()

subroutine modvar::calculate_class_discharge_divisor

Initiate variable used for calculation of discharge class.

+ Here is the caller graph for this function:

◆ check_connected_subbasins()

subroutine modvar::check_connected_subbasins ( integer, intent(in)  i2,
integer, intent(in)  i3,
integer, intent(out)  isource,
integer, intent(out)  ibranch 
)

Get direct connection between two subbasins. 0 for no direct connection.

Parameters
[in]i2index of subbasin
[in]i3index of subbasin
[out]isourceindex of upstream subbasin
[out]ibranchindex of branch (1=main,2=branch)

Set upstream lakebasin flag

+ Here is the caller graph for this function:

◆ deallocate_glacier()

subroutine modvar::deallocate_glacier

Deallocate glacier arrays.

Consequences Module variables glacier is deallocated.

+ Here is the caller graph for this function:

◆ deallocate_modvar()

subroutine modvar::deallocate_modvar ( integer, intent(in)  n)

Deallocate modvar arrays.

Consequences A lot of memory is freed.

Parameters
[in]nNumber of subbasins
+ Here is the caller graph for this function:

◆ endofday()

logical function modvar::endofday ( integer, intent(in)  ts)

Checks if last time step of the day.

Parameters
[in]tstimestep of day (tsofday)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ find_croppart()

subroutine modvar::find_croppart ( integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  kcrop,
integer, intent(out)  row,
real, intent(out)  part 
)

Finds the corresponding row in CropData for the given crop and the fraction of the classarea its occupying.

Parameters
[in]iindex of current subbasin
[in]jindex of current class
[in]kcropmain (1) or secondary (2) crop
[out]rowrow in CropData for this crop
[out]partfraction of classarea for this crop

Algorithm
For main crop: get the row from cropindex, areafraction is 1

For secondary crop: get the row from cropindex and areafraction from classbasin

+ Here is the caller graph for this function:

◆ find_lakebasins()

subroutine modvar::find_lakebasins ( integer, intent(in)  isub,
logical, dimension(nsub), intent(out)  status 
)

Find subbasins with lakebasins beloning to this lake.

Parameters
[in]isubindex of subbasin of current lake
[out]statusstatus of lake basins

Set lakebasin subasins found

+ Here is the caller graph for this function:

◆ find_lbtype()

subroutine modvar::find_lbtype ( integer, intent(in)  isub,
integer, intent(out)  ldtype 
)

Get lake data type for lakebasin. 0 for no lake/lakebasin.

Parameters
[in]isubindex of subbasin
[out]ldtypeldtype according to lakedata

Set upstream lakebasin flag

+ Here is the caller graph for this function:

◆ find_next_pointsource()

subroutine modvar::find_next_pointsource ( integer, intent(in)  isb,
integer, intent(in)  lastps,
integer, intent(in)  nps,
type(pointsourcedatatype), dimension(nps), intent(in)  psdata,
integer, intent(out)  nextps 
)

Find (next) point source (index) for current subbasin.

Parameters
[in]isbIndex of subbasin
[in]lastpsIndex of last point source found
[in]npsNumber of point sources
[in]psdataPoint source/abstraction data information
[out]nextpsIndex of next point source
+ Here is the caller graph for this function:

◆ find_next_watertransfer()

subroutine modvar::find_next_watertransfer ( integer, intent(in)  i,
integer, intent(in)  lastwt,
integer, intent(out)  wtindex 
)

Find (new) water transfer (index) for current subbasin.

Parameters
[in]iIndex of subbasin
[in]lastwtIndex of last water transfer found
[out]wtindexIndex of next water transfer
+ Here is the caller graph for this function:

◆ get_class_wet_deposition()

subroutine modvar::get_class_wet_deposition ( integer, intent(in)  i,
integer, intent(in)  ns,
integer, intent(in)  iluse,
integer, intent(in)  veg,
real, dimension(ns), intent(out)  conc 
)

Get class dry deposition of class.

Parameters
[in]iindex of current subbasin
[in]nsnumber of substances, array dimension
[in]iluseindex landuse
[in]vegvegetation type: 1=open,2=forest,3=water
[out]concwet deposition concentration (mg/L for IN)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_current_petmodel()

integer function modvar::get_current_petmodel ( integer, intent(in)  i)

Get the pet model for the current subbasin.

Parameters
[in]icurrent subbasin
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_current_soilleakage_memory()

real function, dimension(nsubst) modvar::get_current_soilleakage_memory ( integer, intent(in)  icl,
integer, intent(in)  isub,
integer, intent(in)  nsubst 
)

Gets current soil leakage concentration.

Parameters
[in]iclcurrent class
[in]isubcurrent subbasin
[in]nsubstnumber of substances
Returns
current soil leakage output

Monthly soilleakage concentrations

Or monthly soilleakage load

Or constant soilleakage load or concentration

Or monthly soilleakage load or concentration

+ Here is the caller graph for this function:

◆ get_deposition_timeindex()

integer function modvar::get_deposition_timeindex ( integer, intent(in)  isubst,
integer, intent(in)  idep 
)

Get time index of deposition for class.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_deposition_vegindex()

integer function modvar::get_deposition_vegindex ( integer, intent(in)  isubst,
integer, intent(in)  idep,
integer, intent(in)  veg,
integer, intent(in)  iluse 
)

Get vegetation index of deposition for class.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_pseudo_dayno()

integer function modvar::get_pseudo_dayno ( integer, intent(in)  dn,
real, intent(in)  latitude 
)

Calculate pseudo daynumber starting July 1 on southern hemisphere.

Parameters
[in]dnJulian day number (1=1 Jan)
[in]latitudelatitude in degrees [-90,90]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ in_season_end()

logical function modvar::in_season_end ( integer, intent(in)  begjd,
integer, intent(in)  endjd 
)

Function to check day in given period End is a fixed dayno. It is not assumed to be larger than begin day, but can be. A smaller end than begin assume the period is over new year.

Parameters
[in]begjdjulian day number of beginning of season
[in]endjdjulian day number of ending of season
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ in_season_period()

logical function modvar::in_season_period ( integer, intent(in)  begjd,
integer, intent(in)  period 
)

Function to check day in given period End dayno is varying with leapyear. Begin dayno assumed less than 366.

Parameters
[in]begjdjulian day number of beginning of season
[in]periodlength of period in days
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialize_simulation_configuration()

subroutine modvar::initialize_simulation_configuration

Initialize model simulation configuration variable with default values

+ Here is the caller graph for this function:

◆ initiate_cropdata()

subroutine modvar::initiate_cropdata

Initiate CropData variables to zero.

Consequences Module variable cropdata are set.

+ Here is the caller graph for this function:

◆ initiate_xobsinformation()

subroutine modvar::initiate_xobsinformation ( integer, dimension(:,:), intent(inout), allocatable  array,
integer, intent(in)  n 
)

Initiate information about other observation series than PTQ.

Consequences Module index array (xobsindex) is allocated and initialized. For ASCII files (netcdf

Parameters
[in,out]arrayIndex array
[in]nNumber of subbasins/outregions
+ Here is the caller graph for this function:

◆ is_upstream_lakebasin()

logical function modvar::is_upstream_lakebasin ( integer, intent(in)  ldtype)

Check for upstream lakebasin.

Parameters
[in]ldtypeldtype according to lakedata

Set upstream lakebasin flag

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isdischargeclass()

logical function modvar::isdischargeclass ( integer, intent(in)  j)

Check if class is discharge class.

Parameters
[in]jclass index
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isfirstdischargeclass()

logical function modvar::isfirstdischargeclass ( integer, intent(in)  j)

Check if class is discharge class, and the one with lowest index.

Parameters
[in]jclass index
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save_xobsinformation()

subroutine modvar::save_xobsinformation ( integer, intent(in)  n,
integer, dimension(n,2), intent(in)  var2,
integer, intent(in)  ns 
)

Save information about finding other observation series.

Consequences Module index array (xobsindex) is set.

Parameters
[in]nNumber of columns in Xobs
[in]var2Variables and subid for Xobs columns
[in]nsNumber of subbasins
+ Here is the caller graph for this function:

◆ set_accload_to_zero()

subroutine modvar::set_accload_to_zero

Set variables for accumulation of loads to zero to (re)start accumulation.

+ Here is the caller graph for this function:

◆ set_class_current_soildepth()

subroutine modvar::set_class_current_soildepth ( integer, intent(in)  nlayer,
integer, intent(in)  slc,
real, dimension(nlayer), intent(in)  depth 
)

Calculate the soil layer depth and thicknesses for a class, based on given soil depths.

Consequences Module variable soildepth and soilthick are allocated and set.

Parameters
[in]nlayernumber of soil layers
[in]slcclass index
[in]depthsoil layer depth (m)
+ Here is the caller graph for this function:

◆ set_class_deposition()

subroutine modvar::set_class_deposition ( integer, intent(in)  i,
integer, intent(in)  ns,
integer, intent(in)  iluse,
integer, intent(in)  veg,
real, dimension(ns), intent(out)  source 
)

Set class dry deposition of class.

Parameters
[in]iindex of current subbasin
[in]nsnumber of substances, array dimension
[in]iluseindex landuse
[in]vegvegetation type: 1=open,2=forest,3=water
[out]sourcedry deposition (kg/km2/timestep)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_coded_classes()

subroutine modvar::set_coded_classes ( integer, intent(in)  dim,
real, dimension(dim), intent(in)  array,
integer, intent(out), optional  ilakearg,
integer, intent(out), optional  olakearg,
integer, intent(out), optional  lriverarg,
integer, intent(out), optional  mriverarg,
integer, intent(out), optional  iwetarg,
integer, intent(out), optional  owetarg 
)

Find special coded classes.

Consequences Module variable slc_ilake, slc_olake, slc_lriver slc_mriver, slc_iwet, and slc_owet are set, as is classmodel.

Parameters
[in]dimnclass
[in]arrayspecial class column from GeoClass/ClassData
[out]ilakeargclass index for ilake
[out]olakeargclass index for olake
[out]lriverargclass index for local river
[out]mriverargclass index for main river
[out]iwetargclass index for iwet
[out]owetargclass index for owet

Algorithm
Set special model code for all classes

Set coded surface water classes for SourceApp

+ Here is the caller graph for this function:

◆ set_cropdataindex()

subroutine modvar::set_cropdataindex ( integer, intent(in)  n,
integer, dimension(n), intent(in)  id,
integer, dimension(n), intent(in)  reg,
integer, dimension(:,:), intent(inout), allocatable  cindex 
)

Set the index variable for CropData.

Consequences Module variable cropindex may be allocated.

Parameters
[in]nnumber of crops/rows in CropData
[in]idcropid
[in]regregion
[in,out]cindexcropindex
+ Here is the caller graph for this function:

◆ set_recharge_discharge_classes()

subroutine modvar::set_recharge_discharge_classes ( integer, intent(in)  n,
real, dimension(n), intent(in)  indata 
)

Calculate and set recharge and discharge classes ClassData.

Consequences Module variable rechargeclasses, nrechargeclasses, dischargeclasses and ndischargeclasses may be allocated and set.

Parameters
[in]nnumber of classes, nclass
[in]indatadata on recharge/discharge
+ Here is the caller graph for this function:

◆ set_soildepth_classdata()

subroutine modvar::set_soildepth_classdata ( integer, intent(in)  nlayer,
real, dimension(nlayer), intent(in)  depth,
type(classtype geoclassdata 
)

Calculate and set the soil layer depth from GeoClass.

Consequences Module variable classdatasoildepth is set.

Parameters
[in]nlayernumber of soil layers
[in]depthsoil layer depth (m)
geoclassdatavariable holding class characteristics
+ Here is the caller graph for this function:

◆ set_update_method_names()

subroutine modvar::set_update_method_names

Set update method names.

Consequences Module variable useinupdate are set.

+ Here is the caller graph for this function:

◆ set_xobsoutvarindex()

subroutine modvar::set_xobsoutvarindex

Set variable for finding xobs in outvarid and the opposite Consequences Module index arrays are set.

+ Here is the caller graph for this function:

◆ substance_name()

character(len=2) function modvar::substance_name ( integer, intent(in)  i)

Allocate and set substance variable

Parameters
[in]iIndex of substance
Returns
Name of substance
+ Here is the caller graph for this function:

◆ sum_upstream_area()

subroutine modvar::sum_upstream_area ( integer, intent(in)  n,
real, dimension(n), intent(out)  areasum 
)

Subroutine for summation of the area upstream of the outlet of all subbasins of the catchment. Uses modvar variables: basin, branchdata, branchindex and path.

Parameters
[in]nnumber of subbasins
[out]areasumupstream area (m2)

Variable Documentation

◆ absinfo

type(pointsourcedatatype), dimension(:), allocatable modvar::absinfo

Information of abstraction as time series.

◆ absload

type(pointsourcetype), dimension(:), allocatable modvar::absload

Abstraction as time series.

◆ accload

type(sourceapptype) modvar::accload

Variable for accumulation of load for later source apportionment.

◆ aquifer

type(aquifertype), dimension(:), allocatable modvar::aquifer

Aquifer characteristics.

◆ basin

type(basintype), dimension(:), allocatable modvar::basin

Basin characteristics.

◆ basinloadheadings

character(len=6), dimension(some_basinoutvar+1), parameter modvar::basinloadheadings = ['RuralB','Rgrwmr','Wtrans','Rgrwol','A ','B ','C ','D ','E ','F ','G ','H ','I ','J ','K ','L ','MA ','M ','N ','O ','P ','Q ','R ','S ']

heading for load-files

◆ basinpar

real, dimension(:,:), allocatable modvar::basinpar

parameter values for each subbasin

◆ branchdata

type(branchtype), dimension(:), allocatable modvar::branchdata

Subbasin branch coupling with index.

◆ branchindex

integer, dimension(:), allocatable modvar::branchindex

Index find branched subbasins.

◆ branchsubid

type(branchtype), dimension(:), allocatable modvar::branchsubid

Subbasin branch coupling with subid (read from file)

◆ changecritvar

type(changeoutvartype), dimension(:), allocatable modvar::changecritvar

variable to tell which variables to use for criteria calculation instead of those given as input

◆ cice

real, parameter modvar::cice = 2.1

Heat capacity of ice, kJ/kg/C.

◆ classbasin

type(classbasintype), dimension(:,:), allocatable modvar::classbasin

Basic subbasin characteristics that is class dependent.

◆ classbasin_wsf

real, dimension(:,:,:), allocatable modvar::classbasin_wsf

Windstrahl coefficient for snow distribution for class, subbasin, and wind direction.

◆ classdata

type(classtype), dimension(:), allocatable modvar::classdata

Class characteristics.

◆ classloadheadings

character(len=6), dimension(max_classoutvar), parameter modvar::classloadheadings = ['WetAtm','DryAtm','Fertil','PDecay','RuralA','GrwSIn','IrrSrc','Runoff','RzLay3','RfLay3','RhLay3']

heading for load-files

◆ classmodel

integer, dimension(:,:), allocatable modvar::classmodel

Type of class and substance model for class.

◆ conduct

type(stateconfigurationtype) modvar::conduct

configuration of states for simulation

◆ conductbasinlocsoil

logical modvar::conductbasinlocsoil

Flag for using different rural flow to soil (locsoil) for each basin.

◆ conductbasinpetmodel

logical modvar::conductbasinpetmodel

Flag for using different petmodel for each basin.

◆ conductdamconstruction

logical modvar::conductdamconstruction

Status for building or removing dams during simulation period.

◆ conducticecurve

logical modvar::conducticecurve

Status for using river water level ice curves, default is TRUE.

◆ conductload

logical modvar::conductload

flag for calculation of NP etc. load for source apportionment

◆ conductregest

logical modvar::conductregest

Flag for activation of regional parameter estimation.

◆ conductwarning

logical modvar::conductwarning

Status for warning output to hyss.log.

◆ conductwb

logical modvar::conductwb

Status if water balance output should be calculated and written.

◆ conductxoms

logical modvar::conductxoms

Status if XobsXOMN or XobsXOSN-files should be read.

◆ connectivitymodelnames

character(len=64), dimension(0:maxmodelsinoption(p_connectivity)-1) modvar::connectivitymodelnames

Connectivity names.

◆ cropdata

type(cropdatatype), dimension(:), allocatable modvar::cropdata

Crop characteristics.

◆ cropindex

integer, dimension(:,:), allocatable modvar::cropindex

Index find cropdata for class/region.

◆ cropirrdata

type(cropirrdatatype), dimension(:), allocatable modvar::cropirrdata

Crop characteristics regarding irrigation.

◆ current_time

type(timeinformationtype) modvar::current_time

Current date and other information on current time.

◆ cwater

real, parameter modvar::cwater = 4.2

Heat capacity of water, kJ/kg/C.

◆ dam

type(damtype), dimension(:), allocatable modvar::dam

Dam characteristics.

◆ damindex

integer, dimension(:), allocatable modvar::damindex

Index find dam for subbasin.

◆ deepgroundwatermodelnames

character(len=64), dimension(0:maxmodelsinoption(p_deepgroundwater)-1) modvar::deepgroundwatermodelnames

Deepgroundwater names.

◆ def_max

real, parameter modvar::def_max = 1.1E38

default maximum value for state variables

◆ def_min

real, parameter modvar::def_min = -1.1E38

default minimum value for state variables

◆ deposition

type(depositiontype) modvar::deposition

Loads of nitrogen from atmospheric deposition.

◆ deposition2

type(depositiontype), dimension(:), allocatable modvar::deposition2

Atmospheric deposition of substances (numsubstances)

◆ dice

real, parameter modvar::dice = 0.917

Density of ice, kg/dm3, g/cm3.

◆ diffusesourcemodelnames

character(len=64), dimension(0:maxmodelsinoption(p_diffusesource)-1) modvar::diffusesourcemodelnames

diffuse source model names

◆ dim_update

integer, parameter modvar::dim_update = 9

Number of updating methods (for array dimension)

◆ dischargeclasses

integer, dimension(:), allocatable modvar::dischargeclasses

Class index of discharge classes.

◆ disdivisor

real, dimension(:), allocatable modvar::disdivisor

Fraction of basin area that is discharge classes.

◆ doublezero

double precision, parameter modvar::doublezero = 1.D-307

Value of zero in double precision.

◆ doupdate

logical, dimension(dim_update) modvar::doupdate

status of update functions

◆ elake

type(newlaketype), dimension(:), allocatable modvar::elake

Lake characteristics, multibasin lakes.

◆ erosionmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_erosion)-1) modvar::erosionmodelnames

Erosion names.

◆ firstoutstep

logical modvar::firstoutstep

Flag for first timestep with print out.

◆ floodindex

integer, dimension(:), allocatable modvar::floodindex

Index find floodplain for subbasin.

◆ flooding

type(floodtype), dimension(:), allocatable modvar::flooding

Flood water bodies characteristics.

◆ floodplainmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_floodplain)-1) modvar::floodplainmodelnames

Floodplain names.

◆ frozensoilmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_frozensoil)-1) modvar::frozensoilmodelnames

frozensoil names

◆ genpar

real, dimension(:), allocatable modvar::genpar

parameter values, general for whole model set up

◆ glacier

type(glaciertype), dimension(:), allocatable modvar::glacier

Glacier characteristics.

◆ glacier_model

integer, parameter modvar::glacier_model = 3

Class model code for glacier soil model.

◆ glacierindex

integer, dimension(:), allocatable modvar::glacierindex

Index find glacier for subbasin.

◆ glacierinimodelnames

character(len=64), dimension(0:maxmodelsinoption(p_glacierini)-1) modvar::glacierinimodelnames

Glacierini names.

◆ growthstartmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_growthstart)-1) modvar::growthstartmodelnames

Growthstart names.

◆ humidi

real, dimension(:), allocatable modvar::humidi

Relative humidity [0-1] for current time step.

◆ i_ae

integer modvar::i_ae

index of variable, (suspended) algae (nitrogen)

◆ i_asi

integer modvar::i_asi

index of variable, (suspended) algae (silica)

◆ i_basin

integer, parameter modvar::i_basin = 1

Type of output variable, represent whole subbasin area.

◆ i_class

integer, parameter modvar::i_class = 1

Type of output variable, calculated from class values.

◆ i_cuseobs

integer, parameter modvar::i_cuseobs = 9

Code for updating method, subbasin outflow concentration replacement.

◆ i_dsi

integer modvar::i_dsi

index of variable, dissolved silica

◆ i_end

integer, parameter modvar::i_end = 4

Type of output variable, value as is the last timestep of the period.

◆ i_forest

integer, parameter modvar::i_forest = 2

Vegetation type code for forested land classes.

◆ i_in

integer modvar::i_in

index of variable, inorganic nitrogen

◆ i_land

integer, parameter modvar::i_land = 2

Type of output variable, represent land area.

◆ i_mean

integer, parameter modvar::i_mean = 1

Type of output variable, mean over period.

◆ i_notdef

integer, parameter modvar::i_notdef = 0

Type of output variable, set once, not class dependent.

◆ i_oc

integer modvar::i_oc

index of variable, (dissolved) organic carbon

◆ i_on

integer modvar::i_on

index of variable, organic nitrogen

◆ i_open

integer, parameter modvar::i_open = 1

Vegetation type code for open land classes.

◆ i_otherrec

integer, parameter modvar::i_otherrec = 3

Type of output variable, observation variable (other), aka rout.

◆ i_pp

integer modvar::i_pp

index of variable, particulate phosphorus

◆ i_qar

integer, parameter modvar::i_qar = 4

Code for updating method, subbasin outflow Q-station AR-updating.

◆ i_quseobs

integer, parameter modvar::i_quseobs = 1

Code for updating method, subbasin outflow Q-station updating.

◆ i_recvar

integer, parameter modvar::i_recvar = 1

Type of output variable, observation variable (all in Xobs at a start)

◆ i_regrec

integer, parameter modvar::i_regrec = 2

Type of output variable, observation variable (all in Xoregobs at a start), aka qrin.

◆ i_scale12

integer, parameter modvar::i_scale12 = 4

Type of output variable, scaling factor 10^12.

◆ i_scale3

integer, parameter modvar::i_scale3 = 3

Type of output variable, scaling factor 10^3.

◆ i_scale6

integer, parameter modvar::i_scale6 = 6

Type of output variable, scaling factor 10^6.

◆ i_scale9

integer, parameter modvar::i_scale9 = 5

Type of output variable, scaling factor 10^9.

◆ i_sp

integer modvar::i_sp

index of variable, soluble (reactive) phosphorus, i.e. phosphate

◆ i_ss

integer modvar::i_ss

index of variable, suspended sediments

◆ i_sum

integer, parameter modvar::i_sum = 0

Type of output variable, sum over period.

◆ i_t1

integer modvar::i_t1

index of variable, conservative substance 1

◆ i_t2

integer modvar::i_t2

index of variable, tracer 2, water temperature

◆ i_tncorr

integer, parameter modvar::i_tncorr = 6

Code for updating method, updating of total nitrogen out of subbasin.

◆ i_tnloccorr

integer, parameter modvar::i_tnloccorr = 7

Code for updating method, updating of total nitrogen locally out of subbasin.

◆ i_tpcorr

integer, parameter modvar::i_tpcorr = 2

Code for updating method, updating of total phosphorus out of subbasin.

◆ i_tploccorr

integer, parameter modvar::i_tploccorr = 8

Code for updating method, updating of total phosphorus locally out of subbasin.

◆ i_war

integer, parameter modvar::i_war = 5

Code for updating method, subbasin outflow Q updating based on AR on w-error.

◆ i_water

integer, parameter modvar::i_water = 3

Vegetation type code for water classes.

◆ i_wendupd

integer, parameter modvar::i_wendupd = 3

Code for updating method, updating of outlet lake water stage at end of time step.

◆ i_wmean

integer, parameter modvar::i_wmean = 2

Type of output variable, weighted mean over period.

◆ i_wmean2

integer, parameter modvar::i_wmean2 = 3

Type of output variable, weighted mean over period.

◆ icedensity

real, parameter modvar::icedensity = 917.

Density of ice, kg/m3.

◆ ilake_model

integer, parameter modvar::ilake_model = 2

Class model code for internal lake, ilake.

◆ infiltrationmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_infiltration)-1) modvar::infiltrationmodelnames

Infiltration names.

◆ irrigationsystem

type(irrigationtype), dimension(:), allocatable modvar::irrigationsystem

Irrigation characteristics.

◆ irrunlimited

logical modvar::irrunlimited

If true, simulate unlimited irrigation, else withdraw from actual sources.

◆ iwet_model

integer, parameter modvar::iwet_model = 13

Class model code for internal wetland, iwet.

◆ kice

real, parameter modvar::kice = 2.2

Thermal conductivity of ice, W/m/K (freshwater blackice)

◆ lakebasin

type(lakebasintype), dimension(:), allocatable modvar::lakebasin

Lakebasin characteristics.

◆ lakebasinindex

integer, dimension(:), allocatable modvar::lakebasinindex

Index find lakebasin for subbasin.

◆ lakedatapar

real, dimension(:,:), allocatable modvar::lakedatapar

current parameter values for lakes (from LakeData.txt and par.txt)

◆ lakedatapar_ini

real, dimension(:,:), allocatable modvar::lakedatapar_ini

parameter values from LakeData.txt

◆ lakedataparindex

integer, dimension(:,:), allocatable modvar::lakedataparindex

table giving for each subbasin ilake and olake the row where the lake-related parameters are to be found in lakedatapar

◆ lakeindex

integer, dimension(:), allocatable modvar::lakeindex

Index find lake for subbasin.

◆ lakerivericemodelnames

character(len=64), dimension(0:maxmodelsinoption(p_lakeriverice)-1) modvar::lakerivericemodelnames

Lakerivericemodel names.

◆ lakesectiondata

type(lakesectiontype), dimension(:,:), allocatable modvar::lakesectiondata

Lake section data (laketype 1)

◆ landarea

real, dimension(:), allocatable modvar::landarea

land area [m2] (including floodplains, excluding wetlands)

◆ landpar

real, dimension(:,:), allocatable, target modvar::landpar

parameter values for each land use

◆ lfreezing

real, parameter modvar::lfreezing = 335.

Latent heat of freezing, kJ/kg (for ice and snow)

◆ lfreezing2

real, parameter modvar::lfreezing2 = 335000.

Latent heat of freezing, J/kg (for ice and snow)

◆ lfusion

real, parameter modvar::lfusion = 334000.

Latent heat of fusion, J/kg (for liqfrac of soil)

◆ load

type(npcloadtype), dimension(:), allocatable modvar::load

Loads of nitrogen and phosphorus from point sources and local diffuse load.

◆ lriver_model

integer, parameter modvar::lriver_model = 11

Class model code for local stream, lriver.

◆ m_bpar

integer, parameter modvar::m_bpar = 4

Code for basin dependent parameter type.

◆ m_gpar

integer, parameter modvar::m_gpar = 1

Code for general parameter type.

◆ m_ldpar

integer, parameter modvar::m_ldpar = 6

Code for lake specific parameter imported from LakeData.txt.

◆ m_lpar

integer, parameter modvar::m_lpar = 3

Code for land use dependent parameter type.

◆ m_mpar

integer, parameter modvar::m_mpar = 7

Code for monthly dependent parameters.

◆ m_rpar

integer, parameter modvar::m_rpar = 5

Code for parameter region dependent parameter type.

◆ m_spar

integer, parameter modvar::m_spar = 2

Code for soil type dependent parameter type.

◆ max_basinoutvar

integer modvar::max_basinoutvar

Number of basin load output variables, some_basinoutvar + ps + ruralb.

◆ max_classoutvar

integer, parameter modvar::max_classoutvar = 11

Number of class load output variables.

◆ max_noutvar

integer, parameter modvar::max_noutvar = 10000

Maximum output variables to be calculated.

◆ max_outvar

integer modvar::max_outvar

number of defined output variables, set in define_output_variables

◆ max_par

integer modvar::max_par

maximum number of defined model parameters

◆ max_pstype

integer, parameter modvar::max_pstype = 8

Maximum number of point sources types.

◆ max_subid

integer, parameter modvar::max_subid = 9999999

Maximum value of subid.

◆ max_substances

integer, parameter modvar::max_substances = 11

maximum number of substances that can be simulated

◆ max_xobsoutvar

integer modvar::max_xobsoutvar

number of output variables that is Xobs variables, set in define_output_variables

◆ maxlakesections

integer, parameter modvar::maxlakesections = 10

Maximum number of lake type 1 sections for connectivity (fill-and-spill) model.

◆ maxmodelsinoption

integer, dimension(num_modelprocess) modvar::maxmodelsinoption

◆ maxsoillayers

integer, parameter modvar::maxsoillayers = 3

Maximum number of soil layers.

◆ missing_value

real, parameter modvar::missing_value = -9999.

Value used for missing value.

◆ model_version_string

character(len=24), parameter modvar::model_version_string = '5.29.0'

String with model version number.

◆ modeloption

integer, dimension(:), allocatable modvar::modeloption

◆ modeloptionname

character(len=17), dimension(:), allocatable modvar::modeloptionname

◆ modparid

type(modparidtype), dimension(:), allocatable modvar::modparid

information of model parameters for this model

◆ monthpar

real, dimension(:,:), allocatable, target modvar::monthpar

parameter values for each month

◆ mriver_model

integer, parameter modvar::mriver_model = 12

Class model code for main river, mriver.

◆ nabsused

integer modvar::nabsused = 0

Number of abstractions with time series.

◆ naquifers

integer modvar::naquifers

Number of aquifers.

◆ nclass

integer modvar::nclass

Number of slc-classes GeoClass.

◆ ncrop

integer modvar::ncrop

Number of crops (rows) in CropData.txt.

◆ ndischargeclasses

integer modvar::ndischargeclasses

Number of discharge classes.

◆ nglaciers

integer modvar::nglaciers

Number of glaciers.

◆ nlaketypes

integer, parameter modvar::nlaketypes = 2

◆ nluse

integer modvar::nluse

Number of land uses in GeoClass. (max number)

◆ noutvar

integer modvar::noutvar

number of used output variables to be set

◆ noutvarclass

integer modvar::noutvarclass

number of used output variables for classes to be set

◆ npsused

integer modvar::npsused = 0

Number of pointsources with time series.

◆ nrechargeclasses

integer modvar::nrechargeclasses

Number of recharge classes.

◆ nregiondivisions

integer, parameter modvar::nregiondivisions = 6

◆ nregions

integer, dimension(nregiondivisions) modvar::nregions

Number of parameter regions in parregion.

◆ nrivertypes

integer, parameter modvar::nrivertypes = 2

◆ nsoil

integer modvar::nsoil

Number of soil types in GeoClass. (max number)

◆ nsub

integer modvar::nsub

Number of subbasins in current run.

◆ num_basinsource

integer modvar::num_basinsource

Maximum number of sources types to basin (3 (ruralB,grw,trans) + max_pstypes)

◆ num_classgroup

integer modvar::num_classgroup

Number of class groups in GeoClass.

◆ num_modelprocess

integer, parameter modvar::num_modelprocess = 29

◆ numrotations

integer modvar::numrotations

Number of crop rotation class groups.

◆ numsubstances

integer modvar::numsubstances

Number of substances currently modelled.

◆ nwtransfer

integer modvar::nwtransfer

Number of water transfers (in MgmtData)

◆ obsfuncoutvar

integer, dimension(:), allocatable modvar::obsfuncoutvar

index to find outvar for special variables used for regional obsfunc calculations

◆ olake_model

integer, parameter modvar::olake_model = 1

Class model code for outlet lake, olake.

◆ outvar

real, dimension(:,:), allocatable modvar::outvar

variable to save output for print out in

◆ outvarclassdata

real, dimension(:,:,:), allocatable modvar::outvarclassdata

class values for variable to save output for

◆ outvarclassfraction

real, dimension(:,:,:), allocatable modvar::outvarclassfraction

class weights(area fractions) for variable to save output for

◆ outvarclassindex

integer, dimension(:), allocatable modvar::outvarclassindex

index to find outvar for idindex for class output (max_outvar)

◆ outvarid

type(outvaridtype), dimension(:), allocatable modvar::outvarid

information of output variables for this model

◆ outvarindex

integer, dimension(:), allocatable modvar::outvarindex

index to find outvar for idindex for subbasin output (max_outvar)

◆ outvarstatus

logical, dimension(:), allocatable modvar::outvarstatus

status of outvar to calculate for print out (max_outvar)

◆ outvarxobsindex

integer, dimension(:), allocatable modvar::outvarxobsindex

◆ owet_model

integer, parameter modvar::owet_model = 14

Class model code for outlet wetland, owet.

◆ p_connectivity

integer, parameter modvar::p_connectivity = 20

◆ p_deepgroundwater

integer, parameter modvar::p_deepgroundwater = 5

◆ p_diffusesource

integer, parameter modvar::p_diffusesource = 25

◆ p_erosion

integer, parameter modvar::p_erosion = 13

◆ p_floodplain

integer, parameter modvar::p_floodplain = 9

◆ p_frozensoil

integer, parameter modvar::p_frozensoil = 17

◆ p_glacierini

integer, parameter modvar::p_glacierini = 11

◆ p_growthstart

integer, parameter modvar::p_growthstart = 8

◆ p_infiltration

integer, parameter modvar::p_infiltration = 12

◆ p_lakeriverice

integer, parameter modvar::p_lakeriverice = 3

◆ p_petmodel

integer, parameter modvar::p_petmodel = 4

◆ p_redischarge

integer, parameter modvar::p_redischarge = 27

◆ p_rivermodel

integer, parameter modvar::p_rivermodel = 24

◆ p_sedresusp

integer, parameter modvar::p_sedresusp = 23

◆ p_siltation

integer, parameter modvar::p_siltation = 21

◆ p_siltation2

integer, parameter modvar::p_siltation2 = 22

◆ p_snowdensity

integer, parameter modvar::p_snowdensity = 10

◆ p_snowevap

integer, parameter modvar::p_snowevap = 7

◆ p_snowfall

integer, parameter modvar::p_snowfall = 1

◆ p_snowfalldist

integer, parameter modvar::p_snowfalldist = 16

◆ p_snowheat

integer, parameter modvar::p_snowheat = 18

◆ p_snowmelt

integer, parameter modvar::p_snowmelt = 2

◆ p_snowpackreset

integer, parameter modvar::p_snowpackreset = 29

◆ p_soilleakage

integer, parameter modvar::p_soilleakage = 15

◆ p_surfacerunoff

integer, parameter modvar::p_surfacerunoff = 19

◆ p_swtemperature

integer, parameter modvar::p_swtemperature = 6

◆ p_t1model

integer, parameter modvar::p_t1model = 28

◆ p_t2rivermodel

integer, parameter modvar::p_t2rivermodel = 26

◆ p_wetland

integer, parameter modvar::p_wetland = 14

◆ path

type(pathtype), dimension(:), allocatable modvar::path

Subbasin coupling with index.

◆ pathsubid

type(pathtype), dimension(:), allocatable modvar::pathsubid

Subbasin coupling with subid (read from file)

◆ petmodel

integer, dimension(:), allocatable modvar::petmodel

PET model given for subbasin.

◆ petmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_petmodel)-1) modvar::petmodelnames

PETmodel names.

◆ pi

real, parameter modvar::pi = 3.1415927

Mathematical constant pi.

◆ preci

real, dimension(:), allocatable modvar::preci

Precipitaion data for current time step.

◆ psinfo

type(pointsourcedatatype), dimension(:), allocatable modvar::psinfo

Information of point sources as time series.

◆ psload

type(pointsourcetype), dimension(:), allocatable modvar::psload

Load of point sources as time series.

◆ qobsi

real, dimension(:), allocatable modvar::qobsi

Runoff data for current time step.

◆ realzero

real, parameter modvar::realzero = 1.E-37

Value of zero in real.

◆ rechargeclasses

integer, dimension(:), allocatable modvar::rechargeclasses

Class index of recharge classes.

◆ rechargefraction

real, dimension(:,:), allocatable modvar::rechargefraction

Fraction of runoff from subbasin's recharge classes that goes to discharge classes (typically wetlands) of the subbasin (nclass,nsub)

◆ redischargemodelnames

character(len=64), dimension(0:maxmodelsinoption(p_redischarge)-1) modvar::redischargemodelnames

Recharge/discharge model.

◆ regiondivision

integer, dimension(:), allocatable modvar::regiondivision

parameter region division for each parameter (nregpar)

◆ regpar

real, dimension(:,:), allocatable, target modvar::regpar

parameter values for each parregion

◆ rivermodelnames

character(len=64), dimension(0:maxmodelsinoption(p_rivermodel)-1) modvar::rivermodelnames

river flow model names

◆ rrcdata

type(riverratingtype), dimension(:), allocatable modvar::rrcdata

◆ rzleak_model

integer, parameter modvar::rzleak_model = 6

Class model code for root zone leakage soil model.

◆ seconds_per_timestep

integer modvar::seconds_per_timestep

Number of seconds for one time step.

◆ sedresuspmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_sedresusp)-1) modvar::sedresuspmodelnames

sedimentation/resuspension names

◆ shortwavei

real, dimension(:), allocatable modvar::shortwavei

Shortwave (downwards) radiation [MJ/m2/ts] for current time step.

◆ siltation2modelnames

character(len=64), dimension(0:maxmodelsinoption(p_siltation2)-1) modvar::siltation2modelnames

siltation names

◆ siltationmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_siltation)-1) modvar::siltationmodelnames

siltation names

◆ simtimestep

integer modvar::simtimestep = 0

Simulation timestep.

◆ simtimeunit

character(len=4) modvar::simtimeunit = '?'

Simulation timeunit.

◆ simulate

type(simulationconfigurationtype) modvar::simulate

configuration of simulation

◆ simulatesubstances

logical modvar::simulatesubstances

status of substance simulations (numsubstances>0)

◆ slake

type(newlaketype), dimension(:), allocatable modvar::slake

Lake characteristics, single olakes.

◆ slc_ilake

integer modvar::slc_ilake

Class index for local lake.

◆ slc_iwet

integer modvar::slc_iwet

Class index for iwet, internal wetland.

◆ slc_lriver

integer modvar::slc_lriver

Class index for local river.

◆ slc_mriver

integer modvar::slc_mriver

Class index for main river.

◆ slc_olake

integer modvar::slc_olake

Class index for outlet lake.

◆ slc_owet

integer modvar::slc_owet

Class index for owet, outlet wetland.

◆ snowdensitymodelnames

character(len=64), dimension(0:maxmodelsinoption(p_snowdensity)-1) modvar::snowdensitymodelnames

Snowdensity names.

◆ snowevapmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_snowevap)-1) modvar::snowevapmodelnames

Snowevap names.

◆ snowfalldistmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_snowfalldist)-1) modvar::snowfalldistmodelnames

Snowfall distribution model names.

◆ snowfallmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_snowfall)-1) modvar::snowfallmodelnames

Snowfallmodel names.

◆ snowfraci

real, dimension(:), allocatable modvar::snowfraci

Precipitation snowfall fraction [-] for current time step.

◆ snowheatmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_snowheat)-1) modvar::snowheatmodelnames

snowheat names

◆ snowmeltmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_snowmelt)-1) modvar::snowmeltmodelnames

Snowmeltmodel names.

◆ snowpackresetmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_snowpackreset)-1) modvar::snowpackresetmodelnames

Snow pack reset model options.

◆ soildepth

real, dimension(:,:), allocatable modvar::soildepth

Lower border of soil layers (m) (layer,class)

◆ soiliniwet

logical modvar::soiliniwet

If true, initiate soil water to porosity, else filed capacity.

◆ soilleak

type(soilleakagedatatype) modvar::soilleak

Soil leakage concentrations.

◆ soilleakmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_soilleakage)-1) modvar::soilleakmodelnames

Soil leakage model names.

◆ soilpar

real, dimension(:,:), allocatable, target modvar::soilpar

parameter values for each soil type

◆ soilthick

real, dimension(:,:), allocatable modvar::soilthick

Thickness of soil layers (m) (layer,class)

◆ solar

real, parameter modvar::solar = 0.0820

Solar constant, MJ/m2/min.

◆ some_basinoutvar

integer, parameter modvar::some_basinoutvar = 23

Number of basin load output variables except point sources and ruralB.

◆ statesize

type(statedimensiontype) modvar::statesize

dimensions of states for simulation

◆ surfacerunoffmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_surfacerunoff)-1) modvar::surfacerunoffmodelnames

surfacerunoff names

◆ swtemperaturemodelnames

character(len=64), dimension(0:maxmodelsinoption(p_swtemperature)-1) modvar::swtemperaturemodelnames

Swtemperature names.

◆ t1modelnames

character(len=64), dimension(0:maxmodelsinoption(p_t1model)-1) modvar::t1modelnames

T1 model.

◆ t2rivermodelnames

character(len=64), dimension(0:maxmodelsinoption(p_t2rivermodel)-1) modvar::t2rivermodelnames

T2 river flow model names.

◆ tempi

real, dimension(:), allocatable modvar::tempi

Temperature data for current time step.

◆ tilefraction

real, dimension(:,:), allocatable modvar::tilefraction

Tile fraction of area in tile group (nsub,ntilegroups)

◆ timesteps_per_day

integer modvar::timesteps_per_day

Number of time steps per day.

◆ tload

type(t1loadtype), dimension(:), allocatable modvar::tload

Load of general substance T1 from point source.

◆ tloadexist

logical, dimension(:), allocatable modvar::tloadexist

Index find tload for subbasin.

◆ tmaxi

real, dimension(:), allocatable modvar::tmaxi

Daily maximum air temperature for current time step.

◆ tmini

real, dimension(:), allocatable modvar::tmini

Daily minimum air temperature for current time step.

◆ tobselevation

real, dimension(:), allocatable modvar::tobselevation

Forcing data informations, elevation of Tobs.

◆ traveltime_model

integer, parameter modvar::traveltime_model = 5

Class model code for travel time soil model.

◆ upstreamarea

real, dimension(:), allocatable modvar::upstreamarea

area of upstream subbasins

◆ useinupdate

type(updatetype), dimension(dim_update) modvar::useinupdate

update status for each method

◆ uwindi

real, dimension(:), allocatable modvar::uwindi

u-component winds speed [m/s] for current time step (west to east)

◆ vwindi

real, dimension(:), allocatable modvar::vwindi

v-component winds speed [m/s] for current time step (south to north)

◆ waterdensity

real, parameter modvar::waterdensity = 1000.

Density of (unfrozen) water, kg/m3.

◆ watertransfer

type(watertransfertype), dimension(:), allocatable modvar::watertransfer

Water transfer characteristics.

◆ wetland

type(wetlandtype), dimension(:,:), allocatable modvar::wetland

River wetland characteristics (local and main river)

◆ wetlandmodelnames

character(len=64), dimension(0:maxmodelsinoption(p_wetland)-1) modvar::wetlandmodelnames

Wetland names.

◆ windi

real, dimension(:), allocatable modvar::windi

Winds speed [m/s] for current time step.

◆ wobsi

real, dimension(:), allocatable modvar::wobsi

Lake water level data for current time step.

◆ wobsindex

integer, dimension(:), allocatable modvar::wobsindex

Index for finding variables in wobsi.

◆ wobsvarindex

integer modvar::wobsvarindex

variable (outvarid-index) to be used for updating wend and war

◆ xcgobsi

real, dimension(:), allocatable modvar::xcgobsi

Class observations for current time step.

◆ xcgobsindex

integer, dimension(:,:,:), allocatable modvar::xcgobsindex

Index for finding variables in xcgobsi.

◆ xobsi

real, dimension(:), allocatable modvar::xobsi

Other observations for current time step.

◆ xobsindex

integer, dimension(:,:), allocatable modvar::xobsindex

Index for finding variables in xobsi.

◆ xobsoutvarindex

integer, dimension(:), allocatable modvar::xobsoutvarindex

◆ xoregindex

integer, dimension(:,:), allocatable modvar::xoregindex

Index for finding variables in xoregobsi.

◆ xoregobsi

real, dimension(:), allocatable modvar::xoregobsi

Other outregion observations for current time step.