5.13.2-dev0
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
mo_mpr_global_variables.f90
Go to the documentation of this file.
1!> \dir MPR
2!> \brief \copybrief f_mpr
3!> \details \copydetails f_mpr
4
5!> \defgroup f_mpr MPR - Fortran modules
6!> \brief Core modules of MPR.
7!> \details These modules provide the core components of the Multiscale Parameter Regionalization scheme of mHM.
8
9!> \file mo_mpr_global_variables.f90
10!> \brief \copybrief mo_mpr_global_variables
11!> \details \copydetails mo_mpr_global_variables
12
13!> \brief Global variables for mpr only
14!> \details Global variables used to run MPR for mHM.
15!> \authors Robert Schweppe
16!> \date Dec 2017
17!> \copyright Copyright 2005-\today, the mHM Developers, Luis Samaniego, Sabine Attinger: All rights reserved.
18!! mHM is released under the LGPLv3+ license \license_note
19!> \ingroup f_mpr
21
22 use mo_kind, only : i4, dp
23 use mo_common_types, only: period
24
25 implicit none
26
27 private
28
29 ! ------------------------------------------------------------------
30 ! SOIL DATA
31 ! ------------------------------------------------------------------
32 real(dp), public :: tillagedepth ! [mm] Soil depth down to which organic
33 ! matter is possible
34 integer(i4), public :: nsoiltypes ! Number of soil types
35 integer(i4), public :: iflag_soildb ! options to handle different soil databases
36 integer(i4), public :: nsoilhorizons_mhm ! Number of horizons to model
37 real(dp), dimension(:), allocatable, public :: horizondepth_mhm ! [mm] Horizon depth from surface,
38 ! positive downwards
39
41 ! dim1 = nSoilType (e.g. i=1..72 for BUEK)
42 ! dim2 = the maximum of nHorizons
43 ! dim3 = land cover classes
44 ! input data
45 integer(i4), dimension(:), allocatable :: id ! Soil Id
46 integer(i4), dimension(:), allocatable :: nhorizons ! Number of horizons
47 integer(i4), dimension(:), allocatable :: is_present ! Wether this soil type is present in
48 ! ! this domain or not
49 real(dp), dimension(:, :), allocatable :: ud ! [mm] Upper Bound of depth
50 real(dp), dimension(:, :), allocatable :: ld ! [mm] Lower Bound of depth
51 real(dp), dimension(:, :), allocatable :: clay ! [%] Clay content
52 real(dp), dimension(:, :), allocatable :: sand ! [%] Sand content
53 real(dp), dimension(:, :), allocatable :: dbm ! [g/cm2] Mineral Bulk density
54 real(dp), dimension(:, :), allocatable :: depth ! [mm] Depth of the soil Horizon
55 real(dp), dimension(:), allocatable :: rzdepth ! [mm] Total soil depth
56 real(dp), dimension(:, :, :), allocatable :: wd ! [1] Weights of mHM Horizons according to
57 ! ! horizons provided in soil database
58 integer(i4), dimension(:), allocatable :: ntillhorizons ! [1] Number of tillage horizons
59
60 ! derived soil hydraulic properties
61 real(dp), dimension(:, :, :), allocatable :: thetas_till ! [1] Saturated water content of soil horizons
62 ! ! tillage depth - f(OM, management)
63 real(dp), dimension(:, :), allocatable :: thetas ! [1] Saturated water content of soil horizons
64 ! ! after tillage depth
65 real(dp), dimension(:, :, :), allocatable :: db ! [g/cm2] Bulk density, LUC dependent
66 ! ! = f( OM, management)
67 real(dp), dimension(:, :, :), allocatable :: thetafc_till ! [1] Field capacity of tillage layers;
68 ! ! LUC dependent - f(OM, management)
69 real(dp), dimension(:, :), allocatable :: thetafc ! [1] Field capacity of deeper layers
70 real(dp), dimension(:, :, :), allocatable :: thetapw_till ! [1] Permament wilting point of tillage layers;
71 ! ! LUC dependent - f(OM, management)
72 real(dp), dimension(:, :), allocatable :: thetapw ! [1] Permanent wilting point of deeper layers
73 real(dp), dimension(:, :, :), allocatable :: ks ! [cm/d] Saturated hydaulic conductivity
74 end type soiltype
75 type(soiltype), public :: soildb ! The soil database
76
77 ! -----------------------------------------------------------------
78 ! GEOLOGICAL FORMATION data
79 ! -----------------------------------------------------------------
80 integer(i4), public :: ngeounits ! Number of geological formations
81 integer(i4), dimension(:), allocatable, public :: geounitlist ! List of ids of each geological formations
82 integer(i4), dimension(:), allocatable, public :: geounitkar ! Id of Karstic formation (0 == does not exist)
83
84 ! -----------------------------------------------------------------
85 ! Land cover, LAI LUT data
86 ! -----------------------------------------------------------------
87 character(256), public :: inputformat_gridded_lai ! format of gridded LAI data (nc only)
88 integer(i4), public :: timestep_lai_input ! time step of gridded LAI input
89 ! LAI data
90 ! variables used when timeStep_LAI_input == 0
91 integer(i4), public :: nlaiclass ! Number of LAI classes
92 integer(i4), public :: nlai ! Number of LAI slices (a.k.a timestep)
93 real(dp), dimension(:), allocatable, public :: laiboundaries !
94 integer(i4), public, dimension(:), allocatable :: laiunitlist ! List of ids of each LAI class in LAILUT
95 real(dp), public, dimension(:, :), allocatable :: lailut ! [m2/m2] Leaf area index for LAIUnit
96 ! ! dim1=land cover class, dim2=month of year
97 type(period), dimension(:), allocatable, public :: laiper ! time period for LAI_readin
98 real(dp), public :: fracsealed_cityarea ! fraction of area within city assumed to be
99 ! ! perfectly sealed [0-1]
100
101 ! -------------------------------------------------------------------
102 ! L0 DOMAIN description -> <only domain>
103 ! -------------------------------------------------------------------
104 ! mHM derived variables
105 ! dim1 = number grid cells L0
106 real(dp), public, dimension(:), allocatable :: l0_slope_emp ! Empirical quantiles of slope
107 !
108 real(dp), public, dimension(:, :), allocatable :: l0_gridded_lai ! gridded LAI data used when timeStep_LAI_input<0 or==1
109 ! ! dim1=number of gridcells, dim2=number LAI timesteps
110
111 real(dp), public, dimension(:), allocatable :: l0_slope ! [%] Slope
112 real(dp), public, dimension(:), allocatable :: l0_asp ! [degree] Aspect degree
113 ! [dim1=number grid cells, dim2=Number of soil horizons] note: for iFlag_soilDB=0, dim2=1
114 integer(i4), public, dimension(:, :), allocatable :: l0_soilid ! soil id (iFlag_soilDB = 0)
115 integer(i4), public, dimension(:), allocatable :: l0_geounit ! Geologic formation (unit)
116
117 ! ------------------------------------------------------------------
118 ! DIRECTORIES
119 ! ------------------------------------------------------------------
120 ! has the dimension of nDomains
121 character(256), dimension(:), allocatable, public :: dirgridded_lai ! Directory where gridded LAI is located
122 ! used when timeStep_LAI_input < 0
123
124 ! Effective parameters
125 ! dim1 = number grid cells L1
126 ! dim2 = number model soil horizons or YearMonths or other auxiliary dimension
127 ! dim3 = number of LCscenes
128 real(dp), public, dimension(:, :, :), allocatable :: l1_fsealed ! [1] Fraction of sealed area (nCells, nLCscenes)
129
130 real(dp), public, dimension(:, :, :), allocatable :: l1_alpha ! [1] Exponent for the upper reservoir
131 real(dp), public, dimension(:, :, :), allocatable :: l1_degdayinc ! [d-1 degC-1] Increase of the Degree-day factor
132 ! ! per mm of increase in precipitation
133 real(dp), public, dimension(:, :, :), allocatable :: l1_degdaymax ! [mm-1 degC-1] Maximum Degree-day factor
134 real(dp), public, dimension(:, :, :), allocatable :: l1_degdaynopre ! [mm-1 degC-1] Degree-day factor with no
135 ! precipitation.
136 real(dp), public, dimension(:, :, :), allocatable :: l1_degday ! [mm d-1degC-1] Degree-day factor.
137 real(dp), public, dimension(:, :, :), allocatable :: l1_karstloss ! [1] Karstic percolation loss
138 real(dp), public, dimension(:, :, :), allocatable :: l1_fasp ! [1] PET correction for aspect
139 real(dp), public, dimension(:, :, :), allocatable :: l1_petlaicorfactor ! [-] PET correction based on LAI (KC by GEUS.dk)
140
141 real(dp), public, dimension(:, :, :), allocatable :: l1_harsamcoeff ! [1] Hargreaves Samani coeffiecient
142 real(dp), public, dimension(:, :, :), allocatable :: l1_prietayalpha ! [1] Priestley Taylor coeffiecient
143 real(dp), public, dimension(:, :, :), allocatable :: l1_aeroresist ! [s m-1] aerodynamical resitance
144 real(dp), public, dimension(:, :, :), allocatable :: l1_surfresist ! [s m-1] bulk surface resitance
145 real(dp), public, dimension(:, :, :), allocatable :: l1_froots ! [1] Fraction of roots in soil horizons
146 real(dp), public, dimension(:, :, :), allocatable :: l1_maxinter ! [mm] Maximum interception
147
148 real(dp), public, dimension(:, :, :), allocatable :: l1_kfastflow ! [d-1] Fast interflow recession coefficient
149 real(dp), public, dimension(:, :, :), allocatable :: l1_kslowflow ! [d-1] Slow interflow recession coefficient
150 real(dp), public, dimension(:, :, :), allocatable :: l1_kbaseflow ! [d-1] Baseflow recession coefficient
151 real(dp), public, dimension(:, :, :), allocatable :: l1_kperco ! [d-1] percolation coefficient
152 real(dp), public, dimension(:, :, :), allocatable :: l1_soilmoistfc ! [mm] Soil moisture below which actual ET
153 ! ! is reduced linearly till PWP
154 real(dp), public, dimension(:, :, :), allocatable :: l1_soilmoistsat ! [mm] Saturation soil moisture for each horizon [mm]
155 real(dp), public, dimension(:, :, :), allocatable :: l1_soilmoistexp ! [1] Exponential parameter to how non-linear
156 ! ! is the soil water retention
157 real(dp), public, dimension(:, :, :), allocatable :: l1_jarvis_thresh_c1 ![1] jarvis critical value for normalized soil
158 ! ! water content
159 real(dp), public, dimension(:, :, :), allocatable :: l1_tempthresh ! [degC] Threshold temperature for snow/rain
160 real(dp), public, dimension(:, :, :), allocatable :: l1_unsatthresh ! [mm] Threshold waterdepth controlling fast interflow
161 real(dp), public, dimension(:, :, :), allocatable :: l1_sealedthresh ! [mm] Threshold waterdepth for surface runoff
162 ! ! in sealed surfaces
163 real(dp), public, dimension(:, :, :), allocatable :: l1_wiltingpoint ! [mm] Permanent wilting point: below which neither
164 ! ! plant can take water nor water can drain in
165 ! >> COSMIC neutron count realated parameters -- only those which are regionlized
166 !! defined here others are treated as global parameters...
167 real(dp), public, dimension(:,:,:), allocatable :: l1_no_count ! N0 COUNT >> in Desilets and COSMIC routines
168 real(dp), public, dimension(:,:,:), allocatable :: l1_bulkdens ! Bulk density >> in COSMIC routines
169 real(dp), public, dimension(:,:,:), allocatable :: l1_latticewater ! lattice water >> in COSMIC routines
170 real(dp), public, dimension(:,:,:), allocatable :: l1_cosmicl3 ! !COSMIC L3 >> in COSMIC routines
171
Provides common types needed by mHM, mRM and/or mpr.
Global variables for mpr only.
real(dp), dimension(:, :, :), allocatable, public l1_degday
integer(i4), dimension(:), allocatable, public geounitkar
character(256), dimension(:), allocatable, public dirgridded_lai
real(dp), dimension(:, :, :), allocatable, public l1_degdaymax
integer(i4), dimension(:), allocatable, public geounitlist
real(dp), dimension(:, :, :), allocatable, public l1_soilmoistexp
real(dp), dimension(:, :, :), allocatable, public l1_harsamcoeff
type(period), dimension(:), allocatable, public laiper
real(dp), dimension(:, :, :), allocatable, public l1_karstloss
integer(i4), dimension(:), allocatable, public laiunitlist
real(dp), dimension(:, :, :), allocatable, public l1_unsatthresh
real(dp), dimension(:, :, :), allocatable, public l1_kperco
real(dp), dimension(:), allocatable, public l0_slope_emp
real(dp), dimension(:, :, :), allocatable, public l1_alpha
real(dp), dimension(:, :, :), allocatable, public l1_surfresist
integer(i4), dimension(:), allocatable, public l0_geounit
real(dp), dimension(:,:,:), allocatable, public l1_cosmicl3
real(dp), dimension(:), allocatable, public l0_asp
real(dp), dimension(:, :, :), allocatable, public l1_degdayinc
real(dp), dimension(:, :, :), allocatable, public l1_petlaicorfactor
real(dp), dimension(:, :, :), allocatable, public l1_fasp
real(dp), dimension(:, :, :), allocatable, public l1_kbaseflow
real(dp), dimension(:, :), allocatable, public lailut
real(dp), dimension(:, :, :), allocatable, public l1_soilmoistfc
integer(i4), public nsoilhorizons_mhm
real(dp), dimension(:, :, :), allocatable, public l1_maxinter
real(dp), dimension(:,:,:), allocatable, public l1_bulkdens
real(dp), dimension(:, :, :), allocatable, public l1_degdaynopre
real(dp), dimension(:, :, :), allocatable, public l1_wiltingpoint
integer(i4), dimension(:, :), allocatable, public l0_soilid
real(dp), dimension(:, :), allocatable, public l0_gridded_lai
real(dp), dimension(:, :, :), allocatable, public l1_prietayalpha
real(dp), dimension(:, :, :), allocatable, public l1_fsealed
real(dp), dimension(:), allocatable, public laiboundaries
real(dp), dimension(:, :, :), allocatable, public l1_froots
character(256), public inputformat_gridded_lai
real(dp), dimension(:, :, :), allocatable, public l1_jarvis_thresh_c1
real(dp), dimension(:, :, :), allocatable, public l1_tempthresh
real(dp), dimension(:), allocatable, public horizondepth_mhm
real(dp), dimension(:,:,:), allocatable, public l1_no_count
real(dp), dimension(:, :, :), allocatable, public l1_kfastflow
real(dp), dimension(:, :, :), allocatable, public l1_kslowflow
real(dp), dimension(:, :, :), allocatable, public l1_aeroresist
real(dp), dimension(:, :, :), allocatable, public l1_sealedthresh
integer(i4), public timestep_lai_input
real(dp), dimension(:, :, :), allocatable, public l1_soilmoistsat
real(dp), dimension(:), allocatable, public l0_slope
real(dp), dimension(:,:,:), allocatable, public l1_latticewater