5.13.2-dev0
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
mo_global_variables.f90
Go to the documentation of this file.
1!> \dir src
2!> \brief Source code of mHM.
3!> \details All Fortran source files for mHM, mRM and MPR.
4
5!> \dir mHM
6!> \brief \copybrief f_mhm
7!> \details \copydetails f_mhm
8
9!> \defgroup f_mhm mHM - Fortran modules
10!> \brief Core modules of mHM.
11!> \details These modules provide the core components of mHM.
12
13!> \file mo_global_variables.f90
14!> \brief \copybrief mo_global_variables
15!> \details \copydetails mo_global_variables
16
17!> \brief Main global variables for mHM.
18!> \details Global variables ONLY used in reading, writing and startup.
19!> \changelog
20!! - Robert Schweppe Jun 2018
21!! - refactoring and reformatting
22!! - Luis Samaniego, Feb 2013
23!! - new variable names, new modules, units
24!! - Rohini Kumar, Jul 2013
25!! - fraction of perfectly sealed area within city added
26!! - Rohini Kumar, Aug 2013
27!! - name changed "inputFormat" to "inputFormat_meteo_forcings"
28!! - Rohini Kumar, Aug 2013
29!! - name changed from "L0_LAI" to "L0_LCover_LAI"
30!! - Rohini Kumar, Aug 2013
31!! - added dirSoil_LUT and dirGeology_LUT
32!! - Luis Samaniego, Nov 2013
33!! - documentation of dimensions
34!! - Matthias Zink, Nov 2013
35!! - added "InflowGauge" and inflow gauge variabels in Domain
36!! - Rohini Kumar, May 2014
37!! - added options for the model run cordinate system
38!! - Stephan Thober, Jun 2014
39!! - added timeStep_model_inputs and readPer
40!! - Stephan Thober, Jun 2014
41!! - added perform_mpr, updated restart flags
42!! - Cuntz M. & Mai J., Nov 2014
43!! - LAI input from daily, monthly or yearly files
44!! - Matthias Zink, Dec 2014
45!! - adopted inflow gauges to ignore headwater cells
46!! - Matthias Zink, Mar 2015
47!! - added optional soil mositure readin: dirSoil_moisture, L1_sm
48!! - Stephan Thober, Aug 2015
49!! - moved routing related variables to mRM
50!! - Oldrich Rakovec, Oct 2015
51!! - added definition of Domain averaged TWS data
52!! - Rohini Kumar, Mar 2016
53!! - new variables for handling different soil databases
54!! - Johann Brenner, Feb 2017
55!! - added optional evapotranspiration readin: dirEvapotranspiration, L1_et
56!! - Zink M. Demirel C., Mar 2017
57!! - added Jarvis soil water stress variable for SM process(3)
58!! - Demirel M.C. May 2017
59!! - added L1_petLAIcorFactor for PET correction
60!! - O. Rakovec, R.Kumar Nov 2017
61!! - added project description for the netcdf outputs
62!! - Robert Schweppe, Dec 2017
63!! - expanded dimensions of effective parameters
64!! - Robert Schweppe, Dec 2017
65!! - merged duplicated variables with mrm into common variables
66!> \authors Luis Samaniego
67!> \date Dec 2012
68!> \copyright Copyright 2005-\today, the mHM Developers, Luis Samaniego, Sabine Attinger: All rights reserved.
69!! mHM is released under the LGPLv3+ license \license_note
70!> \ingroup f_mhm
72
73 USE mo_kind, ONLY : i4, dp
74 USE mo_constants, ONLY : yearmonths
76 USE mo_optimization_types, ONLY : optidata
79
80 IMPLICIT NONE
81
82 ! -------------------------------------------------------------------
83 ! COUPLING CONFIG
84 ! -------------------------------------------------------------------
85 type(couple_cfg_type), public :: couple_cfg !< coupling configuration class
86
87 ! -------------------------------------------------------------------
88 ! METEO HANDLER
89 ! -------------------------------------------------------------------
90 type(meteo_handler_type), public :: meteo_handler !< the meteo handler class
91
92 ! -------------------------------------------------------------------
93 ! DEFINE OUTPUTS
94 ! -------------------------------------------------------------------
95 integer(i4) :: output_deflate_level !< deflate level in nc files
96 integer(i4) :: output_time_reference !< time reference point location in output nc files
97 logical :: output_double_precision !< output precision in nc files
98 integer(i4) :: timestep_model_outputs !< timestep for writing model outputs
99 logical, dimension(nOutFlxState) :: outputflxstate !< Define model outputs see "mhm_outputs.nml"
100 !< dim1 = number of output variables to be written
101
102 ! soil moisture
103 real(dp), public, dimension(:, :), allocatable :: l1_sm !< [-] soil moisture input for optimization
104 logical, public, dimension(:, :), allocatable :: l1_sm_mask !< [-] mask for valid data in L1_sm
105 ! neutrons
106 real(dp), public, dimension(:, :), allocatable :: l1_neutronsdata !< [cph] ground albedo neutrons input
107 logical, public, dimension(:, :), allocatable :: l1_neutronsdata_mask !< [cph] mask for valid data in L1_neutrons
108
109 ! soil moisture
110 integer(i4) :: nsoilhorizons_sm_input ! No. of mhm soil horizons equivalent to sm input
111
112 type(optidata), public, dimension(:), allocatable :: l1_smobs
113 ! neutrons
114 type(optidata), public, dimension(:), allocatable :: l1_neutronsobs
115 ! evapotranspiration
116 type(optidata), public, dimension(:), allocatable :: l1_etobs
117 ! tws
118 type(optidata), public, dimension(:), allocatable :: l1_twsaobs !< this stores L1_tws, the mask, the directory of the
119 !< observerd data, and the
120 !< timestepInput of the simulated data
121 ! ToDo: add unit
122 logical, public :: bfi_calc !< calculate observed BFI from gauges with Eckhardt filter
123 real(dp), public, dimension(:), allocatable :: bfi_obs !< given base-flow index per domain
124 real(dp), public, dimension(:), allocatable :: bfi_qbf_sum !< q2 weighted sum for each domain
125 real(dp), public, dimension(:), allocatable :: bfi_qt_sum !< q2 weighted sum for each domain
126
127 ! State variables
128 ! dim1 = number grid cells L1
129 ! dim2 = number model soil horizons
130 real(dp), public, dimension(:), allocatable :: l1_inter !< [mm] Interception
131 real(dp), public, dimension(:), allocatable :: l1_snowpack !< [mm] Snowpack
132 real(dp), public, dimension(:), allocatable :: l1_sealstw !< [mm] Retention storage of impervious areas
133 real(dp), public, dimension(:, :), allocatable :: l1_soilmoist !< [mm] Soil moisture of each horizon
134 real(dp), public, dimension(:), allocatable :: l1_unsatstw !< [mm] upper soil storage
135 real(dp), public, dimension(:), allocatable :: l1_satstw !< [mm] groundwater storage
136 real(dp), public, dimension(:), allocatable :: l1_neutrons !< [mm] Ground Albedo Neutrons
137
138 ! Fluxes
139 ! dim1 = number grid cells L1
140 ! disaggregated meteo forcings
141 real(dp), public, dimension(:), allocatable :: l1_pet_calc !< [mm TS-1] estimated/corrected potential evapotranspiration
142 real(dp), public, dimension(:), allocatable :: l1_temp_calc !< [degC] temperature for current time step
143 real(dp), public, dimension(:), allocatable :: l1_prec_calc !< [mm TS-1] precipitation for current time step
144 ! dim2 = number model soil horizons
145 ! states and fluxes
146 real(dp), public, dimension(:, :), allocatable :: l1_aetsoil !< [mm TS-1] Actual ET from soil layers
147 real(dp), public, dimension(:), allocatable :: l1_aetcanopy !< [mm TS-1] Real evaporation intensity from canopy
148 real(dp), public, dimension(:), allocatable :: l1_aetsealed !< [mm TS-1] Real evap. from free water surfaces
149 real(dp), public, dimension(:), allocatable :: l1_baseflow !< [mm TS-1] Baseflow
150 real(dp), public, dimension(:, :), allocatable :: l1_infilsoil !< [mm TS-1] Infiltration intensity each soil horizon
151 real(dp), public, dimension(:), allocatable :: l1_fastrunoff !< [mm TS-1] Fast runoff component
152 real(dp), public, dimension(:), allocatable :: l1_melt !< [mm TS-1] Melting snow depth.
153 real(dp), public, dimension(:), allocatable :: l1_percol !< [mm TS-1] Percolation.
154 real(dp), public, dimension(:), allocatable :: l1_preeffect !< [mm TS-1] Effective precip. depth (snow melt + rain)
155 real(dp), public, dimension(:), allocatable :: l1_rain !< [mm TS-1] Rain precipitation depth
156 real(dp), public, dimension(:), allocatable :: l1_runoffseal !< [mm TS-1] Direct runoff from impervious areas
157 real(dp), public, dimension(:), allocatable :: l1_slowrunoff !< [mm TS-1] Slow runoff component
158 real(dp), public, dimension(:), allocatable :: l1_snow !< [mm TS-1] Snow precipitation depth
159 real(dp), public, dimension(:), allocatable :: l1_throughfall !< [mm TS-1] Throughfall.
160 real(dp), public, dimension(:), allocatable :: l1_total_runoff !< [m3 TS-1] Generated runoff
161
162 ! -------------------------------------------------------------------
163 ! Monthly day/night variation of Meteorological variables
164 ! for temporal disaggregation
165 ! -------------------------------------------------------------------
166 ! dim1 = number of months in a year
167 real(dp), public, dimension(int(YearMonths, i4)) :: evap_coeff !< [-] Evap. coef. for free-water surfaces
168
169 ! -------------------------------------------------------------------
170 ! AUXILIARY VARIABLES
171 ! -------------------------------------------------------------------
172 !
173
174 real(dp), public, dimension(:), allocatable :: neutron_integral_afast !< pre-calculated integrand for
175 ! vertical projection of isotropic neutron flux
176
177END MODULE mo_global_variables
Types to specify the coupling configuration of mHM.
Main global variables for mHM.
type(meteo_handler_type), public meteo_handler
the meteo handler class
real(dp), dimension(:), allocatable, public l1_slowrunoff
[mm TS-1] Slow runoff component
real(dp), dimension(:, :), allocatable, public l1_aetsoil
[mm TS-1] Actual ET from soil layers
real(dp), dimension(:), allocatable, public l1_rain
[mm TS-1] Rain precipitation depth
real(dp), dimension(:), allocatable, public l1_aetsealed
[mm TS-1] Real evap.
real(dp), dimension(:, :), allocatable, public l1_sm
[-] soil moisture input for optimization
real(dp), dimension(:), allocatable, public l1_satstw
[mm] groundwater storage
logical, dimension(noutflxstate) outputflxstate
Define model outputs see "mhm_outputs.nml" dim1 = number of output variables to be written.
real(dp), dimension(:), allocatable, public l1_aetcanopy
[mm TS-1] Real evaporation intensity from canopy
type(optidata), dimension(:), allocatable, public l1_twsaobs
this stores L1_tws, the mask, the directory of the observerd data, and the timestepInput of the simul...
real(dp), dimension(:, :), allocatable, public l1_neutronsdata
[cph] ground albedo neutrons input
real(dp), dimension(:), allocatable, public l1_snow
[mm TS-1] Snow precipitation depth
logical, public bfi_calc
calculate observed BFI from gauges with Eckhardt filter
real(dp), dimension(:), allocatable, public l1_preeffect
[mm TS-1] Effective precip.
type(optidata), dimension(:), allocatable, public l1_neutronsobs
real(dp), dimension(:), allocatable, public l1_inter
[mm] Interception
real(dp), dimension(:), allocatable, public neutron_integral_afast
pre-calculated integrand for
real(dp), dimension(:), allocatable, public l1_sealstw
[mm] Retention storage of impervious areas
real(dp), dimension(:), allocatable, public l1_percol
[mm TS-1] Percolation.
type(couple_cfg_type), public couple_cfg
coupling configuration class
type(optidata), dimension(:), allocatable, public l1_smobs
real(dp), dimension(:, :), allocatable, public l1_soilmoist
[mm] Soil moisture of each horizon
integer(i4) timestep_model_outputs
timestep for writing model outputs
integer(i4) output_deflate_level
deflate level in nc files
logical output_double_precision
output precision in nc files
logical, dimension(:, :), allocatable, public l1_sm_mask
[-] mask for valid data in L1_sm
logical, dimension(:, :), allocatable, public l1_neutronsdata_mask
[cph] mask for valid data in L1_neutrons
integer(i4) output_time_reference
time reference point location in output nc files
real(dp), dimension(int(yearmonths, i4)), public evap_coeff
[-] Evap.
real(dp), dimension(:), allocatable, public bfi_qbf_sum
q2 weighted sum for each domain
real(dp), dimension(:), allocatable, public bfi_qt_sum
q2 weighted sum for each domain
real(dp), dimension(:), allocatable, public l1_pet_calc
[mm TS-1] estimated/corrected potential evapotranspiration
real(dp), dimension(:), allocatable, public l1_unsatstw
[mm] upper soil storage
type(optidata), dimension(:), allocatable, public l1_etobs
real(dp), dimension(:), allocatable, public l1_melt
[mm TS-1] Melting snow depth.
real(dp), dimension(:), allocatable, public l1_fastrunoff
[mm TS-1] Fast runoff component
real(dp), dimension(:), allocatable, public l1_snowpack
[mm] Snowpack
real(dp), dimension(:), allocatable, public l1_neutrons
[mm] Ground Albedo Neutrons
real(dp), dimension(:), allocatable, public l1_prec_calc
[mm TS-1] precipitation for current time step
real(dp), dimension(:), allocatable, public l1_runoffseal
[mm TS-1] Direct runoff from impervious areas
real(dp), dimension(:, :), allocatable, public l1_infilsoil
[mm TS-1] Infiltration intensity each soil horizon
real(dp), dimension(:), allocatable, public l1_baseflow
[mm TS-1] Baseflow
real(dp), dimension(:), allocatable, public l1_throughfall
[mm TS-1] Throughfall.
real(dp), dimension(:), allocatable, public bfi_obs
given base-flow index per domain
real(dp), dimension(:), allocatable, public l1_temp_calc
[degC] temperature for current time step
real(dp), dimension(:), allocatable, public l1_total_runoff
[m3 TS-1] Generated runoff
Class for the meteo handler.
Provides mHM specific constants.
integer(i4), parameter, public noutflxstate
This is a container to hold all coupling configurations for mHM.
This is a handler for the meteorological forcings.