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

Data Types

type  accumulationinfo
 
type  basemodeltype
 
type  calibrationinfo
 
type  classgrouptype
 
type  forcingdatatype
 
type  instatetype
 
type  netcdf_time_definition
 
type  observationdatatype
 
type  optimizationtype
 
type  outputdatatype
 
type  outputtype
 
type  outputvariabletype
 
type  outregioninfotype
 
type  outstatetype
 
type  outvarinfotype
 
type  testoutvartype
 

Functions/Subroutines

subroutine allocate_outvar_test (nout)
 
subroutine da_allocate_accumulation (n, nsta)
 
subroutine allocate_accumulation (n)
 
subroutine reallocate_outvar_information (nnew, nnewclass)
 
subroutine get_classgroup_classes (name, nslc, classindex)
 
integer function get_classgroup_index (name)
 
subroutine set_output (itype, iout, maxout, dimout, outv, n, per, ndec, nsig, useperiod, aggarea, maxa, na, area, classgroupname)
 
subroutine set_netcdfoutput_time_definition (str, indate)
 
subroutine initialize_outstate (localoutstate)
 
subroutine set_outstate_dates (dim, dates, localoutstate)
 
logical function status_write_outstate (d, localoutstate)
 
type(datetype) function get_current_date_memory (i)
 
real function, dimension(n) get_current_qobs (i, n)
 
real function, dimension(n) get_current_wobs (i, n)
 
real function, dimension(xcolget_current_xobs (i)
 
real function, dimension(xorcolget_current_xoregobs (i)
 
real function, dimension(xcgcolget_current_xcgobs (i)
 
real function, dimension(obsdata%ncols) get_current_forcing_from_memory (i, obsdata)
 
subroutine set_criteria_settings (a, n, c, ccg, ccgrec, per, lim, subass, dec, w, critvars, par, cond, thres)
 
subroutine set_maxmap (tstep, per)
 
subroutine deallocate_worldvar ()
 
subroutine allocate_mcvariables (nbest, npar, nperf, numcrit)
 
subroutine deallocate_mcvariables ()
 
subroutine prepare_ens_fileunit_array (nsub, ensstat)
 
subroutine get_fileunit (newfileunit)
 
subroutine fileunit_free (funit)
 
subroutine get_seq_filename (fname)
 
character(len=fnlen) function add_date_to_filename (date, fnlen, filename)
 
subroutine set_directory (idir, dir, ddir)
 
subroutine count_optim_par (dim1, dim2)
 
subroutine allocate_and_initialize_forcingdata_structure ()
 
integer function get_forcing_id (name)
 
character(len=ll) function get_steplength_string (ll, iperiod)
 

Variables

Miscellaneous constant parameters and variables
integer, parameter maxcharpath = 400
 
integer, parameter maxcrit = 100
 
integer, parameter maxoptpar = 100
 
integer, parameter maxclassingroup = 100
 
integer, parameter maxgeoclasscol = 13
 
integer, parameter maxclassdatacol = 17
 
integer, parameter maxlinelength = 6800000
 
integer, parameter maxdatefiles = 20
 
real, parameter meandaysofyear = 365.25
 
integer, parameter seconds_per_day = 86400
 
character(len=2), parameter comment_str ='!!'
 
Constant file parameters

Files that are frequently used have their own file unit number and file name parameter. Files opened and closed in sequence use the temporary fileunit 101. The HYSS log-file uses the standard output fileunit 6.

integer, parameter fileunit_base = 200
 
integer, parameter max_files = 100000
 
logical, dimension(max_files), private fileunit_occupied
 
integer, parameter fileunit_temp = 101
 
integer, parameter fileunit_qobs = 104
 
integer fileunit_wobs
 
integer, parameter fileunit_xobs = 105
 
integer, parameter fileunit_mc = 106
 
integer, parameter fileunit_callog = 107
 
integer, parameter fileunit_xoreg = 108
 
integer, parameter fileunit_tests = 109
 
integer, parameter fileunit_psts = 110
 
integer, dimension(:,:,:), allocatable fid_assim_ens
 
character(len=8), parameter filename_qobs = 'Qobs.txt'
 
character(len=8), parameter filename_wobs = 'Wobs.txt'
 
character(len=8), parameter filename_xobs = 'Xobs.txt'
 
character(len=12), parameter filename_xoreg = 'Xoregobs.txt'
 
character(len=10), parameter filename_mc = 'allsim.txt'
 
character(len=12), parameter filename_best = 'bestsims.txt'
 
character(len=10), parameter filename_upd = 'update.txt'
 
character(len=15), parameter filename_callog = 'calibration.log'
 
character(len=20), parameter filename_resetstate = 'reset_state_save.txt'
 
Data type parameters

These codes are used when reading model run settings and model parameter values from files.

integer, parameter i_str =0
 
integer, parameter i_intg =1
 
integer, parameter i_real =2
 
Forcing data constants

Codes for forcing data and other observations in forcing data structure

integer, parameter i_pobs = 1
 
integer, parameter i_tobs = 2
 
integer, parameter i_tminobs = 3
 
integer, parameter i_tmaxobs = 4
 
integer, parameter i_rhobs = 5
 
integer, parameter i_sfobs = 6
 
integer, parameter i_swobs = 7
 
integer, parameter i_uobs = 8
 
integer, parameter i_uwobs = 9
 
integer, parameter i_vwobs = 10
 
integer, parameter max_forcingdata = 10
 
Criterion related constant parameters

An index code is used for simulation assessment criteria-arrays. Short names for criteria are defined.

integer, parameter i_rnse = 1
 
integer, parameter i_snse = 2
 
integer, parameter i_mnse = 3
 
integer, parameter i_rmae = 4
 
integer, parameter i_sre = 5
 
integer, parameter i_rre = 6
 
integer, parameter i_mre = 7
 
integer, parameter i_rra = 8
 
integer, parameter i_sra = 9
 
integer, parameter i_mra = 10
 
integer, parameter i_tau = 11
 
integer, parameter i_mdnse = 12
 
integer, parameter i_mdra = 13
 
integer, parameter i_mstdre = 14
 
integer, parameter i_mcc = 15
 
integer, parameter i_mdkg = 16
 
integer, parameter i_akg = 17
 
integer, parameter i_asckg = 18
 
integer, parameter i_mabsre = 19
 
integer, parameter i_mnrmse = 20
 
integer, parameter i_mnw = 21
 
integer, parameter i_snr = 22
 
integer, parameter i_smb = 23
 
integer, parameter i_numrc = 24
 
integer, parameter i_nummc = 25
 
integer, parameter maxperf = 25
 
integer, parameter maxsubass = 22
 
character(len=5), dimension(maxperf), parameter performance_name = (/'rr2 ','sr2 ', 'mr2 ','rmae ','sre ','rre ','mre ','rra ', 'sra ','mra ','tau ','md2 ','mda ','mrs ', 'mcc ','mdkg ','akg ','asckg','mar ','mdnr ', 'mnw ','snr ','smb ','numrc','nummc'/)
 
Variables for model simulation setting

Information about the model simulation comes from the file info.txt.

character(len=maxcharpathinfodir
 
character(len=maxcharpathmodeldir
 
character(len=maxcharpathforcingdir
 
character(len=maxcharpathotherobsdir
 
character(len=maxcharpathloadleakdir
 
character(len=maxcharpathresdir
 
character(len=maxcharpathlogdir
 
type(datetypesteplen
 
type(datetypebdate
 
type(datetypesdate
 
type(datetype), dimension(maxdatefilesreadadddate
 
type(datetype), dimension(maxdatefilesreadnpddate
 
type(datetype), dimension(maxdatefilesreadclddate
 
type(datetypeoutstartdate
 
type(datetype), dimension(:), allocatable psdates
 
logical readdaily
 
logical writematlab
 
logical writeload
 
logical writeattr
 
logical writencattr
 
logical readobsid
 
logical readpstime
 
logical readoutregion
 
logical resultseq
 
logical parseq
 
logical usestop84
 
integer num_classgroups
 
integer simsequence
 
integer ndt
 
integer indatacheckonoff
 
integer indatachecklevel
 
logical resetstate
 
logical simsubmodel
 
type(basemodeltypebasemodel
 
type(instatetypeinstate
 
type(outstatetypeoutstate
 
type(outstatetypeoutstateensemble
 
Forcing data and other observations variables and structures


type(datetype), dimension(:), allocatable dates
 
integer, dimension(:), allocatable winxobsindex
 
real, dimension(:,:), allocatable qobs
 
real, dimension(:,:), allocatable wobs
 
real, dimension(:,:), allocatable xobs
 
real, dimension(:,:), allocatable xoregobs
 
real, dimension(:,:), allocatable xcgobs
 
integer numwobsstn
 
integer ncomrowsofwobs
 
integer ncomrowsofxobs
 
integer ncomrowsofxoregobs
 
integer xcol = 0
 
integer xorcol = 0
 
integer xcgcol = 0
 
integer readformat
 
integer, dimension(4) qxtimeformat
 
integer outputtimeformat
 
type(datetypebwdate
 
type(datetypeewdate
 
type(datetypebxdate
 
type(datetypeexdate
 
type(datetypebxrdate
 
type(datetypeexrdate
 
type(datetypebpsdate
 
type(datetypeepsdate
 
logical readwobs = .FALSE.
 
logical conductwobs = .FALSE.
 
logical conductwinx = .FALSE.
 
type(forcingdatatype), dimension(:), allocatable forcingdata
 
logical dailypsfile = .FALSE.
 
logical monthlypsfile = .FALSE.
 
logical yearlypsfile = .FALSE.
 
integer pstscol
 
type(observationdatatypeqobsdata
 
type(observationdatatype), dimension(:), allocatable xobsdata
 
type(observationdatatype), dimension(:), allocatable xregobsdata
 
type(observationdatatype), dimension(:,:), allocatable xcgobsdata
 
integer nc_timevar
 
Constant parameters for output
integer, parameter max_typeofoutput = 4
 
integer, parameter maxoutbasins = 10000
 
integer, parameter maxcritbasins = 150000
 
integer, parameter ncmaxattr = 50
 
integer, parameter i_t =0
 
integer, parameter i_d =1
 
integer, parameter i_w =2
 
integer, parameter i_m =3
 
integer, parameter i_y =4
 
integer, parameter i_s =5
 
integer, parameter i_h =6
 
integer, parameter max_typeofperiods = 6
 
character(len=2), dimension(0:max_typeofperiods), parameter outperiodname = (/'TS','DD','WK','MO','YR','SP','HR'/)
 
Variables for output

These variables hold information about wanted output, accumulation of output variables for period output. HYSS handles three kind of output. Basin output gives one file for each subbasin with time series of selected variables in columns. Time output gives one file for each selected variable with time series for each subbasin in columns. Map output gives one file for each selected variable with subbasins in rows and possibly several time periods in columns.

type(outputtype), dimension(:), allocatable output
 
type(classgrouptype), dimension(:), allocatable classgroup2
 
type(outregioninfotype), dimension(:), allocatable outregion
 
type(outvarinfotype), dimension(:), allocatable outvarinfo
 
type(outvarinfotype), dimension(:), allocatable outvarclassinfo
 
type(outvarinfotype), dimension(:), allocatable outvarinfotemp
 
type(outvarinfotype), dimension(:), allocatable outvarclassinfotemp
 
type(testoutvartype), dimension(:), allocatable outvartest
 
type(netcdf_time_definitionnc_timedef
 
integer noutput
 
integer noutreg
 
character(len=20), dimension(:), allocatable maptime
 
character(len=50), dimension(:), allocatable ncfileatt_name
 
character(len=500), dimension(:), allocatable ncfileatt_text
 
character(len=50), dimension(:), allocatable fileatt_name
 
character(len=500), dimension(:), allocatable fileatt_text
 
integer tmap
 
integer dtskip
 
integer dtmonday
 
integer maxmap
 
integer idtlag
 
Variables for criteria evaluation, optimisation and parameter ensemble simulation

A number of variables are used during calibration. These include information about what calibration to do, including calibration parameter settings, model parameter space to optimize, and index-variables to locate them. Also result of on-going optimization, control variables for optimization progress.

integer dimpar
 
integer numoptimpar
 
integer optimfunccall
 
integer linesearchcallcount
 
integer calvarper
 
integer calvarlim
 
integer subassoutput
 
integer subassform
 
integer ncrit
 
integer nacrit
 
integer, dimension(maxoptparoptparid
 
real optimstarttime
 
logical weightsub = .FALSE.
 
logical doopt = .FALSE.
 
logical doens = .FALSE.
 
type(calibrationinfo), dimension(:), allocatable calvar
 
type(accumulationinfo), dimension(:), allocatable acccalvar
 
real, dimension(:,:), allocatable optparmin
 
real, dimension(:,:), allocatable optparmax
 
real, dimension(:,:), allocatable optparprecision
 
integer, dimension(:,:), allocatable parindex
 
type(optimizationtypeoptim
 
real, dimension(:,:), allocatable bestmcparameters
 
real, dimension(:), allocatable bestmcoptcrit
 
real, dimension(:,:,:), allocatable bestmcperformance
 
real, dimension(:), allocatable bestmccondcrit
 
Criteria calculation variables

Several criteria may be calculated during a simulation, but only one (often a combination of different criteria) is used for optimization. Criteria are most often calculated from variables accumulated during the simulation, but some need all values present when the criterion is calculated.

integer nsubcrit
 
double precision, dimension(:,:,:), allocatable critvec
 
real, dimension(:,:), allocatable rs
 
real, dimension(:,:), allocatable cs
 
integer, dimension(:,:), allocatable ts
 
real, dimension(:,:), allocatable ktcomp
 
real, dimension(:,:), allocatable ktcomp2
 
real, dimension(:,:), allocatable ktcomp3
 
real, dimension(:,:), allocatable ktcomp4
 
real, dimension(:,:), allocatable ktrec
 
real, dimension(:,:), allocatable ktrec2
 
real, dimension(:,:), allocatable ktrec3
 
real, dimension(:,:), allocatable ktrec4
 
integer, dimension(:), allocatable ktnum
 
integer, dimension(:), allocatable ktnum2
 
integer, dimension(:), allocatable ktnum3
 
integer, dimension(:), allocatable ktnum4
 
integer, dimension(:), allocatable subinclcrit
 
logical, dimension(:), allocatable subforcrit
 
real, dimension(:), allocatable subweightcrit
 
Variables for Data Assimilation

Most variables needed for the assimilation-routines are defined in the assimilation-modules. However, one basic flag called doassimilation is declared here, and read from info.txt by data.f90 (assimilation y/n).

logical doassimilation = .FALSE.
 

Detailed Description

Module for declaration of HYSS variables. These are NOT to be used in the model.

NOTE: everything is public.

The module worldvar contains constants, variables, and procedures that are used globally within HYSS (but not within the model). It also holds procedures for setting simulation information, handling memory, and getting single observation values.

The constants define file names and settings for I/O, dimensions of arrays, code index for accumulation period and input variable type etc.

The variables are for model simulation settings, for holding observations both
for forcing and for criteria calculations, for temporary accumulation and calculation of output, for optimisation setting and results and for calculation of criteria.

Function/Subroutine Documentation

◆ add_date_to_filename()

character(len=fnlen) function worldvar::add_date_to_filename ( type(datetype), intent(in)  date,
integer, intent(in)  fnlen,
character(len=fnlen), intent(in)  filename 
)

Add date to string with a underscore in between.

Parameters
[in]datedate to be added to string
[in]fnlenlength of string
[in]filenamethe filename before and after addition of bdate
Returns
the filename before and after addition of bdate

Set the file name

+ Here is the caller graph for this function:

◆ allocate_accumulation()

subroutine worldvar::allocate_accumulation ( integer, intent(in)  n)

Allocate variables for accumulation of data for printout.

Consequences Module variables maptime and/or output may be allocated

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

◆ allocate_and_initialize_forcingdata_structure()

subroutine worldvar::allocate_and_initialize_forcingdata_structure

Allocate and set forcingdata structure variable

Consequences Module variables for model options are allocated.

+ Here is the caller graph for this function:

◆ allocate_mcvariables()

subroutine worldvar::allocate_mcvariables ( integer, intent(in)  nbest,
integer, intent(in)  npar,
integer, intent(in)  nperf,
integer, intent(in)  numcrit 
)

Allocate and initiate variables for MonteCarlo simulation.

Consequences Module variables bestMCparameters,bestMCoptcrit, bestMCperformance and bestMCcondcrit are allocated and set.

Parameters
[in]nbestoptimruns_best, number of ensambles saved
[in]nparnumber of parameters
[in]nperfnumber of performance criteria (=maxperf)
[in]numcritncrit, number of variables criteria are calculated for
+ Here is the caller graph for this function:

◆ allocate_outvar_test()

subroutine worldvar::allocate_outvar_test ( integer, intent(in)  nout)

Allocate variables for output tests from model to HYSS.

Parameters
[in]noutnumber of output variables to be tested
+ Here is the caller graph for this function:

◆ count_optim_par()

subroutine worldvar::count_optim_par ( integer, intent(in)  dim1,
integer, intent(in)  dim2 
)

This routine determines the value of numoptimpar, i.e. the number of model parameter values to be optimized.

+ Here is the caller graph for this function:

◆ da_allocate_accumulation()

subroutine worldvar::da_allocate_accumulation ( integer, intent(in)  n,
integer, intent(in)  nsta 
)

Allocate variables for accumulation of data for printout for data assimilation simulation.

Consequences Module variables output may be reallocated

Parameters
[in]nnumber of subbasins
[in]nstanumber of statistics output
+ Here is the caller graph for this function:

◆ deallocate_mcvariables()

subroutine worldvar::deallocate_mcvariables

Deallocate variables for MonteCarlo simulation.

Consequences Module variables are deallocated

+ Here is the caller graph for this function:

◆ deallocate_worldvar()

subroutine worldvar::deallocate_worldvar

Deallocate worldvar-arrays.

Consequences A lot of module variables are deallocated

+ Here is the caller graph for this function:

◆ fileunit_free()

subroutine worldvar::fileunit_free ( integer, intent(in)  funit)

Release file unit no longer used for file connection.

Parameters
[in]funitFile unit to be released
+ Here is the caller graph for this function:

◆ get_classgroup_classes()

subroutine worldvar::get_classgroup_classes ( character(len=*), intent(in)  name,
integer, intent(out)  nslc,
integer, dimension(:), intent(out)  classindex 
)

Get classgroup information for a class group based on name.

Parameters
[in]namename of class group
[out]nslcnumber of classes
[out]classindexindex of classes (nclass)

Algorithm

Allocate and set classes in classgroup for that class group

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

◆ get_classgroup_index()

integer function worldvar::get_classgroup_index ( character(len=*), intent(in)  name)

Get classgroup index a class group based on name.

Parameters
[in]namename of class group

Algorithm

Find matching class group

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

◆ get_current_date_memory()

type(datetype) function worldvar::get_current_date_memory ( integer, intent(in)  i)

Collects current date from array with dates

Parameters
[in]icurrent time step
Return values
get_current_date_memorycurrent date
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_current_forcing_from_memory()

real function, dimension(obsdata%ncols) worldvar::get_current_forcing_from_memory ( integer, intent(in)  i,
type(forcingdatatype), intent(in)  obsdata 
)

Collects current forcing data from memory.

Parameters
[in]icurrent time step
Returns
Return values
currentforcing data
+ Here is the caller graph for this function:

◆ get_current_qobs()

real function, dimension(n) worldvar::get_current_qobs ( integer, intent(in)  i,
integer, intent(in)  n 
)

Collects current discharge observation.

Parameters
[in]icurrent time step
[in]nnumber of subbasins
Returns
Return values
get_current_qobscurrent discharge
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_current_wobs()

real function, dimension(n) worldvar::get_current_wobs ( integer, intent(in)  i,
integer, intent(in)  n 
)

Collects current lake water level observation.

Parameters
[in]icurrent time step
[in]nnumber of wobs columns
Returns
Return values
get_current_wobscurrent water level
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_current_xcgobs()

real function, dimension(xcgcol) worldvar::get_current_xcgobs ( integer, intent(in)  i)

Collects current class observation.

Parameters
[in]icurrent time step
Returns
Return values
get_current_xcgobscurrent value of class observations
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_current_xobs()

real function, dimension(xcol) worldvar::get_current_xobs ( integer, intent(in)  i)

Collects current other observation.

Parameters
[in]icurrent time step
Returns
Return values
get_current_xobscurrent value of other observations
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_current_xoregobs()

real function, dimension(xorcol) worldvar::get_current_xoregobs ( integer, intent(in)  i)

Collects current other observation.

Parameters
[in]icurrent time step
Returns
Return values
get_current_xoregobscurrent value of other observations
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_fileunit()

subroutine worldvar::get_fileunit ( integer, intent(out)  newfileunit)

Find a free file unit for file connecting.

Parameters
[out]newfileunitnew file unit
+ Here is the caller graph for this function:

◆ get_forcing_id()

integer function worldvar::get_forcing_id ( character(len=*), intent(in)  name)

Get index of current forcing based on name. Name can be file name (e.g. Pobs), variable (e.g. P), or "forcingname" (e.g. pobs) upper or in lower case.

Algorithm

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

◆ get_seq_filename()

subroutine worldvar::get_seq_filename ( character(len=*), intent(inout)  fname)

Add sequence number to filename if sequence number is given (positive) Assumes .txt if not specified .nc in input argumnet file name.

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

◆ get_steplength_string()

character(len=ll) function worldvar::get_steplength_string ( integer, intent(in)  ll,
integer, intent(in)  iperiod 
)

Get the step length of output, aka the accumulation period for output.

Parameters
[in]lllength of result string
[in]iperiodtime step of file to be written
Returns
Return values
thestep length string
Returns
Get time step length of current accumulation period
+ Here is the caller graph for this function:

◆ initialize_outstate()

subroutine worldvar::initialize_outstate ( type(outstatetype), intent(inout)  localoutstate)

Initialize outstate saving structure to none.

Parameters
[in,out]localoutstateVariable holding infirmation on output of state

Default is no writing of states

+ Here is the caller graph for this function:

◆ prepare_ens_fileunit_array()

subroutine worldvar::prepare_ens_fileunit_array ( integer, intent(in)  nsub,
integer, intent(in)  ensstat 
)

Allocate array to hold fileunits for ensemble results.

Parameters
[in]nsubNumber of subbasins, nsub
[in]ensstatFlag for writing parallell ensemble files (number of ensembles)
+ Here is the caller graph for this function:

◆ reallocate_outvar_information()

subroutine worldvar::reallocate_outvar_information ( integer, intent(in)  nnew,
integer, intent(in)  nnewclass 
)

Reallocate output information to suitable size after reading actual output.

Consequences Module variables outvarinfo may be reallocated.

Parameters
[in]nnewnumber of output variables to be calculated
[in]nnewclassnumber of output variables for classes to be calculated
+ Here is the caller graph for this function:

◆ set_criteria_settings()

subroutine worldvar::set_criteria_settings ( logical, intent(in)  a,
integer, intent(in)  n,
character(len=*), dimension(n), intent(in)  c,
character(len=*), dimension(n), intent(in)  ccg,
character(len=*), dimension(n), intent(in)  ccgrec,
integer, intent(in)  per,
integer, intent(in)  lim,
integer, intent(in)  subass,
integer, intent(in)  dec,
real, dimension(n), intent(in)  w,
integer, dimension(2,3,n), intent(in)  critvars,
real, dimension(n), intent(in)  par,
logical, dimension(n), intent(in)  cond,
real, dimension(n), intent(in)  thres 
)

Saves information of calibration and criteria to use.

Consequences Module variables doopt, calvarper, calvarlim, calvar, acccalvar and nacrit are set.

Parameters
[in]acalibration
[in]nnumber of criteria
[in]cname of criteria
[in]ccgname of criteria classgroup for simulated variable
[in]ccgrecname of criteria classgroup for observed variable
[in]percode for accumulation period
[in]limlimit number of observations needed for calculation of criteria
[in]subasssubass model (0-2)
[in]decsubass format (0-1)
[in]wweight of criteria
[in]critvarscomputed and recorded variable(s) and their characteristics
[in]parcoefficient of criteria
[in]condflag for conditional criteria
[in]thresthreshold for conditional criteria

Algorithm
Initialize routine and set general calibration information variables

Check criteria variable input

For every criteria in optimization function: Set calibration information variable

Count number of unique variables in optimization function (nacrit) for allocating acccalvar

For every unique variable in optimization function: Set information about accumulation of values for criteria calculation

Check for correct tau and RA criteria order placement

+ Here is the caller graph for this function:

◆ set_directory()

subroutine worldvar::set_directory ( character(len=maxcharpath), intent(in)  idir,
character(len=maxcharpath), intent(inout)  dir,
character(len=maxcharpath), intent(in), optional  ddir 
)

Check directory path if relative to info.txt or missing, and set.

Parameters
[in]idirInfo file directory
[in,out]dirFile directory to be checked and set
[in]ddirDefault file directory (higher prio than idir)

Initialise default directory

Check for missing or relative path

+ Here is the caller graph for this function:

◆ set_maxmap()

subroutine worldvar::set_maxmap ( integer, intent(in)  tstep,
integer, intent(in)  per 
)

Saves information on number of times to write for map file.

Consequences Module variable maxmap is set.

Parameters
[in]tstepnumber of timestep in output period
[in]percode for accumulation period
+ Here is the caller graph for this function:

◆ set_netcdfoutput_time_definition()

subroutine worldvar::set_netcdfoutput_time_definition ( character(len=*), intent(in), optional  str,
type(datetype), intent(in), optional  indate 
)

Set input or default time definition for netcdf output files.

Parameters
[in]strtime resolution
[in]indatesince date

Set since time and timeresolution from input

Set since time 1950-01-01 00:00 and timeresolution to seconds Calender is proleptic_gregorian and set, if needed, when opening the time file

+ Here is the caller graph for this function:

◆ set_output()

subroutine worldvar::set_output ( integer, intent(in)  itype,
integer, intent(in)  iout,
integer, intent(in)  maxout,
integer, intent(in)  dimout,
integer, dimension(dimout), intent(in)  outv,
integer, intent(in)  n,
integer, intent(in)  per,
integer, intent(in)  ndec,
integer, intent(in)  nsig,
logical, intent(in)  useperiod,
integer, dimension(dimout), intent(in), optional  aggarea,
integer, intent(in), optional  maxa,
integer, intent(in), optional  na,
integer, dimension(:), intent(in), optional  area,
character(len=6), intent(in), optional  classgroupname 
)

Saves information on what and how to write to output files (except index to locate the values in outvar)

Consequences Module variable output is allocated and set

Parameters
[in]itypetype of output file
[in]ioutcurrent output file type to be set
[in]maxoutnumber of output file types for this simulation
[in]dimoutdimension of variable arrays
[in]outvvariables for output
[in]nnumber of output variables of this type
[in]percode for print out period
[in]ndecnumber of decimals
[in]nsignumber of significant figures
[in]useperiodflag to use meanperiod in file name
[in]aggareaarea aggregation type of variable (uubbasin=0,upstream=1,region=2)
[in]maxadimension of area array
[in]nanumber of areas
[in]areaid of areas
[in]classgroupnameid of classgroup defined in info

Algorithm

If not allocated: allocate and initialize output

Set outvar information about variables to be written

Set output information about the file format

Set output information about subbasins or regions to be written (if applicable)

Set output information about classes to be included (if applicable)

+ Here is the caller graph for this function:

◆ set_outstate_dates()

subroutine worldvar::set_outstate_dates ( integer, intent(in)  dim,
type(datetype), dimension(dim), intent(in)  dates,
type(outstatetype), intent(inout)  localoutstate 
)

Calculate previous time step for output of state.

Parameters
[in]dimsize of array
[in]datesDates for saving state from info.txt
[in,out]localoutstateVariable holding infirmation on output of state
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ status_write_outstate()

logical function worldvar::status_write_outstate ( type(datetype), intent(in)  d,
type(outstatetype), intent(in)  localoutstate 
)

Check if state file should be written. Works for both ordinary state_save and data assimilation ensemble state bin-files.

Parameters
[in]dcurrent date
[in]localoutstateVariable holding information on output of state
Return values
outstate_this_timesteptrue or false

Default is no writing of states, and when using submodel states cannot be written.

If states should be written for all time steps...

or if states should be written for a period

or if state should be written for this specific date, the status will be set to write a state file.

or if states should be written for the first of month each month

or if states should be written for the first of January each year

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

Variable Documentation

◆ acccalvar

type(accumulationinfo), dimension(:), allocatable worldvar::acccalvar

Calibration information for accumulation.

◆ basemodel

type(basemodeltype) worldvar::basemodel

Information on base model used for simulating a submodel.

◆ bdate

type(datetype) worldvar::bdate

Begin simulation date.

◆ bestmccondcrit

real, dimension(:), allocatable worldvar::bestmccondcrit

Conditional crit values for the best MonteCarlo simulations (so far)

◆ bestmcoptcrit

real, dimension(:), allocatable worldvar::bestmcoptcrit

Optcrit values for the best MonteCarlo simulations (so far)

◆ bestmcparameters

real, dimension(:,:), allocatable worldvar::bestmcparameters

Parameter values for the best MonteCarlo simulations (so far)

◆ bestmcperformance

real, dimension(:,:,:), allocatable worldvar::bestmcperformance

Performance values for the best MonteCarlo simulations (so far)

◆ bpsdate

type(datetype) worldvar::bpsdate

Begin date for PointSource observations within simulation period.

◆ bwdate

type(datetype) worldvar::bwdate

Begin date for W observations within simulation period.

◆ bxdate

type(datetype) worldvar::bxdate

Begin date for X observations within simulation period.

◆ bxrdate

type(datetype) worldvar::bxrdate

Begin date for X outregion observations within simulation period.

◆ calvar

type(calibrationinfo), dimension(:), allocatable worldvar::calvar

Calibration information.

◆ calvarlim

integer worldvar::calvarlim

Minimum number of data for criteria to be calculated.

◆ calvarper

integer worldvar::calvarper

Average period for criteria.

◆ classgroup2

type(classgrouptype), dimension(:), allocatable worldvar::classgroup2

Information about class group characteristics (definition in info)

◆ comment_str

character(len=2), parameter worldvar::comment_str ='!!'

Comment string code.

◆ conductwinx

logical worldvar::conductwinx = .FALSE.

Flag for reading wstr from Xobs.txt or WSTRobs.nc.

◆ conductwobs

logical worldvar::conductwobs = .FALSE.

Flag for reading wstr from Wobs.txt.

◆ critvec

double precision, dimension(:,:,:), allocatable worldvar::critvec

Accumulated errors for later criteria calculation; variable,type,basin.

◆ cs

real, dimension(:,:), allocatable worldvar::cs

Variable for accumulate observed values for periodmean.

◆ dailypsfile

logical worldvar::dailypsfile = .FALSE.

Flag for reading point sources daily (PSDailySeries.txt)

◆ dates

type(datetype), dimension(:), allocatable worldvar::dates

Matrix with all datetimes in simulation.

◆ dimpar

integer worldvar::dimpar

Maximum number of parameter values per parameter.

◆ doassimilation

logical worldvar::doassimilation = .FALSE.

Data Assimilation on/off flag.

◆ doens

logical worldvar::doens = .FALSE.

Parameter ensemble simulation flag.

◆ doopt

logical worldvar::doopt = .FALSE.

Calibration flag.

◆ dtmonday

integer worldvar::dtmonday

◆ dtskip

integer worldvar::dtskip

◆ epsdate

type(datetype) worldvar::epsdate

End date for PointSource observations within simulation period.

◆ ewdate

type(datetype) worldvar::ewdate

End date for W observations within simulation period.

◆ exdate

type(datetype) worldvar::exdate

End date for X observations within simulation period.

◆ exrdate

type(datetype) worldvar::exrdate

End date for X outregion observations within simulation period.

◆ fid_assim_ens

integer, dimension(:,:,:), allocatable worldvar::fid_assim_ens

file unit for assimilation ensemble (and statistics) output files (output,ensemble,variable/subbasin)

◆ fileatt_name

character(len=50), dimension(:), allocatable worldvar::fileatt_name

Attribute name, user specified in info.txt for output file.

◆ fileatt_text

character(len=500), dimension(:), allocatable worldvar::fileatt_text

Attribute value, user specified in info.txt for output file.

◆ filename_best

character(len=12), parameter worldvar::filename_best = 'bestsims.txt'

◆ filename_callog

character(len=15), parameter worldvar::filename_callog = 'calibration.log'

◆ filename_mc

character(len=10), parameter worldvar::filename_mc = 'allsim.txt'

◆ filename_qobs

character(len=8), parameter worldvar::filename_qobs = 'Qobs.txt'

◆ filename_resetstate

character(len=20), parameter worldvar::filename_resetstate = 'reset_state_save.txt'

◆ filename_upd

character(len=10), parameter worldvar::filename_upd = 'update.txt'

◆ filename_wobs

character(len=8), parameter worldvar::filename_wobs = 'Wobs.txt'

◆ filename_xobs

character(len=8), parameter worldvar::filename_xobs = 'Xobs.txt'

◆ filename_xoreg

character(len=12), parameter worldvar::filename_xoreg = 'Xoregobs.txt'

◆ fileunit_base

integer, parameter worldvar::fileunit_base = 200

Fileunit start range for forcing and output files (use by MODULE ASSIMILATION_INTERFACE)

◆ fileunit_callog

integer, parameter worldvar::fileunit_callog = 107

Fileunit for calibration.log.

◆ fileunit_mc

integer, parameter worldvar::fileunit_mc = 106

Fileunit for allsim.txt.

◆ fileunit_occupied

logical, dimension(max_files), private worldvar::fileunit_occupied
private

File units available or occupied (fileunit_base+1–fileunit_base+max_files)

◆ fileunit_psts

integer, parameter worldvar::fileunit_psts = 110

Fileunit for PointSourceTimeSeries.txt.

◆ fileunit_qobs

integer, parameter worldvar::fileunit_qobs = 104

Fileunit for discharge observation data.

◆ fileunit_temp

integer, parameter worldvar::fileunit_temp = 101

temporary fileunit for files that are opened and closed in the same routine, e.g. info,par,optpar,respar,Qobs,Pobs,Tobs,Xobs (check station),GeoClass,GeoData

◆ fileunit_tests

integer, parameter worldvar::fileunit_tests = 109

Fileunit for test cases and their outputs.

◆ fileunit_wobs

integer worldvar::fileunit_wobs

Fileunit for water level observation data.

◆ fileunit_xobs

integer, parameter worldvar::fileunit_xobs = 105

Fileunit for other observations data.

◆ fileunit_xoreg

integer, parameter worldvar::fileunit_xoreg = 108

Fileunit for observations data on output regions.

◆ forcingdata

type(forcingdatatype), dimension(:), allocatable worldvar::forcingdata

◆ forcingdir

character(len=maxcharpath) worldvar::forcingdir

Directory for forcing data and initial state files (e.g. Tobs.txt,...), also evaluation observation files may be found here.

◆ i_akg

integer, parameter worldvar::i_akg = 17

Simulation assessment criteria: Arithmetic mean Kling-Gupta Efficiency.

◆ i_asckg

integer, parameter worldvar::i_asckg = 18

Simulation assessment criteria: Arithmetic mean of rescaled Kling-Gupta Efficiency.

◆ i_d

integer, parameter worldvar::i_d =1

Code for accumulation period of output: daily.

◆ i_h

integer, parameter worldvar::i_h =6

Code for accumulation period of output: hourly (not useable yet)

◆ i_intg

integer, parameter worldvar::i_intg =1

Data type parameter, code for reading data: integer.

◆ i_m

integer, parameter worldvar::i_m =3

Code for accumulation period of output: monthly.

◆ i_mabsre

integer, parameter worldvar::i_mabsre = 19

Simulation assessment criteria: Mean Absolute Relative Error.

◆ i_mcc

integer, parameter worldvar::i_mcc = 15

Simulation assessment criteria: Arithmetic mean correlation coefficient.

◆ i_mdkg

integer, parameter worldvar::i_mdkg = 16

Simulation assessment criteria: Median Kling-Gupta Efficiency.

◆ i_mdnse

integer, parameter worldvar::i_mdnse = 12

Simulation assessment criteria: Median NSE.

◆ i_mdra

integer, parameter worldvar::i_mdra = 13

Simulation assessment criteria: Median RA.

◆ i_mnrmse

integer, parameter worldvar::i_mnrmse = 20

Simulation assessment criteria: Median Normalized Root Mean Square Error.

◆ i_mnse

integer, parameter worldvar::i_mnse = 3

Simulation assessment criteria: Arithmetic mean NSE.

◆ i_mnw

integer, parameter worldvar::i_mnw = 21

Simulation assessment criteria: Mean NSE adjusted for bias.

◆ i_mra

integer, parameter worldvar::i_mra = 10

Simulation assessment criteria: Arithmetic mean RA.

◆ i_mre

integer, parameter worldvar::i_mre = 7

Simulation assessment criteria: Arithmetic mean RE.

◆ i_mstdre

integer, parameter worldvar::i_mstdre = 14

Simulation assessment criteria: Arithmetic mean std relative error.

◆ i_nummc

integer, parameter worldvar::i_nummc = 25

Simulation assessment: Number of data points for mean or median criteria.

◆ i_numrc

integer, parameter worldvar::i_numrc = 24

Simulation assessment: Number of data points for regional criteria.

◆ i_pobs

integer, parameter worldvar::i_pobs = 1

Index of Pobs data in forcingdata structure.

◆ i_real

integer, parameter worldvar::i_real =2

Data type parameter, code for reading data: real.

◆ i_rhobs

integer, parameter worldvar::i_rhobs = 5

Index of RHobs data in forcingdata structure.

◆ i_rmae

integer, parameter worldvar::i_rmae = 4

Simulation assessment criteria: Regional Mean Absolute Error.

◆ i_rnse

integer, parameter worldvar::i_rnse = 1

Simulation assessment criteria: Regional NSE.

◆ i_rra

integer, parameter worldvar::i_rra = 8

Simulation assessment criteria: Regional RA.

◆ i_rre

integer, parameter worldvar::i_rre = 6

Simulation assessment criteria: Regional RE.

◆ i_s

integer, parameter worldvar::i_s =5

Code for accumulation period of output: simulation period.

◆ i_sfobs

integer, parameter worldvar::i_sfobs = 6

Index of SFobs data in forcingdata structure.

◆ i_smb

integer, parameter worldvar::i_smb = 23

Simulation assessment criteria: spatial absolute bias.

◆ i_snr

integer, parameter worldvar::i_snr = 22

Simulation assessment criteria: spatial RMSE.

◆ i_snse

integer, parameter worldvar::i_snse = 2

Simulation assessment criteria: Spatial NSE.

◆ i_sra

integer, parameter worldvar::i_sra = 9

Simulation assessment criteria: Spatial RA.

◆ i_sre

integer, parameter worldvar::i_sre = 5

Simulation assessment criteria: Spatial RE.

◆ i_str

integer, parameter worldvar::i_str =0

Data type parameter, code for reading data: string (not read)

◆ i_swobs

integer, parameter worldvar::i_swobs = 7

Index of SWobs data in forcingdata structure.

◆ i_t

integer, parameter worldvar::i_t =0

Code for accumulation period of output: timesteply.

◆ i_tau

integer, parameter worldvar::i_tau = 11

Simulation assessment criteria: Kendalls Tau.

◆ i_tmaxobs

integer, parameter worldvar::i_tmaxobs = 4

Index of TMAXobs data in forcingdata structure.

◆ i_tminobs

integer, parameter worldvar::i_tminobs = 3

Index of TMINobs data in forcingdata structure.

◆ i_tobs

integer, parameter worldvar::i_tobs = 2

Index of Tobs data in forcingdata structure.

◆ i_uobs

integer, parameter worldvar::i_uobs = 8

Index of Uobs data in forcingdata structure.

◆ i_uwobs

integer, parameter worldvar::i_uwobs = 9

Index of UWobs data in forcingdata structure.

◆ i_vwobs

integer, parameter worldvar::i_vwobs = 10

Index of VWobs data in forcingdata structure.

◆ i_w

integer, parameter worldvar::i_w =2

Code for accumulation period of output: weekly.

◆ i_y

integer, parameter worldvar::i_y =4

Code for accumulation period of output: yearly.

◆ idtlag

integer worldvar::idtlag

◆ indatachecklevel

integer worldvar::indatachecklevel

Printout level for verification and validation checks: (0-2) Perform tests with specified printout level (0 has the minimum number of printouts)

◆ indatacheckonoff

integer worldvar::indatacheckonoff

How should the verification and validation checks be performed: (0) Tests will NOT be performed (1) Tests will be performed and will quit simulation if errors are found (2) Tests will be performed and will NOT quit simulation if errors are found (3) Tests will be performed and will quit simulation regardless if errors are found or not.

◆ infodir

character(len=maxcharpath) worldvar::infodir

Directory for information about simulation to be run (info.txt, pmsf.txt, hyss.txt)

◆ instate

type(instatetype) worldvar::instate

Information on state file to be read.

◆ ktcomp

real, dimension(:,:), allocatable worldvar::ktcomp

Variable for computed values for Kendalls Tau or RA calculation.

◆ ktcomp2

real, dimension(:,:), allocatable worldvar::ktcomp2

Variable for computed values for Kendalls Tau or RA calculation.

◆ ktcomp3

real, dimension(:,:), allocatable worldvar::ktcomp3

Variable for computed values for Kendalls Tau or RA calculation.

◆ ktcomp4

real, dimension(:,:), allocatable worldvar::ktcomp4

Variable for computed values for Kendalls Tau or RA calculation.

◆ ktnum

integer, dimension(:), allocatable worldvar::ktnum

Variable for number of pairs for Kendalls Tau or RA calculation.

◆ ktnum2

integer, dimension(:), allocatable worldvar::ktnum2

Variable for number of pairs for Kendalls Tau or RA calculation.

◆ ktnum3

integer, dimension(:), allocatable worldvar::ktnum3

Variable for number of pairs for Kendalls Tau or RA calculation.

◆ ktnum4

integer, dimension(:), allocatable worldvar::ktnum4

Variable for number of pairs for Kendalls Tau or RA calculation.

◆ ktrec

real, dimension(:,:), allocatable worldvar::ktrec

Variable for recorded values for Kendalls Tau or RA calculation.

◆ ktrec2

real, dimension(:,:), allocatable worldvar::ktrec2

Variable for recorded values for Kendalls Tau or RA calculation.

◆ ktrec3

real, dimension(:,:), allocatable worldvar::ktrec3

Variable for recorded values for Kendalls Tau or RA calculation.

◆ ktrec4

real, dimension(:,:), allocatable worldvar::ktrec4

Variable for recorded values for Kendalls Tau or RA calculation.

◆ linesearchcallcount

integer worldvar::linesearchcallcount

Total amount of line search calls.

◆ loadleakdir

character(len=maxcharpath) worldvar::loadleakdir

Directory for load and leak files (e.g. LeakageData.txt,...)

◆ logdir

character(len=maxcharpath) worldvar::logdir

Directory for log-files (e.g. hyss*.log, test*.log, ...)

◆ maptime

character(len=20), dimension(:), allocatable worldvar::maptime

Serie of time for map data.

◆ max_files

integer, parameter worldvar::max_files = 100000

Maximum number of files opened with get_fileunit (use by MODULE ASSIMILATION_INTERFACE for higher funits)

◆ max_forcingdata

integer, parameter worldvar::max_forcingdata = 10

Maximum number of forcing data variables.

◆ max_typeofoutput

integer, parameter worldvar::max_typeofoutput = 4

Maximum kinds of output; 1=basinoutput,2=mapoutput,3=timeoutput,4=regionoutput.

◆ max_typeofperiods

integer, parameter worldvar::max_typeofperiods = 6

Maximum kinds of output periods.

◆ maxcharpath

integer, parameter worldvar::maxcharpath = 400

Number of characters in path variables.

◆ maxclassdatacol

integer, parameter worldvar::maxclassdatacol = 17

Maximum number of columns in ClassData.

◆ maxclassingroup

integer, parameter worldvar::maxclassingroup = 100

Maximum number of classes in one class group or sagroup !TODO: use in SourceApp.

◆ maxcrit

integer, parameter worldvar::maxcrit = 100

Maximum numbers of criteria.

◆ maxcritbasins

integer, parameter worldvar::maxcritbasins = 150000

Maximum numbers of subbasins for criteria calculation.

◆ maxdatefiles

integer, parameter worldvar::maxdatefiles = 20

Maximum number of dated files; AtmdepData.txt and ClassData.txt.

◆ maxgeoclasscol

integer, parameter worldvar::maxgeoclasscol = 13

Maximum number of columns in GeoClass.

◆ maxlinelength

integer, parameter worldvar::maxlinelength = 6800000

Maximum number of characters on line for safe read/write ((16+1)*400000 subbasin)

◆ maxmap

integer worldvar::maxmap

◆ maxoptpar

integer, parameter worldvar::maxoptpar = 100

Maximum different parameters in optimization.

◆ maxoutbasins

integer, parameter worldvar::maxoutbasins = 10000

Maximum numbers of subbasins for subbasin output.

◆ maxperf

integer, parameter worldvar::maxperf = 25

Number of simulation assessment criteria.

◆ maxsubass

integer, parameter worldvar::maxsubass = 22

Number of subbasin assessment performance criteria (+ number of data points)

◆ meandaysofyear

real, parameter worldvar::meandaysofyear = 365.25

Average number of days in a year.

◆ modeldir

character(len=maxcharpath) worldvar::modeldir

Directory for model setup (e.g. GeoData.txt, update.txt,...)

◆ monthlypsfile

logical worldvar::monthlypsfile = .FALSE.

Flag for reading point sources monthly (PSMonthlySeries.txt)

◆ nacrit

integer worldvar::nacrit

Number of criteria with unique variables.

◆ nc_timedef

type(netcdf_time_definition) worldvar::nc_timedef

Variable for time definition of netcdf output files (default used if no Pobs.nc)

◆ nc_timevar

integer worldvar::nc_timevar

◆ ncfileatt_name

character(len=50), dimension(:), allocatable worldvar::ncfileatt_name

Attribute name, user specified in info.txt for netcdf output file.

◆ ncfileatt_text

character(len=500), dimension(:), allocatable worldvar::ncfileatt_text

Attribute value, user specified in info.txt for netcdf output file.

◆ ncmaxattr

integer, parameter worldvar::ncmaxattr = 50

Maximum numbers of user specified file attributes in info.txt.

◆ ncomrowsofwobs

integer worldvar::ncomrowsofwobs

Number of Wobs.txt comment rows.

◆ ncomrowsofxobs

integer worldvar::ncomrowsofxobs

Number of Xobs.txt comment rows.

◆ ncomrowsofxoregobs

integer worldvar::ncomrowsofxoregobs

Number of Xoregobs.txt comment rows.

◆ ncrit

integer worldvar::ncrit

Number of criteria to be included in calibration.

◆ ndt

integer worldvar::ndt

Number of time steps in simulation.

◆ noutput

integer worldvar::noutput

Number of output.

◆ noutreg

integer worldvar::noutreg

Number of output regions.

◆ nsubcrit

integer worldvar::nsubcrit

Number of subbasins+outregions used for subbasin criteria calculations.

◆ num_classgroups

integer worldvar::num_classgroups

Number of classgroups that should be read from GeoClass (0=don't read from GeoClass)

◆ numoptimpar

integer worldvar::numoptimpar

Effective amount of optimization parameters.

◆ numwobsstn

integer worldvar::numwobsstn

Number of wobs station.

◆ optim

type(optimizationtype) worldvar::optim

Variable defining optimisation tasks and number of simulations.

◆ optimfunccall

integer worldvar::optimfunccall

Total amount of model runs during calibration.

◆ optimstarttime

real worldvar::optimstarttime

CPU time at calibration start.

◆ optparid

integer, dimension(maxoptpar) worldvar::optparid

Index of optimisation parameter in modparid.

◆ optparmax

real, dimension(:,:), allocatable worldvar::optparmax

Upper limit of parameter space.

◆ optparmin

real, dimension(:,:), allocatable worldvar::optparmin

Lower limit of parameter space.

◆ optparprecision

real, dimension(:,:), allocatable worldvar::optparprecision

Decimal precision up to which parameter has to be calibrated.

◆ otherobsdir

character(len=maxcharpath) worldvar::otherobsdir

Directory for evaluation observations (e.g. Qobs.txt,...)

◆ outperiodname

character(len=2), dimension(0:max_typeofperiods), parameter worldvar::outperiodname = (/'TS','DD','WK','MO','YR','SP','HR'/)

◆ output

type(outputtype), dimension(:), allocatable worldvar::output

Information about wanted output.

◆ outputtimeformat

integer worldvar::outputtimeformat

File format of time for saved files; 0=only date, 1=date and time (HHMM)

◆ outregion

type(outregioninfotype), dimension(:), allocatable worldvar::outregion

Information about output regions (noutreg)

◆ outstartdate

type(datetype) worldvar::outstartdate

Date for first output and criteria calculation.

◆ outstate

type(outstatetype) worldvar::outstate

Information on state files to be written.

◆ outstateensemble

type(outstatetype) worldvar::outstateensemble

Information on data assimilation ensemble state files to be written.

◆ outvarclassinfo

type(outvarinfotype), dimension(:), allocatable worldvar::outvarclassinfo

variable to hold information about output for classes for print out in outvar

◆ outvarclassinfotemp

type(outvarinfotype), dimension(:), allocatable worldvar::outvarclassinfotemp

temporary variable to hold output for classes for print out in outvar

◆ outvarinfo

type(outvarinfotype), dimension(:), allocatable worldvar::outvarinfo

variable to hold information about output for print out in outvar

◆ outvarinfotemp

type(outvarinfotype), dimension(:), allocatable worldvar::outvarinfotemp

temporary variable to hold output for print out in outvar

◆ outvartest

type(testoutvartype), dimension(:), allocatable worldvar::outvartest

variable to save output testing values

◆ parindex

integer, dimension(:,:), allocatable worldvar::parindex

Parameter index and subbasin/landuse/soiltype.

◆ parseq

logical worldvar::parseq

Flag for use sequence number on par file, e.g. par_007.txt.

◆ performance_name

character(len=5), dimension(maxperf), parameter worldvar::performance_name = (/'rr2 ','sr2 ', 'mr2 ','rmae ','sre ','rre ','mre ','rra ', 'sra ','mra ','tau ','md2 ','mda ','mrs ', 'mcc ','mdkg ','akg ','asckg','mar ','mdnr ', 'mnw ','snr ','smb ','numrc','nummc'/)

Heading for performance criteria file.

◆ psdates

type(datetype), dimension(:), allocatable worldvar::psdates

Matrix with datetimes of changing point sources.

◆ pstscol

integer worldvar::pstscol

Number of data columns in PSTIMESeries.txt.

◆ qobs

real, dimension(:,:), allocatable worldvar::qobs

Matrix with all observed runoff data (time,stn)

◆ qobsdata

type(observationdatatype) worldvar::qobsdata

◆ qxtimeformat

integer, dimension(4) worldvar::qxtimeformat

File format of QXobs etc files; 0=only date, 1=date and time (HHMM) !temporary until these obs use obsdatatype.

◆ readadddate

type(datetype), dimension(maxdatefiles) worldvar::readadddate

Dates for new AtmdepData file, max 20 files.

◆ readclddate

type(datetype), dimension(maxdatefiles) worldvar::readclddate

Dates for new ClassData file, max 20 files.

◆ readdaily

logical worldvar::readdaily

Flag for read forcing data each time step instead of all in the beginning.

◆ readformat

integer worldvar::readformat

File format of obs-files; 0=ASCII, 4=netcdf.

◆ readnpddate

type(datetype), dimension(maxdatefiles) worldvar::readnpddate

Dates for new NonPointSourceData file, max 20 files.

◆ readobsid

logical worldvar::readobsid

Flag for read/use pobsid/tobsid/etc.

◆ readoutregion

logical worldvar::readoutregion

Flag for reading Outregions.txt.

◆ readpstime

logical worldvar::readpstime

Flag for using pointsource data as time series.

◆ readwobs

logical worldvar::readwobs = .FALSE.

Flag for reading wobs daily.

◆ resdir

character(len=maxcharpath) worldvar::resdir

Directory for result-files (e.g. simass.txt, 10001.txt, ...)

◆ resetstate

logical worldvar::resetstate

Flag for resetting soil states during simulation.

◆ resultseq

logical worldvar::resultseq

Flag for use sequence number on result files, e.g. timeCOUT_007.txt.

◆ rs

real, dimension(:,:), allocatable worldvar::rs

Variable for accumulate recorded values for periodmean.

◆ sdate

type(datetype) worldvar::sdate

End simulation date.

◆ seconds_per_day

integer, parameter worldvar::seconds_per_day = 86400

Seconds per day.

◆ simsequence

integer worldvar::simsequence

Number of the sequence to be simulated (used for PTobs and possibly result-files).

◆ simsubmodel

logical worldvar::simsubmodel

Flag for simulation of submodel smaller than basemodel.

◆ steplen

type(datetype) worldvar::steplen

Length of simulation time step, from timestep in info.txt.

◆ subassform

integer worldvar::subassform

Setting for output format in subass: 0=4 decimals, 1=scientific format.

◆ subassoutput

integer worldvar::subassoutput

Setting for output in subass: 0=none, 1=default, 2=extra output.

◆ subforcrit

logical, dimension(:), allocatable worldvar::subforcrit

Status of including subbasin in criteria calculation.

◆ subinclcrit

integer, dimension(:), allocatable worldvar::subinclcrit

Subid of subbasins to include in criteria calculation.

◆ subweightcrit

real, dimension(:), allocatable worldvar::subweightcrit

Weight of subbasin criteria in objective function/all model performance criteria.

◆ tmap

integer worldvar::tmap

Current period index for mapdata.

◆ ts

integer, dimension(:,:), allocatable worldvar::ts

Variable for accumulate number of values for periodmean.

◆ usestop84

logical worldvar::usestop84

Flag for using old stop-number 84 for ok simulation.

◆ weightsub

logical worldvar::weightsub = .FALSE.

Average criteria in objective function weighted by a given trust in each subcatchment.

◆ winxobsindex

integer, dimension(:), allocatable worldvar::winxobsindex

Index to find wstr in xobs-array.

◆ wobs

real, dimension(:,:), allocatable worldvar::wobs

Matrix with all observed lake water level data (alternative to xobs)

◆ writeattr

logical worldvar::writeattr

Flag for print out of metadata in result files (nc,time,map)

◆ writeload

logical worldvar::writeload

Flag for print out of yearly loads.

◆ writematlab

logical worldvar::writematlab

Flag for print out in format suitable for MATLAB to read.

◆ writencattr

logical worldvar::writencattr

Flag for print out of metadata in netcdf result files (only)

◆ xcgcol

integer worldvar::xcgcol = 0

Total number of data columns in xcgobs files, default is zero.

◆ xcgobs

real, dimension(:,:), allocatable worldvar::xcgobs

Matrix with all class observation data.

◆ xcgobsdata

type(observationdatatype), dimension(:,:), allocatable worldvar::xcgobsdata

◆ xcol

integer worldvar::xcol = 0

Number of columns in xobs, default is zero.

◆ xobs

real, dimension(:,:), allocatable worldvar::xobs

Matrix with all other observation data.

◆ xobsdata

type(observationdatatype), dimension(:), allocatable worldvar::xobsdata

◆ xorcol

integer worldvar::xorcol = 0

Number of columns in xoregobs, default is zero.

◆ xoregobs

real, dimension(:,:), allocatable worldvar::xoregobs

Matrix with all other outregion observation data.

◆ xregobsdata

type(observationdatatype), dimension(:), allocatable worldvar::xregobsdata

◆ yearlypsfile

logical worldvar::yearlypsfile = .FALSE.

Flag for reading point sources yearly (PSYearlySeries.txt)