5.13.3-dev0
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
mo_namelists.f90
Go to the documentation of this file.
1!> \file mo_namelists.f90
2!> \copydoc mo_namelists
3
4!> \brief Module containing all namelists representations.
5!> \version 0.1
6!> \authors Sebastian Mueller
7!> \date Jul 2022
8!> \copyright Copyright 2005-\today, the mHM Developers, Luis Samaniego, Sabine Attinger: All rights reserved.
9!! mHM is released under the LGPLv3+ license \license_note
10!> \ingroup f_common
12
13 use mo_kind, only : i4, i8, dp
14 use mo_nml, only : position_nml
15 use mo_constants, only : yearmonths
19 use mo_common_types, only : period
22 use mo_mrm_constants, only : maxnogauges, mrm_noutflxstate => noutflxstate
23 use mo_string_utils, only : num2str
24 use mo_sentinel, only : set_sentinel
25
26 implicit none
27
28 !######## mo_common_read_config
29
30 ! namelist /project_description/ &
31 ! project_details, &
32 ! setup_description, &
33 ! simulation_type, &
34 ! Conventions, &
35 ! contact, &
36 ! mHM_details, &
37 ! history
38 !
39 !> \class nml_project_description_t
40 !> \brief 'project_description' namelist content
42 character(19) :: name = "project_description" !< namelist name
43 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
44 character(1024) :: project_details !< project including funding instituion., PI, etc.
45 character(1024) :: setup_description !< any specific description of simulation
46 character(1024) :: simulation_type !< e.g. seasonal forecast, climate projection, ...
47 character(256) :: conventions !< convention used for dataset
48 character(1024) :: contact !< contact details, incl. PI name
49 character(1024) :: mhm_details !< developing institution, specific mHM revision
50 character(1024) :: history !< details on version/creation date
51 contains
52 procedure, public :: read => read_project_description
54 !> 'project_description' namelist content
56
57 ! namelist /directories_general/ &
58 ! dirConfigOut, &
59 ! dirCommonFiles, &
60 ! dir_Morpho, &
61 ! dir_LCover, &
62 ! dir_Out, &
63 ! mhm_file_RestartOut, &
64 ! mrm_file_RestartOut, &
65 ! file_LatLon
66 !
67 !> \class nml_directories_general_t
68 !> \brief 'directories_general' namelist content
70 character(19) :: name = "directories_general" !< namelist name
71 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
72 character(256) :: dirconfigout !< directory for config file output
73 character(256) :: dircommonfiles !< directory where common input files should be located
74 character(256), dimension(maxNoDomains) :: mhm_file_restartout !< Directory where mhm output of restart is written
75 character(256), dimension(maxNoDomains) :: mrm_file_restartout !< Directory where mrm output of restart is written
76 character(256), dimension(maxNoDomains) :: dir_morpho !< Directory where morphological files are located
77 character(256), dimension(maxNoDomains) :: dir_lcover !< Directory where land cover files are located
78 character(256), dimension(maxNoDomains) :: dir_out !< Directory where output is written to
79 character(256), dimension(maxNoDomains) :: file_latlon !< Directory where the Lat Lon Files are located
80 contains
81 procedure, public :: read => read_directories_general
83 !> 'directories_general' namelist content
85
86 ! namelist /mainconfig/ &
87 ! iFlag_cordinate_sys, &
88 ! resolution_Hydrology, &
89 ! nDomains, &
90 ! L0Domain, &
91 ! write_restart, &
92 ! read_opt_domain_data
93 !
94 !> \class nml_mainconfig_t
95 !> \brief 'mainconfig' namelist content
96 type, public :: nml_mainconfig_t
97 character(10) :: name = "mainconfig" !< namelist name
98 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
99 integer(i4) :: iflag_cordinate_sys !< options model for the run cordinate system
100 real(dp), dimension(maxNoDomains) :: resolution_hydrology !< [m or degree] resolution of hydrology - Level 1
101 integer(i4) :: ndomains !< number of domains
102 integer(i4), dimension(maxNoDomains) :: l0domain !< specify same index for domains to share L0_data to save memory
103 logical :: write_restart !< flag to write restart
104 integer(i4), dimension(maxNoDomains) :: read_opt_domain_data !< read domain specific optional data
105 contains
106 procedure, public :: read => read_mainconfig
107 end type nml_mainconfig_t
108 !> 'mainconfig' namelist content
110
111 ! namelist /processSelection/ &
112 ! processCase
113 !
114 !> \class nml_processselection_t
115 !> \brief 'processSelection' namelist content
117 character(16) :: name = "processselection" !< namelist name
118 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
119 integer(i4), dimension(nProcesses) :: processcase !< ! Choosen process description number
120 contains
121 procedure, public :: read => read_processselection
123 !> 'processSelection' namelist content
125
126 ! namelist /LCover/ &
127 ! nLcoverScene, &
128 ! LCoverYearStart, &
129 ! LCoverYearEnd, &
130 ! LCoverfName
131 !
132 !> \class nml_lcover_t
133 !> \brief 'LCover' namelist content
134 type, public :: nml_lcover_t
135 character(6) :: name = "lcover" !< namelist name
136 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
137 integer(i4) :: nlcoverscene !< Number of land cover scene (lcs)
138 integer(i4), dimension(maxNLCovers) :: lcoveryearstart !< starting year LCover
139 integer(i4), dimension(maxNLCovers) :: lcoveryearend !< ending year LCover
140 character(256), dimension(maxNLCovers) :: lcoverfname !< filename of Lcover file
141 contains
142 procedure, public :: read => read_lcover
143 end type nml_lcover_t
144 !> 'LCover' namelist content
145 type(nml_lcover_t), public :: nml_lcover
146
147 !######## mo_mHM_mRM_read_config
148
149 ! namelist /mainconfig_mhm_mrm/ &
150 ! timestep, &
151 ! resolution_Routing, &
152 ! optimize, &
153 ! optimize_restart, &
154 ! opti_method, &
155 ! opti_function, &
156 ! read_restart, &
157 ! mrm_read_river_network, &
158 ! read_old_style_restart_bounds, &
159 ! mhm_file_RestartIn, &
160 ! mrm_file_RestartIn
161 !
162 !> \class nml_mainconfig_mhm_mrm_t
163 !> \brief 'mainconfig_mhm_mrm' namelist content
165 character(18) :: name = "mainconfig_mhm_mrm" !< namelist name
166 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
167 integer(i4) :: timestep !< [h] simulation time step (= TS) in [h] either 1, 2, 3, 4, 6, 12 or 24
168 real(dp), dimension(maxNoDomains) :: resolution_routing !< resolution of Level-11 discharge routing [m or degree] per domain
169 logical :: optimize !< Optimization (.true.) or Evaluation run (.false.)
170 logical :: optimize_restart !< Optimization will be restarted from mo_<opti_method>.restart file (.true.)
171 integer(i4) :: opti_method !< Optimization algorithm: 1 - DDS; 2 - Simulated Annealing; 3 - SCE
172 integer(i4) :: opti_function !< Objective function
173 logical :: read_restart !< flag for reading restart output
174 logical :: mrm_read_river_network !< flag to read the river network for mRM (read_restart = .True. forces .True.)
175 logical :: read_old_style_restart_bounds !< flag to use an old-style restart file created by mhm<=v5.11
176 logical :: restart_reset_fluxes_states !< flag to reset fluxes and states read from restart to default values
177 character(256), dimension(maxNoDomains) :: mhm_file_restartin !< mhm restart file paths
178 character(256), dimension(maxNoDomains) :: mrm_file_restartin !< mrm restart file paths
179 contains
180 procedure, public :: read => read_mainconfig_mhm_mrm
182 !> 'mainconfig_mhm_mrm' namelist content
184
185 ! namelist /Optimization/ &
186 ! nIterations, &
187 ! seed, &
188 ! dds_r, &
189 ! sa_temp, &
190 ! sce_ngs, &
191 ! sce_npg, &
192 ! sce_nps, &
193 ! mcmc_opti, &
194 ! mcmc_error_params
195 !
196 !> \class nml_optimization_t
197 !> \brief 'optimization' namelist content
198 type, public :: nml_optimization_t
199 character(12) :: name = "optimization" !< namelist name
200 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
201 integer(i4) :: niterations !< number of iterations for optimization
202 integer(i8) :: seed !< seed used for optimization, default: -9 --> system time
203 real(dp) :: dds_r !< DDS: perturbation rate, default: 0.2
204 real(dp) :: sa_temp !< SA: initial temperature, default: -9.0 --> estimated
205 integer(i4) :: sce_ngs !< SCE: # of complexes, default: 2
206 integer(i4) :: sce_npg !< SCE: # of points per complex,default: -9 --> 2n+1
207 integer(i4) :: sce_nps !< SCE: # of points per subcomplex,default: -9 --> n+1
208 logical :: mcmc_opti !< MCMC: optimization (.true.) or only parameter uncertainty (.false.)
209 real(dp), dimension(nerror_model) :: mcmc_error_params !< error model para (mcmc_opti=.false.) e.g. for opti_function=8: .01, .3
210 contains
211 procedure, public :: read => read_optimization
212 end type nml_optimization_t
213 !> 'optimization' namelist content
215
216 ! namelist /time_periods/ &
217 ! warming_Days, &
218 ! eval_Per
219 !
220 !> \class nml_time_periods_t
221 !> \brief 'time_periods' namelist content
222 type, public :: nml_time_periods_t
223 character(12) :: name = "time_periods" !< namelist name
224 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
225 integer(i4), dimension(maxNoDomains) :: warming_days !< number of days for warm up period
226 type(period), dimension(maxNoDomains) :: eval_per !< time period for model evaluation
227 contains
228 procedure, public :: read => read_time_periods
229 end type nml_time_periods_t
230 !> 'time_periods' namelist content
232
233 !######## mo_mhm_read_config
234
235 ! namelist /directories_mhm/ &
236 ! inputFormat_meteo_forcings, &
237 ! dir_Precipitation, &
238 ! dir_Temperature, &
239 ! dir_ReferenceET, &
240 ! dir_MinTemperature, &
241 ! dir_MaxTemperature, &
242 ! dir_absVapPressure, &
243 ! dir_windspeed, &
244 ! dir_NetRadiation, &
245 ! dir_Radiation, &
246 ! time_step_model_inputs
247 !
248 !> \class nml_directories_mhm_t
249 !> \brief 'directories_mhm' namelist content
250 type, public :: nml_directories_mhm_t
251 character(15) :: name = "directories_mhm" !< namelist name
252 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
253 !> .FALSE. to only warn about bound (lower, upper) violations in meteo files, default = .TRUE. - raise an error
254 logical :: bound_error = .true.
255 character(256), public :: inputformat_meteo_forcings !< format of meteo input data (nc)
256 character(256), dimension(maxNoDomains) :: dir_meteo_header !< Directory where the meteo header file is located
257 character(256), dimension(maxNoDomains) :: dir_precipitation !< Directory where precipitation files are located
258 character(256), dimension(maxNoDomains) :: dir_temperature !< Directory where temperature files are located
259 character(256), dimension(maxNoDomains) :: dir_referenceet !< Directory where reference-ET files are located
260 character(256), dimension(maxNoDomains) :: dir_mintemperature !< Directory where minimum temp. files are located
261 character(256), dimension(maxNoDomains) :: dir_maxtemperature !< Directory where maximum temp. files are located
262 character(256), dimension(maxNoDomains) :: dir_absvappressure !< Directory where abs. vap. pressure files are located
263 character(256), dimension(maxNoDomains) :: dir_windspeed !< Directory where windspeed files are located
264 character(256), dimension(maxNoDomains) :: dir_netradiation !< Directory where abs. vap. pressure files are located
265 character(256), dimension(maxNoDomains) :: dir_radiation !< riv-temp related: directory of (long/short-wave)radiation
266 integer(i4), dimension(maxNoDomains) :: time_step_model_inputs !< frequency for reading meteo input
267 contains
268 procedure, public :: read => read_directories_mhm
269 end type nml_directories_mhm_t
270 !> 'directories_mhm' namelist content
272
273 ! namelist /optional_data/ &
274 ! nSoilHorizons_sm_input, &
275 ! dir_soil_moisture, &
276 ! dir_neutrons, &
277 ! dir_evapotranspiration, &
278 ! dir_TWS, &
279 ! timeStep_sm_input, &
280 ! timeStep_neutrons_input, &
281 ! timeStep_et_input, &
282 ! timeStep_tws_input
283 !
284 !> \class nml_optional_data_t
285 !> \brief 'optional_data' namelist content
286 type, public :: nml_optional_data_t
287 character(13) :: name = "optional_data" !< namelist name
288 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
289 integer(i4) :: nsoilhorizons_sm_input !< No. of mhm soil horizons equivalent to sm input
290 character(256), dimension(maxNoDomains) :: dir_soil_moisture !< soil moisture input
291 character(256), dimension(maxNoDomains) :: dir_neutrons !< ground albedo neutron input
292 character(256), dimension(maxNoDomains) :: dir_evapotranspiration !< evapotranspiration input
293 character(256), dimension(maxNoDomains) :: dir_tws !< tws input
294 integer(i4) :: timestep_sm_input !< time step of optional data: sm
295 integer(i4) :: timestep_neutrons_input !< time step of optional data: neutrons
296 integer(i4) :: timestep_et_input !< time step of optional data: et
297 integer(i4) :: timestep_tws_input !< time step of optional data: tws
298 contains
299 procedure, public :: read => read_optional_data
300 end type nml_optional_data_t
301 !> 'optional_data' namelist content
303
304 ! namelist /panevapo/ &
305 ! evap_coeff
306 !
307 !> \class nml_panevapo_t
308 !> \brief 'panevapo' namelist content
309 type, public :: nml_panevapo_t
310 character(8) :: name = "panevapo" !< namelist name
311 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
312 real(dp), dimension(int(YearMonths, i4)) :: evap_coeff !< [-] Evap. coef. for free-water surfaces
313 contains
314 procedure, public :: read => read_panevapo
315 end type nml_panevapo_t
316 !> 'panevapo' namelist content
318
319 ! namelist /nightdayratio/ &
320 ! read_meteo_weights, &
321 ! fnight_prec, &
322 ! fnight_pet, &
323 ! fnight_temp, &
324 ! fnight_ssrd, &
325 ! fnight_strd
326 !
327 !> \class nml_nightdayratio_t
328 !> \brief 'nightdayratio' namelist content
329 type, public :: nml_nightdayratio_t
330 character(13) :: name = "nightdayratio" !< namelist name
331 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
332 logical :: read_meteo_weights !< read weights for meteo data
333 real(dp), dimension(int(YearMonths, i4)) :: fnight_prec !< [-] Night ratio precipitation < 1
334 real(dp), dimension(int(YearMonths, i4)) :: fnight_pet !< [-] Night ratio PET < 1
335 real(dp), dimension(int(YearMonths, i4)) :: fnight_temp !< [-] Night factor mean temp
336 real(dp), dimension(int(YearMonths, i4)) :: fnight_ssrd !< [-] Night factor short-wave rad.
337 real(dp), dimension(int(YearMonths, i4)) :: fnight_strd !< [-] Night factor long-wave rad.
338 contains
339 procedure, public :: read => read_nightdayratio
340 end type nml_nightdayratio_t
341 !> 'nightdayratio' namelist content
343
344 ! namelist /nloutputresults/ &
345 ! output_deflate_level, &
346 ! output_double_precision, &
347 ! timeStep_model_outputs, &
348 ! outputFlxState
349 !
350 !> \class nml_nloutputresults_t
351 !> \brief 'nloutputresults' namelist content
352 type, public :: nml_nloutputresults_t
353 character(15) :: name = "nloutputresults" !< namelist name
354 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
355 integer(i4) :: output_deflate_level !< deflate level in nc files
356 logical :: output_double_precision !< output precision in nc files
357 integer(i4) :: timestep_model_outputs !< timestep for writing model outputs
358 integer(i4) :: output_time_reference !< time reference point location in output nc files
359 logical, dimension(nOutFlxState) :: outputflxstate !< Define model outputs see "mhm_outputs.nml"
360 contains
361 procedure, public :: read => read_nloutputresults
362 end type nml_nloutputresults_t
363 !> 'nloutputresults' namelist content
365
366 ! namelist /baseflow_config/ &
367 ! BFI_calc, &
368 ! BFI_obs
369 !
370 !> \class nml_baseflow_config_t
371 !> \brief 'baseflow_config' namelist content
372 type, public :: nml_baseflow_config_t
373 character(15) :: name = "baseflow_config" !< namelist name
374 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
375 logical :: bfi_calc !< calculate observed BFI from gauges with Eckhardt filter
376 real(dp), dimension(maxNoDomains) :: bfi_obs !< given base-flow index per domain
377contains
378 procedure, public :: read => read_baseflow_config
379 end type nml_baseflow_config_t
380 !> 'baseflow_config' namelist content
382
383 !######## mo_mpr_read_config
384 ! namelist /directories_MPR/ &
385 ! dir_gridded_LAI
386 !
387 !> \class nml_directories_mpr_t
388 !> \brief 'directories_mpr' namelist content
389 type, public :: nml_directories_mpr_t
390 character(15) :: name = "directories_mpr" !< namelist name
391 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
392 character(256), dimension(maxNoDomains) :: dir_gridded_lai !< directory of gridded LAI data, used when timeStep_LAI_input<0
393 contains
394 procedure, public :: read => read_directories_mpr
395 end type nml_directories_mpr_t
396 !> 'directories_mpr' namelist content
398
399 ! namelist /soildata/ &
400 ! iFlag_soilDB, &
401 ! tillageDepth, &
402 ! nSoilHorizons_mHM, &
403 ! soil_Depth
404 !
405 !> \class nml_soildata_t
406 !> \brief 'soildata' namelist content
407 type, public :: nml_soildata_t
408 character(8) :: name = "soildata" !< namelist name
409 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
410 integer(i4) :: iflag_soildb !< options to handle different soil databases
411 real(dp) :: tillagedepth !< [mm] Soil depth down to which organic
412 integer(i4) :: nsoilhorizons_mhm !< Number of horizons to model
413 real(dp), dimension(maxNoSoilHorizons) :: soil_depth !< depth of the single horizons
414 contains
415 procedure, public :: read => read_soildata
416 end type nml_soildata_t
417 !> 'soildata' namelist content
419
420 ! namelist /LAI_data_information/ &
421 ! inputFormat_gridded_LAI, &
422 ! timeStep_LAI_input
423 !
424 !> \class nml_lai_data_information_t
425 !> \brief 'lai_data_information' namelist content
427 character(20) :: name = "lai_data_information" !< namelist name
428 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
429 character(256) :: inputformat_gridded_lai !< format of gridded LAI data (nc only)
430 integer(i4) :: timestep_lai_input !< time step of gridded LAI input
431 contains
432 procedure, public :: read => read_lai_data_information
434 !> 'lai_data_information' namelist content
436
437 ! namelist /LCover_MPR/ &
438 ! fracSealed_cityArea
439 !
440 !> \class nml_lcover_mpr_t
441 !> \brief 'lcover_mpr' namelist content
442 type, public :: nml_lcover_mpr_t
443 character(10) :: name = "lcover_mpr" !< namelist name
444 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
445 real(dp) :: fracsealed_cityarea !< fraction of area within city assumed to be perfectly sealed [0-1]
446 contains
447 procedure, public :: read => read_lcover_mpr
448 end type nml_lcover_mpr_t
449 !> 'lcover_mpr' namelist content
451
452 ! namelist /interception1/ &
453 ! canopyInterceptionFactor
454 !
455 !> \class nml_interception1_t
456 !> \brief 'interception1' namelist content
457 type, public :: nml_interception1_t
458 character(13) :: name = "interception1" !< namelist name
459 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
460 real(dp), dimension(nColPars) :: canopyinterceptionfactor !< multiplier to relate LAI to interception storage [-]
461 contains
462 procedure, public :: read => read_interception1
463 end type nml_interception1_t
464 !> 'interception1' namelist content
466
467 ! namelist /snow1/ &
468 ! snowTreshholdTemperature, &
469 ! degreeDayFactor_forest, &
470 ! degreeDayFactor_impervious, &
471 ! degreeDayFactor_pervious, &
472 ! increaseDegreeDayFactorByPrecip, &
473 ! maxDegreeDayFactor_forest, &
474 ! maxDegreeDayFactor_impervious, &
475 ! maxDegreeDayFactor_pervious
476 !
477 !> \class nml_snow1_t
478 !> \brief 'snow1' namelist content
479 type, public :: nml_snow1_t
480 character(5) :: name = "snow1" !< namelist name
481 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
482 real(dp), dimension(nColPars) :: snowtreshholdtemperature !< Threshold for rain/snow partitioning [degC]
483 real(dp), dimension(nColPars) :: degreedayfactor_forest !< forest: deg day factors to determine melting flux [m degC-1]
484 real(dp), dimension(nColPars) :: degreedayfactor_impervious !< impervious: deg day factors to determine melting flux [m degC-1]
485 real(dp), dimension(nColPars) :: degreedayfactor_pervious !< pervious: deg day factors to determine melting flux [m degC-1]
486 real(dp), dimension(nColPars) :: increasedegreedayfactorbyprecip !< increase of deg day factor in case of precipitation [degC-1]
487 real(dp), dimension(nColPars) :: maxdegreedayfactor_forest !< forest: maximum values for degree day factor [m degC-1]
488 real(dp), dimension(nColPars) :: maxdegreedayfactor_impervious !< impervious: maximum values for degree day factor [m degC-1]
489 real(dp), dimension(nColPars) :: maxdegreedayfactor_pervious !< pervious: maximum values for degree day factor [m degC-1]
490 contains
491 procedure, public :: read => read_snow1
492 end type nml_snow1_t
493 !> 'snow1' namelist content
494 type(nml_snow1_t), public :: nml_snow1
495
496 ! namelist /soilmoisture1/ &
497 ! orgMatterContent_forest, &
498 ! orgMatterContent_impervious, &
499 ! orgMatterContent_pervious, &
500 ! PTF_lower66_5_constant, &
501 ! PTF_lower66_5_clay, &
502 ! PTF_lower66_5_Db, &
503 ! PTF_higher66_5_constant, &
504 ! PTF_higher66_5_clay, &
505 ! PTF_higher66_5_Db, &
506 ! PTF_Ks_constant, &
507 ! PTF_Ks_sand, &
508 ! PTF_Ks_clay, &
509 ! PTF_Ks_curveSlope, &
510 ! rootFractionCoefficient_forest, &
511 ! rootFractionCoefficient_impervious, &
512 ! rootFractionCoefficient_pervious, &
513 ! infiltrationShapeFactor
514 !
515 !> \class nml_soilmoisture1_t
516 !> \brief 'soilmoisture1' namelist content
517 type, public :: nml_soilmoisture1_t
518 character(13) :: name = "soilmoisture1" !< namelist name
519 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
520 real(dp), dimension(nColPars) :: orgmattercontent_forest !< organic matter content [%] for forest
521 real(dp), dimension(nColPars) :: orgmattercontent_impervious !< organic matter content [%] for impervious
522 real(dp), dimension(nColPars) :: orgmattercontent_pervious !< organic matter content [%] for pervious
523 !> Zacharias PTF parameters below 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
524 real(dp), dimension(nColPars) :: ptf_lower66_5_constant
525 real(dp), dimension(nColPars) :: ptf_lower66_5_clay !< multiplier for clay constant (see PTF_lower66_5_constant)
526 real(dp), dimension(nColPars) :: ptf_lower66_5_db !< multiplier for mineral bulk density (see PTF_lower66_5_constant)
527 !> Zacharias PTF parameters above 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
528 real(dp), dimension(nColPars) :: ptf_higher66_5_constant
529 real(dp), dimension(nColPars) :: ptf_higher66_5_clay !< multiplier for clay constant (see PTF_higher66_5_constant)
530 real(dp), dimension(nColPars) :: ptf_higher66_5_db !< multiplier for mineral bulk density (see PTF_higher66_5_constant)
531 !> PTF parameters for saturated hydraulic conductivity after Cosby et al. (1984)
532 real(dp), dimension(nColPars) :: ptf_ks_constant
533 real(dp), dimension(nColPars) :: ptf_ks_sand !< multiplier for sand (see PTF_Ks_constant)
534 real(dp), dimension(nColPars) :: ptf_ks_clay !< multiplier for clay (see PTF_Ks_constant)
535 real(dp), dimension(nColPars) :: ptf_ks_curveslope !< unit conversion factor from inch/h to cm/d
536 !> shape factor for root distribution with depth, which follows an exponential function [-] for forest
537 real(dp), dimension(nColPars) :: rootfractioncoefficient_forest
538 !> shape factor for root distribution with depth, which follows an exponential function [-] for impervious
539 real(dp), dimension(nColPars) :: rootfractioncoefficient_impervious
540 !> shape factor for root distribution with depth, which follows an exponential function [-] for pervious
541 real(dp), dimension(nColPars) :: rootfractioncoefficient_pervious
542 !> shape factor for partitioning effective precipitation into runoff and infiltration based on soil wetness [-]
543 real(dp), dimension(nColPars) :: infiltrationshapefactor
544 contains
545 procedure, public :: read => read_soilmoisture1
546 end type nml_soilmoisture1_t
547 !> 'soilmoisture1' namelist content
549
550 ! namelist /soilmoisture2/ &
551 ! orgMatterContent_forest, &
552 ! orgMatterContent_impervious, &
553 ! orgMatterContent_pervious, &
554 ! PTF_lower66_5_constant, &
555 ! PTF_lower66_5_clay, &
556 ! PTF_lower66_5_Db, &
557 ! PTF_higher66_5_constant, &
558 ! PTF_higher66_5_clay, &
559 ! PTF_higher66_5_Db, &
560 ! PTF_Ks_constant, &
561 ! PTF_Ks_sand, &
562 ! PTF_Ks_clay, &
563 ! PTF_Ks_curveSlope, &
564 ! rootFractionCoefficient_forest, &
565 ! rootFractionCoefficient_impervious, &
566 ! rootFractionCoefficient_pervious, &
567 ! infiltrationShapeFactor, &
568 ! jarvis_sm_threshold_c1
569 !
570 !> \class nml_soilmoisture2_t
571 !> \brief 'soilmoisture2' namelist content
572 type, public :: nml_soilmoisture2_t
573 character(13) :: name = "soilmoisture2" !< namelist name
574 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
575 real(dp), dimension(nColPars) :: orgmattercontent_forest !< organic matter content [%] for forest
576 real(dp), dimension(nColPars) :: orgmattercontent_impervious !< organic matter content [%] for impervious
577 real(dp), dimension(nColPars) :: orgmattercontent_pervious !< organic matter content [%] for pervious
578 !> Zacharias PTF parameters below 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
579 real(dp), dimension(nColPars) :: ptf_lower66_5_constant
580 real(dp), dimension(nColPars) :: ptf_lower66_5_clay !< multiplier for clay constant (see PTF_lower66_5_constant)
581 real(dp), dimension(nColPars) :: ptf_lower66_5_db !< multiplier for mineral bulk density (see PTF_lower66_5_constant)
582 !> Zacharias PTF parameters above 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
583 real(dp), dimension(nColPars) :: ptf_higher66_5_constant
584 real(dp), dimension(nColPars) :: ptf_higher66_5_clay !< multiplier for clay constant (see PTF_higher66_5_constant)
585 real(dp), dimension(nColPars) :: ptf_higher66_5_db !< multiplier for mineral bulk density (see PTF_higher66_5_constant)
586 !> PTF parameters for saturated hydraulic conductivity after Cosby et al. (1984)
587 real(dp), dimension(nColPars) :: ptf_ks_constant
588 real(dp), dimension(nColPars) :: ptf_ks_sand !< multiplier for sand (see PTF_Ks_constant)
589 real(dp), dimension(nColPars) :: ptf_ks_clay !< multiplier for clay (see PTF_Ks_constant)
590 real(dp), dimension(nColPars) :: ptf_ks_curveslope !< unit conversion factor from inch/h to cm/d
591 !> shape factor for root distribution with depth, which follows an exponential function [-] for forest
592 real(dp), dimension(nColPars) :: rootfractioncoefficient_forest
593 !> shape factor for root distribution with depth, which follows an exponential function [-] for impervious
594 real(dp), dimension(nColPars) :: rootfractioncoefficient_impervious
595 !> shape factor for root distribution with depth, which follows an exponential function [-] for pervious
596 real(dp), dimension(nColPars) :: rootfractioncoefficient_pervious
597 !> shape factor for partitioning effective precipitation into runoff and infiltration based on soil wetness [-]
598 real(dp), dimension(nColPars) :: infiltrationshapefactor
599 real(dp), dimension(nColPars) :: jarvis_sm_threshold_c1 !< soil moisture threshod for jarvis model
600 contains
601 procedure, public :: read => read_soilmoisture2
602 end type nml_soilmoisture2_t
603 !> 'soilmoisture2' namelist content
605
606 ! namelist /soilmoisture3/ &
607 ! orgMatterContent_forest, &
608 ! orgMatterContent_impervious, &
609 ! orgMatterContent_pervious, &
610 ! PTF_lower66_5_constant, &
611 ! PTF_lower66_5_clay, &
612 ! PTF_lower66_5_Db, &
613 ! PTF_higher66_5_constant, &
614 ! PTF_higher66_5_clay, &
615 ! PTF_higher66_5_Db, &
616 ! PTF_Ks_constant, &
617 ! PTF_Ks_sand, &
618 ! PTF_Ks_clay, &
619 ! PTF_Ks_curveSlope, &
620 ! rootFractionCoefficient_forest, &
621 ! rootFractionCoefficient_impervious, &
622 ! rootFractionCoefficient_pervious, &
623 ! infiltrationShapeFactor, &
624 ! rootFractionCoefficient_sand, &
625 ! rootFractionCoefficient_clay, &
626 ! FCmin_glob, &
627 ! FCdelta_glob, &
628 ! jarvis_sm_threshold_c1
629 !
630 !> \class nml_soilmoisture3_t
631 !> \brief 'soilmoisture3' namelist content
632 type, public :: nml_soilmoisture3_t
633 character(13) :: name = "soilmoisture3" !< namelist name
634 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
635 real(dp), dimension(nColPars) :: orgmattercontent_forest !< organic matter content [%] for forest
636 real(dp), dimension(nColPars) :: orgmattercontent_impervious !< organic matter content [%] for impervious
637 real(dp), dimension(nColPars) :: orgmattercontent_pervious !< organic matter content [%] for pervious
638 !> Zacharias PTF parameters below 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
639 real(dp), dimension(nColPars) :: ptf_lower66_5_constant
640 real(dp), dimension(nColPars) :: ptf_lower66_5_clay !< multiplier for clay constant (see PTF_lower66_5_constant)
641 real(dp), dimension(nColPars) :: ptf_lower66_5_db !< multiplier for mineral bulk density (see PTF_lower66_5_constant)
642 !> Zacharias PTF parameters above 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
643 real(dp), dimension(nColPars) :: ptf_higher66_5_constant
644 real(dp), dimension(nColPars) :: ptf_higher66_5_clay !< multiplier for clay constant (see PTF_higher66_5_constant)
645 real(dp), dimension(nColPars) :: ptf_higher66_5_db !< multiplier for mineral bulk density (see PTF_higher66_5_constant)
646 !> PTF parameters for saturated hydraulic conductivity after Cosby et al. (1984)
647 real(dp), dimension(nColPars) :: ptf_ks_constant
648 real(dp), dimension(nColPars) :: ptf_ks_sand !< multiplier for sand (see PTF_Ks_constant)
649 real(dp), dimension(nColPars) :: ptf_ks_clay !< multiplier for clay (see PTF_Ks_constant)
650 real(dp), dimension(nColPars) :: ptf_ks_curveslope !< unit conversion factor from inch/h to cm/d
651 !> shape factor for root distribution with depth, which follows an exponential function [-] for forest
652 real(dp), dimension(nColPars) :: rootfractioncoefficient_forest
653 !> shape factor for root distribution with depth, which follows an exponential function [-] for impervious
654 real(dp), dimension(nColPars) :: rootfractioncoefficient_impervious
655 !> shape factor for root distribution with depth, which follows an exponential function [-] for pervious
656 real(dp), dimension(nColPars) :: rootfractioncoefficient_pervious
657 !> shape factor for partitioning effective precipitation into runoff and infiltration based on soil wetness [-]
658 real(dp), dimension(nColPars) :: infiltrationshapefactor
659 real(dp), dimension(nColPars) :: fcmin_glob !< global field capacity minimum
660 real(dp), dimension(nColPars) :: fcdelta_glob !< difference between global field capacity minimum and maximum
661 real(dp), dimension(nColPars) :: rootfractioncoefficient_sand !< threshold for actual ET reduction for sand
662 real(dp), dimension(nColPars) :: rootfractioncoefficient_clay !< threshold for actual ET reduction for clay
663 real(dp), dimension(nColPars) :: jarvis_sm_threshold_c1 !< soil moisture threshod for jarvis model
664 contains
665 procedure, public :: read => read_soilmoisture3
666 end type nml_soilmoisture3_t
667 !> 'soilmoisture3' namelist content
669
670 ! namelist /soilmoisture4/ &
671 ! orgMatterContent_forest, &
672 ! orgMatterContent_impervious, &
673 ! orgMatterContent_pervious, &
674 ! PTF_lower66_5_constant, &
675 ! PTF_lower66_5_clay, &
676 ! PTF_lower66_5_Db, &
677 ! PTF_higher66_5_constant, &
678 ! PTF_higher66_5_clay, &
679 ! PTF_higher66_5_Db, &
680 ! PTF_Ks_constant, &
681 ! PTF_Ks_sand, &
682 ! PTF_Ks_clay, &
683 ! PTF_Ks_curveSlope, &
684 ! rootFractionCoefficient_forest, &
685 ! rootFractionCoefficient_impervious, &
686 ! rootFractionCoefficient_pervious, &
687 ! infiltrationShapeFactor, &
688 ! rootFractionCoefficient_sand, &
689 ! rootFractionCoefficient_clay, &
690 ! FCmin_glob, &
691 ! FCdelta_glob, &
692 !
693 !> \class nml_soilmoisture4_t
694 !> \brief 'soilmoisture4' namelist content
695 type, public :: nml_soilmoisture4_t
696 character(13) :: name = "soilmoisture4" !< namelist name
697 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
698 real(dp), dimension(nColPars) :: orgmattercontent_forest !< organic matter content [%] for forest
699 real(dp), dimension(nColPars) :: orgmattercontent_impervious !< organic matter content [%] for impervious
700 real(dp), dimension(nColPars) :: orgmattercontent_pervious !< organic matter content [%] for pervious
701 !> Zacharias PTF parameters below 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
702 real(dp), dimension(nColPars) :: ptf_lower66_5_constant
703 real(dp), dimension(nColPars) :: ptf_lower66_5_clay !< multiplier for clay constant (see PTF_lower66_5_constant)
704 real(dp), dimension(nColPars) :: ptf_lower66_5_db !< multiplier for mineral bulk density (see PTF_lower66_5_constant)
705 !> Zacharias PTF parameters above 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
706 real(dp), dimension(nColPars) :: ptf_higher66_5_constant
707 real(dp), dimension(nColPars) :: ptf_higher66_5_clay !< multiplier for clay constant (see PTF_higher66_5_constant)
708 real(dp), dimension(nColPars) :: ptf_higher66_5_db !< multiplier for mineral bulk density (see PTF_higher66_5_constant)
709 !> PTF parameters for saturated hydraulic conductivity after Cosby et al. (1984)
710 real(dp), dimension(nColPars) :: ptf_ks_constant
711 real(dp), dimension(nColPars) :: ptf_ks_sand !< multiplier for sand (see PTF_Ks_constant)
712 real(dp), dimension(nColPars) :: ptf_ks_clay !< multiplier for clay (see PTF_Ks_constant)
713 real(dp), dimension(nColPars) :: ptf_ks_curveslope !< unit conversion factor from inch/h to cm/d
714 !> shape factor for root distribution with depth, which follows an exponential function [-] for forest
715 real(dp), dimension(nColPars) :: rootfractioncoefficient_forest
716 !> shape factor for root distribution with depth, which follows an exponential function [-] for impervious
717 real(dp), dimension(nColPars) :: rootfractioncoefficient_impervious
718 !> shape factor for root distribution with depth, which follows an exponential function [-] for pervious
719 real(dp), dimension(nColPars) :: rootfractioncoefficient_pervious
720 !> shape factor for partitioning effective precipitation into runoff and infiltration based on soil wetness [-]
721 real(dp), dimension(nColPars) :: infiltrationshapefactor
722 real(dp), dimension(nColPars) :: fcmin_glob !< global field capacity minimum
723 real(dp), dimension(nColPars) :: fcdelta_glob !< difference between global field capacity minimum and maximum
724 real(dp), dimension(nColPars) :: rootfractioncoefficient_sand !< threshold for actual ET reduction for sand
725 real(dp), dimension(nColPars) :: rootfractioncoefficient_clay !< threshold for actual ET reduction for clay
726 contains
727 procedure, public :: read => read_soilmoisture4
728 end type nml_soilmoisture4_t
729 !> 'soilmoisture4' namelist content
731
732 ! namelist /directRunoff1/ &
733 ! imperviousStorageCapacity
734 !
735 !> \class nml_directrunoff1_t
736 !> \brief 'directrunoff1' namelist content
737 type, public :: nml_directrunoff1_t
738 character(13) :: name = "directrunoff1" !< namelist name
739 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
740 real(dp), dimension(nColPars) :: imperviousstoragecapacity !< direct Runoff: Sealed Area storage capacity
741 contains
742 procedure, public :: read => read_directrunoff1
743 end type nml_directrunoff1_t
744 !> 'directrunoff1' namelist content
746
747 ! namelist /PETminus1/ &
748 ! PET_a_forest, &
749 ! PET_a_impervious, &
750 ! PET_a_pervious, &
751 ! PET_b, &
752 ! PET_c
753 !
754 !> \class nml_petminus1_t
755 !> \brief 'petminus1' namelist content
756 !> \details PET is input, LAI driven correction
757 type, public :: nml_petminus1_t
758 character(9) :: name = "petminus1" !< namelist name
759 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
760 real(dp), dimension(nColPars) :: pet_a_forest !< DSF=PET_a+PET_b*(1-exp(PET_c*LAI)) to correct PET as PET=DSF*PET
761 real(dp), dimension(nColPars) :: pet_a_impervious !< DSF=PET_a+PET_b*(1-exp(PET_c*LAI)) to correct PET as PET=DSF*PET
762 real(dp), dimension(nColPars) :: pet_a_pervious !< DSF=PET_a+PET_b*(1-exp(PET_c*LAI)) to correct PET as PET=DSF*PET
763 real(dp), dimension(nColPars) :: pet_b !< DSF=PET_a+PET_b*(1-exp(PET_c*LAI)) to correct PET as PET=DSF*PET
764 real(dp), dimension(nColPars) :: pet_c !< DSF=PET_a+PET_b*(1-exp(PET_c*LAI)) to correct PET as PET=DSF*PET
765 contains
766 procedure, public :: read => read_petminus1
767 end type nml_petminus1_t
768 !> 'petminus1' namelist content
770
771 ! namelist /PET0/ &
772 ! minCorrectionFactorPET, &
773 ! maxCorrectionFactorPET, &
774 ! aspectTresholdPET
775 !
776 !> \class nml_pet0_t
777 !> \brief 'pet0' namelist content
778 !> \details PET is input, aspect driven correction
779 type, public :: nml_pet0_t
780 character(4) :: name = "pet0" !< namelist name
781 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
782 real(dp), dimension(nColPars) :: mincorrectionfactorpet !< minimum factor for PET correction with aspect
783 real(dp), dimension(nColPars) :: maxcorrectionfactorpet !< maximum factor for PET correction with aspect
784 real(dp), dimension(nColPars) :: aspecttresholdpet !< aspect threshold for PET correction with aspect
785 contains
786 procedure, public :: read => read_pet0
787 end type nml_pet0_t
788 !> 'pet0' namelist content
789 type(nml_pet0_t), public :: nml_pet0
790
791 ! namelist /PET1/ &
792 ! minCorrectionFactorPET, &
793 ! maxCorrectionFactorPET, &
794 ! aspectTresholdPET, &
795 ! HargreavesSamaniCoeff
796 !
797 !> \class nml_pet1_t
798 !> \brief 'pet1' namelist content
799 !> \details PET - Hargreaves Samani
800 type, public :: nml_pet1_t
801 character(4) :: name = "pet1" !< namelist name
802 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
803 real(dp), dimension(nColPars) :: mincorrectionfactorpet !< minimum factor for PET correction with aspect
804 real(dp), dimension(nColPars) :: maxcorrectionfactorpet !< maximum factor for PET correction with aspect
805 real(dp), dimension(nColPars) :: aspecttresholdpet !< aspect threshold for PET correction with aspect
806 real(dp), dimension(nColPars) :: hargreavessamanicoeff !< coefficient for Hargreaves Samani
807 contains
808 procedure, public :: read => read_pet1
809 end type nml_pet1_t
810 !> 'pet1' namelist content
811 type(nml_pet1_t), public :: nml_pet1
812
813 ! namelist /PET2/ &
814 ! PriestleyTaylorCoeff, &
815 ! PriestleyTaylorLAIcorr
816 !
817 !> \class nml_pet2_t
818 !> \brief 'pet2' namelist content
819 !> \details PET - Priestley Taylor
820 type, public :: nml_pet2_t
821 character(4) :: name = "pet2" !< namelist name
822 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
823 real(dp), dimension(nColPars) :: priestleytaylorcoeff !< Priestley-Taylor coefficient
824 real(dp), dimension(nColPars) :: priestleytaylorlaicorr !< Priestley-Taylor LAI correction factor
825 contains
826 procedure, public :: read => read_pet2
827 end type nml_pet2_t
828 !> 'pet2' namelist content
829 type(nml_pet2_t), public :: nml_pet2
830
831 ! namelist /PET3/ &
832 ! canopyheigth_forest, &
833 ! canopyheigth_impervious, &
834 ! canopyheigth_pervious, &
835 ! displacementheight_coeff, &
836 ! roughnesslength_momentum_coeff, &
837 ! roughnesslength_heat_coeff, &
838 ! stomatal_resistance
839 !
840 !> \class nml_pet3_t
841 !> \brief 'pet3' namelist content
842 !> \details PET - Penman Monteith
843 type, public :: nml_pet3_t
844 character(4) :: name = "pet3" !< namelist name
845 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
846 real(dp), dimension(nColPars) :: canopyheigth_forest !< canopy height for foreset
847 real(dp), dimension(nColPars) :: canopyheigth_impervious !< canopy height for impervious
848 real(dp), dimension(nColPars) :: canopyheigth_pervious !< canopy height for pervious
849 real(dp), dimension(nColPars) :: displacementheight_coeff !< displacement height coefficient
850 real(dp), dimension(nColPars) :: roughnesslength_momentum_coeff !< roughness length momentum coefficient
851 real(dp), dimension(nColPars) :: roughnesslength_heat_coeff !< roughness length heat coefficient
852 real(dp), dimension(nColPars) :: stomatal_resistance !< stomatal resistance
853 contains
854 procedure, public :: read => read_pet3
855 end type nml_pet3_t
856 !> 'pet3' namelist content
857 type(nml_pet3_t), public :: nml_pet3
858
859 ! namelist /interflow1/ &
860 ! interflowStorageCapacityFactor, &
861 ! interflowRecession_slope, &
862 ! fastInterflowRecession_forest, &
863 ! slowInterflowRecession_Ks, &
864 ! exponentSlowInterflow
865 !
866 !> \class nml_interflow1_t
867 !> \brief 'interflow1' namelist content
868 type, public :: nml_interflow1_t
869 character(10) :: name = "interflow1" !< namelist name
870 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
871 real(dp), dimension(nColPars) :: interflowstoragecapacityfactor !< interflow storage capacity factor
872 real(dp), dimension(nColPars) :: interflowrecession_slope !< multiplier for slope to derive interflow recession constant
873 !> multiplier to derive fast interflow recession constant for forest
874 real(dp), dimension(nColPars) :: fastinterflowrecession_forest
875 !> multiplier for variability of saturated hydraulic conductivity to derive slow interflow recession constant
876 real(dp), dimension(nColPars) :: slowinterflowrecession_ks
877 !> multiplier for variability of saturated hydraulic conductivity to derive slow interflow exponent
878 real(dp), dimension(nColPars) :: exponentslowinterflow
879 contains
880 procedure, public :: read => read_interflow1
881 end type nml_interflow1_t
882 !> 'interflow1' namelist content
884
885 ! namelist /percolation1/ &
886 ! rechargeCoefficient, &
887 ! rechargeFactor_karstic, &
888 ! gain_loss_GWreservoir_karstic
889 !
890 !> \class nml_percolation1_t
891 !> \brief 'percolation1' namelist content
892 type, public :: nml_percolation1_t
893 character(12) :: name = "percolation1" !< namelist name
894 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
895 real(dp), dimension(nColPars) :: rechargecoefficient !< recharge coefficient
896 real(dp), dimension(nColPars) :: rechargefactor_karstic !< recharge factor for karstic percolation
897 real(dp), dimension(nColPars) :: gain_loss_gwreservoir_karstic !< gain loss in ground water reservoir for karstic
898 contains
899 procedure, public :: read => read_percolation1
900 end type nml_percolation1_t
901 !> 'percolation1' namelist content
903
904 ! namelist /neutrons1/ &
905 ! Desilets_N0, &
906 ! Desilets_LW0, &
907 ! Desilets_LW1
908 !
909 !> \class nml_neutrons1_t
910 !> \brief 'neutrons1' namelist content
911 type, public :: nml_neutrons1_t
912 character(9) :: name = "neutrons1" !< namelist name
913 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
914 real(dp), dimension(nColPars) :: desilets_n0 !< Desilets N0 parameter
915 real(dp), dimension(nColPars) :: desilets_lw0 !< Desilets LW0 parameter
916 real(dp), dimension(nColPars) :: desilets_lw1 !< Desilets LW1 parameter
917 contains
918 procedure, public :: read => read_neutrons1
919 end type nml_neutrons1_t
920 !> 'neutrons1' namelist content
922
923 ! namelist /neutrons2/ &
924 ! COSMIC_N0, &
925 ! COSMIC_N1, &
926 ! COSMIC_N2, &
927 ! COSMIC_alpha0, &
928 ! COSMIC_alpha1, &
929 ! COSMIC_L30, &
930 ! COSMIC_L31, &
931 ! COSMIC_LW0, &
932 ! COSMIC_LW1
933 !
934 !> \class nml_neutrons2_t
935 !> \brief 'neutrons2' namelist content
936 type, public :: nml_neutrons2_t
937 character(9) :: name = "neutrons2" !< namelist name
938 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
939 real(dp), dimension(nColPars) :: cosmic_n0 !< cosmic N0 parameter
940 real(dp), dimension(nColPars) :: cosmic_n1 !< cosmic N1 parameter
941 real(dp), dimension(nColPars) :: cosmic_n2 !< cosmic N2 parameter
942 real(dp), dimension(nColPars) :: cosmic_alpha0 !< cosmic alpha0 parameter
943 real(dp), dimension(nColPars) :: cosmic_alpha1 !< cosmic alpha1 parameter
944 real(dp), dimension(nColPars) :: cosmic_l30 !< cosmic L30 parameter
945 real(dp), dimension(nColPars) :: cosmic_l31 !< cosmic L31 parameter
946 real(dp), dimension(nColPars) :: cosmic_lw0 !< cosmic LW0 parameter
947 real(dp), dimension(nColPars) :: cosmic_lw1 !< cosmic LW1 parameter
948 contains
949 procedure, public :: read => read_neutrons2
950 end type nml_neutrons2_t
951 !> 'neutrons2' namelist content
953
954 ! namelist /geoparameter/ &
955 ! GeoParam
956 !
957 !> \class nml_geoparameter_t
958 !> \brief 'geoparameter' namelist content
959 type, public :: nml_geoparameter_t
960 character(12) :: name = "geoparameter" !< namelist name
961 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
962 !> geological parameters (ordering according to file 'geology_classdefinition.txt')
963 real(dp), dimension(maxGeoUnit, nColPars) :: geoparam
964 contains
965 procedure, public :: read => read_geoparameter
966 end type nml_geoparameter_t
967 !> 'geoparameter' namelist content
969
970 !######## mo_mrm_read_config
971 ! namelist /mainconfig_mrm/ &
972 ! ALMA_convention, &
973 ! filenameTotalRunoff, &
974 ! varnameTotalRunoff, &
975 ! gw_coupling
976 !
977 !> \class nml_mainconfig_mrm_t
978 !> \brief 'mainconfig_mrm' namelist content
979 type, public :: nml_mainconfig_mrm_t
980 character(14) :: name = "mainconfig_mrm" !< namelist name
981 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
982 logical :: alma_convention !< flag for ALMA convention (see http://www.lmd.jussieu.fr/~polcher/ALMA/convention_3.html)
983 character(256) :: filenametotalrunoff !< Filename of simulated total runoff file
984 character(256) :: varnametotalrunoff !< variable name of total runoff
985 logical :: gw_coupling !< switch to enable ground water coupling
986 contains
987 procedure, public :: read => read_mainconfig_mrm
988 end type nml_mainconfig_mrm_t
989 !> 'mainconfig_mrm' namelist content
991
992 ! namelist /directories_mRM/ &
993 ! dir_Gauges, &
994 ! dir_Total_Runoff, &
995 ! dir_Bankfull_Runoff
996 !
997 !> \class nml_directories_mrm_t
998 !> \brief 'directories_mrm' namelist content
999 type, public :: nml_directories_mrm_t
1000 character(15) :: name = "directories_mrm" !< namelist name
1001 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
1002 character(256), dimension(maxNoDomains) :: dir_gauges !< directory containing gauge time series
1003 character(256), dimension(maxNoDomains) :: dir_total_runoff !< directory where simulated runoff can be found
1004 character(256), dimension(maxNoDomains) :: dir_bankfull_runoff !< directory where runoff at bankfull conditions can be found
1005 contains
1006 procedure, public :: read => read_directories_mrm
1007 end type nml_directories_mrm_t
1008 !> 'directories_mrm' namelist content
1010
1011 ! namelist /evaluation_gauges/ &
1012 ! nGaugesTotal, &
1013 ! NoGauges_domain, &
1014 ! Gauge_id, &
1015 ! gauge_filename
1016 !
1017 !> \class nml_evaluation_gauges_t
1018 !> \brief 'evaluation_gauges' namelist content
1020 character(17) :: name = "evaluation_gauges" !< namelist name
1021 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
1022 integer(i4) :: ngaugestotal !< Number of evaluation gauges for all domains
1023 integer(i4), dimension(maxNoDomains) :: nogauges_domain !< number of gauges per domain
1024 integer(i4), dimension(maxNoDomains, maxNoGauges) :: gauge_id !< gauge ID for each gauge
1025 character(256), dimension(maxNoDomains, maxNoGauges) :: gauge_filename !< filename for each gauge time series
1026 contains
1027 procedure, public :: read => read_evaluation_gauges
1029 !> 'evaluation_gauges' namelist content
1031
1032 ! namelist /inflow_gauges/ &
1033 ! nInflowGaugesTotal, &
1034 ! NoInflowGauges_domain, &
1035 ! InflowGauge_id, &
1036 ! InflowGauge_filename, &
1037 ! InflowGauge_Headwater
1038 !
1039 !> \class nml_inflow_gauges_t
1040 !> \brief 'inflow_gauges' namelist content
1041 type, public :: nml_inflow_gauges_t
1042 character(13) :: name = "inflow_gauges" !< namelist name
1043 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
1044 integer(i4) :: ninflowgaugestotal !< Number of evaluation gauges for all domains
1045 integer(i4), dimension(maxNoDomains) :: noinflowgauges_domain !< number of gauges for subdomain (1)
1046 integer(i4), dimension(maxNoDomains, maxNoGauges) :: inflowgauge_id !< id of inflow gauge(1) for subdomain(1) --> (1,1)
1047 !> name of file with timeseries of inflow gauge(1) for subdomain(1) --> (1,1)
1048 character(256), dimension(maxNoDomains, maxNoGauges) :: inflowgauge_filename
1049 !> consider flows from upstream/headwater cells of inflow gauge(1) for subdomain(1) --> (1,1)
1050 logical, dimension(maxNoDomains, maxNoGauges) :: inflowgauge_headwater
1051 contains
1052 procedure, public :: read => read_inflow_gauges
1053 end type nml_inflow_gauges_t
1054 !> 'inflow_gauges' namelist content
1056
1057 ! namelist /nloutputresults/ &
1058 ! output_deflate_level_mrm, &
1059 ! output_double_precision_mrm, &
1060 ! timeStep_model_outputs_mrm, &
1061 ! outputFlxState_mrm
1062 !
1063 !> \class nml_mrm_outputs_t
1064 !> \brief 'mrm_outputs' namelist content
1065 type, public :: nml_mrm_outputs_t
1066 character(15) :: name = "nloutputresults" !< namelist name
1067 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
1068 integer(i4) :: output_deflate_level_mrm !< netcdf deflate level
1069 logical :: output_double_precision_mrm !< switch to enable double precision in netcdf
1070 integer(i4) :: output_time_reference_mrm !< time reference point location in output nc files
1071 integer(i4) :: timestep_model_outputs_mrm !< timestep for writing model outputs
1072 logical, dimension(mrm_nOutFlxState) :: outputflxstate_mrm !< Define model outputs see "mhm_outputs.nml"
1073 contains
1074 procedure, public :: read => read_mrm_outputs
1075 end type nml_mrm_outputs_t
1076 !> 'mrm_outputs' namelist content
1078
1079 ! namelist /routing1/ &
1080 ! muskingumTravelTime_constant, &
1081 ! muskingumTravelTime_riverLength, &
1082 ! muskingumTravelTime_riverSlope, &
1083 ! muskingumTravelTime_impervious, &
1084 ! muskingumAttenuation_riverSlope
1085 !
1086 !> \class nml_routing1_t
1087 !> \brief 'routing1' namelist content
1088 type, public :: nml_routing1_t
1089 character(8) :: name = "routing1" !< namelist name
1090 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
1091 real(dp), dimension(nColPars) :: muskingumtraveltime_constant !< muskingum parameter constant
1092 real(dp), dimension(nColPars) :: muskingumtraveltime_riverlength !< muskingum parameter river length
1093 real(dp), dimension(nColPars) :: muskingumtraveltime_riverslope !< muskingum parameter river slope
1094 real(dp), dimension(nColPars) :: muskingumtraveltime_impervious !< muskingum parameter impervious
1095 real(dp), dimension(nColPars) :: muskingumattenuation_riverslope !< muskingum parameter attenuation river slope
1096 contains
1097 procedure, public :: read => read_routing1
1098 end type nml_routing1_t
1099 !> 'routing1' namelist content
1101
1102 ! namelist /routing2/ &
1103 ! streamflow_celerity
1104 !
1105 !> \class nml_routing2_t
1106 !> \brief 'routing2' namelist content
1107 type, public :: nml_routing2_t
1108 character(8) :: name = "routing2" !< namelist name
1109 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
1110 real(dp), dimension(nColPars) :: streamflow_celerity !< streamflow celerity
1111 contains
1112 procedure, public :: read => read_routing2
1113 end type nml_routing2_t
1114 !> 'routing2' namelist content
1116
1117 ! namelist /routing3/ &
1118 ! slope_factor
1119 !
1120 !> \class nml_routing3_t
1121 !> \brief 'routing3' namelist content
1122 type, public :: nml_routing3_t
1123 character(8) :: name = "routing3" !< namelist name
1124 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
1125 real(dp), dimension(nColPars) :: slope_factor !< slope factor
1126 contains
1127 procedure, public :: read => read_routing3
1128 end type nml_routing3_t
1129 !> 'routing3' namelist content
1131
1132 !######## mo_mrm_riv_temp_class
1133 ! namelist /config_riv_temp/ &
1134 ! albedo_water, &
1135 ! pt_a_water, &
1136 ! emissivity_water, &
1137 ! turb_heat_ex_coeff, &
1138 ! max_iter, &
1139 ! delta_iter, &
1140 ! step_iter, &
1141 ! riv_widths_file, &
1142 ! riv_widths_name, &
1143 ! dir_riv_widths
1144 !
1145 !> \class nml_config_riv_temp_t
1146 !> \brief 'config_riv_temp' namelist content
1148 character(15) :: name = "config_riv_temp" !< namelist name
1149 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
1150 real(dp) :: albedo_water !< albedo of open water
1151 real(dp) :: pt_a_water !< priestley taylor alpha parameter for PET on open water
1152 real(dp) :: emissivity_water !< emissivity of water
1153 real(dp) :: turb_heat_ex_coeff !< lateral heat exchange coefficient water <-> air
1154 integer(i4) :: max_iter !< maximum number of iterations
1155 real(dp) :: delta_iter !< convergence delta
1156 real(dp) :: step_iter !< step size for iterative solver
1157 character(256) :: riv_widths_file !< file name for river widths
1158 character(256) :: riv_widths_name !< variable name for river widths
1159 character(256), dimension(maxNoDomains) :: dir_riv_widths !< files for river widths
1160 contains
1161 procedure, public :: read => read_config_riv_temp
1162 end type nml_config_riv_temp_t
1163 !> 'config_riv_temp' namelist content
1165
1166 !######## mo_coupling_type
1167 ! namelist /coupling/ &
1168 ! case, &
1169 ! meteo_timestep, &
1170 ! meteo_time_ref_endpoint, &
1171 ! meteo_expect_pre, &
1172 ! meteo_expect_temp, &
1173 ! meteo_expect_pet, &
1174 ! meteo_expect_tmin, &
1175 ! meteo_expect_tmax, &
1176 ! meteo_expect_netrad, &
1177 ! meteo_expect_absvappress, &
1178 ! meteo_expect_windspeed, &
1179 ! meteo_expect_ssrd, &
1180 ! meteo_expect_strd, &
1181 ! meteo_expect_tann
1182 !
1183 !> \class nml_coupling_t
1184 !> \brief 'coupling' namelist content
1185 type, public :: nml_coupling_t
1186 character(8) :: name = "coupling" !< namelist name
1187 logical :: read_from_file = .true. !< whether the associated variables are already set by interfaces
1188 integer(i4) :: case !< coupling case
1189 integer(i4) :: meteo_timestep !< timestep for meteo-data from coupling
1190 logical :: meteo_time_ref_endpoint !< expect meteo has time reference point at end of associated time interval
1191 logical :: meteo_expect_pre !< expect meteo from coupling: [mm] Precipitation
1192 logical :: meteo_expect_temp !< expect meteo from coupling: [degC] Air temperature
1193 logical :: meteo_expect_pet !< expect meteo from coupling: [mm TS-1] Potential evapotranspiration
1194 logical :: meteo_expect_tmin !< expect meteo from coupling: [degC] minimum daily air temperature
1195 logical :: meteo_expect_tmax !< expect meteo from coupling: [degC] maximum daily air temperature
1196 logical :: meteo_expect_netrad !< expect meteo from coupling: [W m2] net radiation
1197 logical :: meteo_expect_absvappress !< expect meteo from coupling: [Pa] absolute vapour pressure
1198 logical :: meteo_expect_windspeed !< expect meteo from coupling: [m s-1] windspeed
1199 logical :: meteo_expect_ssrd !< expect meteo from coupling: [W m2] short wave radiation
1200 logical :: meteo_expect_strd !< expect meteo from coupling: [W m2] long wave radiation
1201 logical :: meteo_expect_tann !< expect meteo from coupling: [degC] annual mean air temperature
1202 contains
1203 procedure, public :: read => read_coupling
1204 end type nml_coupling_t
1205 !> 'coupling' namelist content
1207
1208contains
1209
1210 !> \brief Open namelist file and generate a new unit.
1211 subroutine open_new_nml(file, unit)
1212 use mo_message, only: error_message
1213 character(len = *), intent(in) :: file
1214 integer, intent(out) :: unit
1215 integer :: stat
1216 open(newunit=unit, file=file, iostat=stat, status='old', action='read', delim='apostrophe')
1217 if (stat .ne. 0) call error_message('open_new_nml: could not open namelist file ', trim(file))
1218 end subroutine open_new_nml
1219
1220 !> \brief Close namelist file.
1221 subroutine close_nml(unit)
1222 use mo_message, only: error_message
1223 integer, intent(in) :: unit
1224 integer :: stat
1225 close(unit, iostat=stat)
1226 if (stat .ne. 0) call error_message('close_nml: could not close namelist file.')
1227 end subroutine close_nml
1228
1229 !> \brief Read 'project_description' namelist content.
1230 subroutine read_project_description(self, file)
1231 implicit none
1232 class(nml_project_description_t), intent(inout) :: self
1233 character(*), intent(in) :: file !< file containing the namelist
1234
1235 integer :: unit !< file unit to open the given file
1236 character(1024) :: project_details !< project including funding instituion., PI, etc.
1237 character(1024) :: setup_description !< any specific description of simulation
1238 character(1024) :: simulation_type !< e.g. seasonal forecast, climate projection, ...
1239 character(256) :: Conventions !< convention used for dataset
1240 character(1024) :: contact !< contact details, incl. PI name
1241 character(1024) :: mHM_details !< developing institution, specific mHM revision
1242 character(1024) :: history !< details on version/creation date
1243
1244 namelist /project_description/ &
1245 project_details, &
1246 setup_description, &
1247 simulation_type, &
1248 conventions, &
1249 contact, &
1250 mhm_details, &
1251 history
1252
1253 if ( self%read_from_file ) then
1254 call open_new_nml(file, unit)
1255 call position_nml(self%name, unit)
1256 read(unit, nml=project_description)
1257 call close_nml(unit)
1258 self%project_details = project_details
1259 self%setup_description = setup_description
1260 self%simulation_type = simulation_type
1261 self%Conventions = conventions
1262 self%contact = contact
1263 self%mHM_details = mhm_details
1264 self%history = history
1265 self%read_from_file = .false.
1266 end if
1267 end subroutine read_project_description
1268
1269 !> \brief Read 'directories_general' namelist content.
1270 subroutine read_directories_general(self, file)
1271 implicit none
1272 class(nml_directories_general_t), intent(inout) :: self
1273 character(*), intent(in) :: file !< file containing the namelist
1274
1275 integer :: unit !< file unit to open the given file
1276 character(256) :: dirConfigOut !< directory for config file output
1277 character(256) :: dirCommonFiles !< directory where common input files should be located
1278 character(256), dimension(maxNoDomains) :: mhm_file_RestartOut !< Directory where mhm output of restart is written
1279 character(256), dimension(maxNoDomains) :: mrm_file_RestartOut !< Directory where mrm output of restart is written
1280 character(256), dimension(maxNoDomains) :: dir_Morpho !< Directory where morphological files are located
1281 character(256), dimension(maxNoDomains) :: dir_LCover !< Directory where land cover files are located
1282 character(256), dimension(maxNoDomains) :: dir_Out !< Directory where output is written to
1283 character(256), dimension(maxNoDomains) :: file_LatLon !< Directory where the Lat Lon Files are located
1284
1285 namelist /directories_general/ &
1286 dirconfigout, &
1287 dircommonfiles, &
1288 dir_morpho, &
1289 dir_lcover, &
1290 dir_out, &
1291 mhm_file_restartout, &
1292 mrm_file_restartout, &
1293 file_latlon
1294
1295 if ( self%read_from_file ) then
1296 call open_new_nml(file, unit)
1297 call position_nml(self%name, unit)
1298 read(unit, nml=directories_general)
1299 call close_nml(unit)
1300 self%dirConfigOut = dirconfigout
1301 self%dirCommonFiles = dircommonfiles
1302 self%dir_Morpho = dir_morpho
1303 self%dir_LCover = dir_lcover
1304 self%dir_Out = dir_out
1305 self%mhm_file_RestartOut = mhm_file_restartout
1306 self%mrm_file_RestartOut = mrm_file_restartout
1307 self%file_LatLon = file_latlon
1308 self%read_from_file = .false.
1309 end if
1310 end subroutine read_directories_general
1311
1312 !> \brief Read 'mainconfig' namelist content.
1313 subroutine read_mainconfig(self, file)
1314 implicit none
1315 class(nml_mainconfig_t), intent(inout) :: self
1316 character(*), intent(in) :: file !< file containing the namelist
1317
1318 integer :: unit !< file unit to open the given file
1319 integer(i4) :: iFlag_cordinate_sys !< options model for the run cordinate system
1320 real(dp), dimension(maxNoDomains) :: resolution_Hydrology !< [m or degree] resolution of hydrology - Level 1
1321 integer(i4) :: nDomains !< number of domains
1322 integer(i4), dimension(maxNoDomains) :: L0Domain !< specify same index for domains to share L0_data to save memory
1323 logical :: write_restart !< flag to write restart
1324 integer(i4), dimension(maxNoDomains) :: read_opt_domain_data !< read domain specific optional data
1325
1326 namelist /mainconfig/ &
1327 iflag_cordinate_sys, &
1328 resolution_hydrology, &
1329 ndomains, &
1330 l0domain, &
1331 write_restart, &
1332 read_opt_domain_data
1333
1334 if ( self%read_from_file ) then
1335 call open_new_nml(file, unit)
1336 call position_nml(self%name, unit)
1337 read(unit, nml=mainconfig)
1338 call close_nml(unit)
1339 self%iFlag_cordinate_sys = iflag_cordinate_sys
1340 self%resolution_Hydrology = resolution_hydrology
1341 self%nDomains = ndomains
1342 self%L0Domain = l0domain
1343 self%write_restart = write_restart
1344 self%read_opt_domain_data = read_opt_domain_data
1345 self%read_from_file = .false.
1346 end if
1347 end subroutine read_mainconfig
1348
1349 !> \brief Read 'processSelection' namelist content.
1350 subroutine read_processselection(self, file)
1351 implicit none
1352 class(nml_processselection_t), intent(inout) :: self
1353 character(*), intent(in) :: file !< file containing the namelist
1354
1355 integer :: unit !< file unit to open the given file
1356 integer(i4), dimension(nProcesses) :: processCase !< ! Choosen process description number
1357
1358 namelist /processselection/ &
1359 processcase
1360
1361 if ( self%read_from_file ) then
1362 ! init the processCase matrix to 0 to be backward compatible
1363 ! if cases were added later (then there would be no values if not init here)
1364 processcase = 0_i4
1365 call open_new_nml(file, unit)
1366 call position_nml(self%name, unit)
1367 read(unit, nml=processselection)
1368 call close_nml(unit)
1369 self%processCase = processcase
1370 self%read_from_file = .false.
1371 end if
1372 end subroutine read_processselection
1373
1374 !> \brief Read 'LCover' namelist content.
1375 subroutine read_lcover(self, file)
1376 implicit none
1377 class(nml_lcover_t), intent(inout) :: self
1378 character(*), intent(in) :: file !< file containing the namelist
1379
1380 integer :: unit !< file unit to open the given file
1381 integer(i4) :: nLCoverScene !< Number of land cover scene (lcs)
1382 integer(i4), dimension(maxNLCovers) :: LCoverYearStart !< starting year LCover
1383 integer(i4), dimension(maxNLCovers) :: LCoverYearEnd !< ending year LCover
1384 character(256), dimension(maxNLCovers) :: LCoverfName !< filename of Lcover file
1385
1386 namelist /lcover/ &
1387 nlcoverscene, &
1388 lcoveryearstart, &
1389 lcoveryearend, &
1390 lcoverfname
1391
1392 if ( self%read_from_file ) then
1393 call open_new_nml(file, unit)
1394 call position_nml(self%name, unit)
1395 read(unit, nml=lcover)
1396 call close_nml(unit)
1397 self%nLcoverScene = nlcoverscene
1398 self%LCoverYearStart = lcoveryearstart
1399 self%LCoverYearEnd = lcoveryearend
1400 self%LCoverfName = lcoverfname
1401 self%read_from_file = .false.
1402 end if
1403 end subroutine read_lcover
1404
1405 !> \brief Read 'mainconfig_mhm_mrm' namelist content.
1406 subroutine read_mainconfig_mhm_mrm(self, file)
1407 implicit none
1408 class(nml_mainconfig_mhm_mrm_t), intent(inout) :: self
1409 character(*), intent(in) :: file !< file containing the namelist
1410
1411 integer :: unit !< file unit to open the given file
1412 integer(i4) :: timeStep !< [h] simulation time step (= TS) in [h] either 1, 2, 3, 4, 6, 12 or 24
1413 real(dp), dimension(maxNoDomains) :: resolution_Routing !< resolution of Level-11 discharge routing [m or degree] per domain
1414 logical :: optimize !< Optimization (.true.) or Evaluation run (.false.)
1415 logical :: optimize_restart !< Optimization will be restarted from mo_<opti_method>.restart file (.true.)
1416 integer(i4) :: opti_method !< Optimization algorithm: 1 - DDS; 2 - Simulated Annealing; 3 - SCE
1417 integer(i4) :: opti_function !< Objective function
1418 logical :: read_restart !< flag for reading restart output
1419 logical :: mrm_read_river_network !< flag to read the river network for mRM (read_restart = .True. forces .True.)
1420 logical :: read_old_style_restart_bounds !< flag to use an old-style restart file created by mhm<=v5.11
1421 logical :: restart_reset_fluxes_states !< flag to reset fluxes and states read from restart to default values
1422 character(256), dimension(maxNoDomains) :: mhm_file_RestartIn !< mhm restart file paths
1423 character(256), dimension(maxNoDomains) :: mrm_file_RestartIn !< mrm restart file paths
1424
1425 namelist /mainconfig_mhm_mrm/ &
1426 timestep, &
1427 resolution_routing, &
1428 optimize, &
1429 optimize_restart, &
1430 opti_method, &
1431 opti_function, &
1432 read_restart, &
1433 mrm_read_river_network, &
1434 read_old_style_restart_bounds, &
1435 restart_reset_fluxes_states, &
1436 mhm_file_restartin, &
1437 mrm_file_restartin
1438
1439 if ( self%read_from_file ) then
1440 ! set default values for optional arguments
1441 mrm_read_river_network = .false.
1442 read_old_style_restart_bounds = .false.
1443 restart_reset_fluxes_states = .false.
1444 call open_new_nml(file, unit)
1445 call position_nml(self%name, unit)
1446 read(unit, nml=mainconfig_mhm_mrm)
1447 call close_nml(unit)
1448 self%timestep = timestep
1449 self%resolution_Routing = resolution_routing
1450 self%optimize = optimize
1451 self%optimize_restart = optimize_restart
1452 self%opti_method = opti_method
1453 self%opti_function = opti_function
1454 self%read_restart = read_restart
1455 self%mrm_read_river_network = mrm_read_river_network
1456 self%read_old_style_restart_bounds = read_old_style_restart_bounds
1457 self%restart_reset_fluxes_states = restart_reset_fluxes_states
1458 self%mhm_file_RestartIn = mhm_file_restartin
1459 self%mrm_file_RestartIn = mrm_file_restartin
1460 self%read_from_file = .false.
1461 end if
1462 end subroutine read_mainconfig_mhm_mrm
1463
1464 !> \brief Read 'optimization' namelist content.
1465 subroutine read_optimization(self, file)
1466 implicit none
1467 class(nml_optimization_t), intent(inout) :: self
1468 character(*), intent(in) :: file !< file containing the namelist
1469
1470 integer :: unit, status
1471 integer(i4) :: nIterations !< number of iterations for optimization
1472 integer(i8) :: seed !< seed used for optimization, default: -9 --> system time
1473 real(dp) :: dds_r !< DDS: perturbation rate, default: 0.2
1474 real(dp) :: sa_temp !< SA: initial temperature, default: -9.0 --> estimated
1475 integer(i4) :: sce_ngs !< SCE: # of complexes, default: 2
1476 integer(i4) :: sce_npg !< SCE: # of points per complex,default: -9 --> 2n+1
1477 integer(i4) :: sce_nps !< SCE: # of points per subcomplex,default: -9 --> n+1
1478 logical :: mcmc_opti !< MCMC: optimization (.true.) or only parameter uncertainty (.false.)
1479 real(dp), dimension(nerror_model) :: mcmc_error_params !< error model para (mcmc_opti=.false.) e.g. for opti_function=8: .01, .3
1480
1481 namelist /optimization/ &
1482 niterations, &
1483 seed, &
1484 dds_r, &
1485 sa_temp, &
1486 sce_ngs, &
1487 sce_npg, &
1488 sce_nps, &
1489 mcmc_opti, &
1490 mcmc_error_params
1491
1492 if ( self%read_from_file ) then
1493 niterations = 0_i4
1494 seed = -9_i8
1495 dds_r = 0.2_dp
1496 sa_temp = -9.0_dp
1497 sce_ngs = 2_i4
1498 sce_npg = -9_i4
1499 sce_nps = -9_i4
1500 mcmc_opti = .true.
1501 ! mcmc_error_params -> no defaults
1502 call open_new_nml(file, unit)
1503 call position_nml(self%name, unit, status=status)
1504 if (status == 0) read(unit, nml=optimization)
1505 call close_nml(unit)
1506 self%nIterations = niterations
1507 self%seed = seed
1508 self%dds_r = dds_r
1509 self%sa_temp = sa_temp
1510 self%sce_ngs = sce_ngs
1511 self%sce_npg = sce_npg
1512 self%sce_nps = sce_nps
1513 self%mcmc_opti = mcmc_opti
1514 self%mcmc_error_params = mcmc_error_params
1515 self%read_from_file = .false.
1516 end if
1517 end subroutine read_optimization
1518
1519 !> \brief Read 'time_periods' namelist content.
1520 subroutine read_time_periods(self, file)
1521 implicit none
1522 class(nml_time_periods_t), intent(inout) :: self
1523 character(*), intent(in) :: file !< file containing the namelist
1524
1525 integer :: unit !< file unit to open the given file
1526 integer(i4), dimension(maxNoDomains) :: warming_Days !< number of days for warm up period
1527 type(period), dimension(maxNoDomains) :: eval_Per !< time period for model evaluation
1528
1529 namelist /time_periods/ &
1530 warming_days, &
1531 eval_per
1532
1533 if ( self%read_from_file ) then
1534 call open_new_nml(file, unit)
1535 call position_nml(self%name, unit)
1536 read(unit, nml=time_periods)
1537 call close_nml(unit)
1538 self%warming_Days = warming_days
1539 self%eval_Per = eval_per
1540 self%read_from_file = .false.
1541 end if
1542 end subroutine read_time_periods
1543
1544 !> \brief Read 'directories_mhm' namelist content.
1545 subroutine read_directories_mhm(self, file)
1546 implicit none
1547 class(nml_directories_mhm_t), intent(inout) :: self
1548 character(*), intent(in) :: file !< file containing the namelist
1549
1550 integer :: unit !< file unit to open the given file
1551 character(256) :: inputFormat_meteo_forcings !< format of meteo input data (nc)
1552 !> .FALSE. to only warn about bound (lower, upper) violations in meteo files, default = .TRUE. - raise an error
1553 logical :: bound_error
1554 character(256), dimension(maxNoDomains) :: dir_meteo_header !< Directory where the meteo header file is located
1555 character(256), dimension(maxNoDomains) :: dir_Precipitation !< Directory where precipitation files are located
1556 character(256), dimension(maxNoDomains) :: dir_Temperature !< Directory where temperature files are located
1557 character(256), dimension(maxNoDomains) :: dir_ReferenceET !< Directory where reference-ET files are located
1558 character(256), dimension(maxNoDomains) :: dir_MinTemperature !< Directory where minimum temp. files are located
1559 character(256), dimension(maxNoDomains) :: dir_MaxTemperature !< Directory where maximum temp. files are located
1560 character(256), dimension(maxNoDomains) :: dir_absVapPressure !< Directory where abs. vap. pressure files are located
1561 character(256), dimension(maxNoDomains) :: dir_windspeed !< Directory where windspeed files are located
1562 character(256), dimension(maxNoDomains) :: dir_NetRadiation !< Directory where abs. vap. pressure files are located
1563 character(256), dimension(maxNoDomains) :: dir_Radiation !< riv-temp related: directory of (long/short-wave)radiation
1564 integer(i4), dimension(maxNoDomains) :: time_step_model_inputs !< frequency for reading meteo input
1565
1566 namelist /directories_mhm/ &
1567 inputformat_meteo_forcings, &
1568 bound_error, &
1569 dir_meteo_header, &
1570 dir_precipitation, &
1571 dir_temperature, &
1572 dir_referenceet, &
1573 dir_mintemperature, &
1574 dir_maxtemperature, &
1575 dir_absvappressure, &
1576 dir_windspeed, &
1577 dir_netradiation, &
1578 dir_radiation, &
1579 time_step_model_inputs
1580
1581 if ( self%read_from_file ) then
1582 call set_sentinel(dir_meteo_header) ! set sentinal to check reading
1583 inputformat_meteo_forcings = "nc"
1584 bound_error = .true.
1585 call open_new_nml(file, unit)
1586 call position_nml(self%name, unit)
1587 read(unit, nml=directories_mhm)
1588 call close_nml(unit)
1589 self%inputFormat_meteo_forcings = inputformat_meteo_forcings
1590 self%bound_error = bound_error
1591 self%dir_meteo_header = dir_meteo_header
1592 self%dir_Precipitation = dir_precipitation
1593 self%dir_Temperature = dir_temperature
1594 self%dir_ReferenceET = dir_referenceet
1595 self%dir_MinTemperature = dir_mintemperature
1596 self%dir_MaxTemperature = dir_maxtemperature
1597 self%dir_absVapPressure = dir_absvappressure
1598 self%dir_windspeed = dir_windspeed
1599 self%dir_NetRadiation = dir_netradiation
1600 self%dir_Radiation = dir_radiation
1601 self%time_step_model_inputs = time_step_model_inputs
1602 self%read_from_file = .false.
1603 end if
1604 end subroutine read_directories_mhm
1605
1606 !> \brief Read 'optional_data' namelist content.
1607 subroutine read_optional_data(self, file)
1608 implicit none
1609 class(nml_optional_data_t), intent(inout) :: self
1610 character(*), intent(in) :: file !< file containing the namelist
1611
1612 integer :: unit !< file unit to open the given file
1613 integer(i4) :: nSoilHorizons_sm_input !< No. of mhm soil horizons equivalent to sm input
1614 character(256), dimension(maxNoDomains) :: dir_soil_moisture !< soil moisture input
1615 character(256), dimension(maxNoDomains) :: dir_neutrons !< ground albedo neutron input
1616 character(256), dimension(maxNoDomains) :: dir_evapotranspiration !< evapotranspiration input
1617 character(256), dimension(maxNoDomains) :: dir_TWS !< tws input
1618 integer(i4) :: timeStep_sm_input !< time step of optional data: sm
1619 integer(i4) :: timeStep_neutrons_input !< time step of optional data: neutrons
1620 integer(i4) :: timeStep_et_input !< time step of optional data: et
1621 integer(i4) :: timeStep_tws_input !< time step of optional data: tws
1622
1623 namelist /optional_data/ &
1624 nsoilhorizons_sm_input, &
1625 dir_soil_moisture, &
1626 dir_neutrons, &
1627 dir_evapotranspiration, &
1628 dir_tws, &
1629 timestep_sm_input, &
1630 timestep_neutrons_input, &
1631 timestep_et_input, &
1632 timestep_tws_input
1633
1634 if ( self%read_from_file ) then
1635 call open_new_nml(file, unit)
1636 call position_nml(self%name, unit)
1637 read(unit, nml=optional_data)
1638 call close_nml(unit)
1639 self%nSoilHorizons_sm_input = nsoilhorizons_sm_input
1640 self%dir_soil_moisture = dir_soil_moisture
1641 self%dir_neutrons = dir_neutrons
1642 self%dir_evapotranspiration = dir_evapotranspiration
1643 self%dir_TWS = dir_tws
1644 self%timeStep_sm_input = timestep_sm_input
1645 self%timeStep_neutrons_input = timestep_neutrons_input
1646 self%timeStep_et_input = timestep_et_input
1647 self%timeStep_tws_input = timestep_tws_input
1648 self%read_from_file = .false.
1649 end if
1650 end subroutine read_optional_data
1651
1652 !> \brief Read 'panevapo' namelist content.
1653 subroutine read_panevapo(self, file)
1654 implicit none
1655 class(nml_panevapo_t), intent(inout) :: self
1656 character(*), intent(in) :: file !< file containing the namelist
1657
1658 integer :: unit !< file unit to open the given file
1659 real(dp), dimension(int(YearMonths, i4)) :: evap_coeff !< [-] Evap. coef. for free-water surfaces
1660
1661 namelist /panevapo/ &
1662 evap_coeff
1663
1664 if ( self%read_from_file ) then
1665 call open_new_nml(file, unit)
1666 call position_nml(self%name, unit)
1667 read(unit, nml=panevapo)
1668 call close_nml(unit)
1669 self%evap_coeff = evap_coeff
1670 self%read_from_file = .false.
1671 end if
1672 end subroutine read_panevapo
1673
1674 !> \brief Read 'nightdayratio' namelist content.
1675 subroutine read_nightdayratio(self, file)
1676 implicit none
1677 class(nml_nightdayratio_t), intent(inout) :: self
1678 character(*), intent(in) :: file !< file containing the namelist
1679
1680 integer :: unit !< file unit to open the given file
1681 logical :: read_meteo_weights !< read weights for meteo data
1682 real(dp), dimension(int(YearMonths, i4)) :: fnight_prec !< [-] Night ratio precipitation < 1
1683 real(dp), dimension(int(YearMonths, i4)) :: fnight_pet !< [-] Night ratio PET < 1
1684 real(dp), dimension(int(YearMonths, i4)) :: fnight_temp !< [-] Night factor mean temp
1685 real(dp), dimension(int(YearMonths, i4)) :: fnight_ssrd !< [-] Night factor short-wave rad.
1686 real(dp), dimension(int(YearMonths, i4)) :: fnight_strd !< [-] Night factor long-wave rad.
1687
1688 namelist /nightdayratio/ &
1689 read_meteo_weights, &
1690 fnight_prec, &
1691 fnight_pet, &
1692 fnight_temp, &
1693 fnight_ssrd, &
1694 fnight_strd
1695
1696 if ( self%read_from_file ) then
1697 ! default values for long/shortwave rad.
1698 fnight_ssrd = 0.0_dp
1699 fnight_strd = 0.45_dp
1700 call open_new_nml(file, unit)
1701 call position_nml(self%name, unit)
1702 read(unit, nml=nightdayratio)
1703 call close_nml(unit)
1704 self%read_meteo_weights = read_meteo_weights
1705 self%fnight_prec = fnight_prec
1706 self%fnight_pet = fnight_pet
1707 self%fnight_temp = fnight_temp
1708 self%fnight_ssrd = fnight_ssrd
1709 self%fnight_strd = fnight_strd
1710 self%read_from_file = .false.
1711 end if
1712 end subroutine read_nightdayratio
1713
1714 !> \brief Read 'nloutputresults' namelist content.
1715 subroutine read_nloutputresults(self, file)
1716 implicit none
1717 class(nml_nloutputresults_t), intent(inout) :: self
1718 character(*), intent(in) :: file !< file containing the namelist
1719
1720 integer :: unit !< file unit to open the given file
1721 integer(i4) :: output_deflate_level !< deflate level in nc files
1722 logical :: output_double_precision !< output precision in nc files
1723 integer(i4) :: output_time_reference !< time reference point location in output nc files
1724 integer(i4) :: timeStep_model_outputs !< timestep for writing model outputs
1725 logical, dimension(nOutFlxState) :: outputFlxState !< Define model outputs see "mhm_outputs.nml"
1726
1727 namelist /nloutputresults/ &
1728 output_deflate_level, &
1729 output_double_precision, &
1730 output_time_reference, &
1731 timestep_model_outputs, &
1732 outputflxstate
1733
1734 if ( self%read_from_file ) then
1735 ! default values
1736 output_deflate_level = 6
1737 output_double_precision = .true.
1738 output_time_reference = 0
1739 outputflxstate = .false.
1740 call open_new_nml(file, unit)
1741 call position_nml(self%name, unit)
1742 read(unit, nml=nloutputresults)
1743 call close_nml(unit)
1744 self%output_deflate_level = output_deflate_level
1745 self%output_double_precision = output_double_precision
1746 self%timeStep_model_outputs = timestep_model_outputs
1747 self%output_time_reference = output_time_reference
1748 self%outputFlxState = outputflxstate
1749 self%read_from_file = .false.
1750 end if
1751 end subroutine read_nloutputresults
1752
1753 !> \brief Read 'baseflow_config' namelist content.
1754 subroutine read_baseflow_config(self, file)
1755 implicit none
1756 class(nml_baseflow_config_t), intent(inout) :: self
1757 character(*), intent(in) :: file !< file containing the namelist
1758
1759 integer :: unit !< file unit to open the given file
1760 logical :: BFI_calc !< calculate observed BFI from gauges with Eckhardt filter
1761 real(dp), dimension(maxNoDomains) :: BFI_obs !< given base-flow index per domain
1762
1763 namelist /baseflow_config/ &
1764 bfi_calc, &
1765 bfi_obs
1766
1767 if ( self%read_from_file ) then
1768 bfi_calc = .false. ! default value
1769 bfi_obs = -1.0_dp ! negative value to flag missing values
1770 call open_new_nml(file, unit)
1771 call position_nml(self%name, unit)
1772 read(unit, nml=baseflow_config)
1773 call close_nml(unit)
1774 self%BFI_calc = bfi_calc
1775 self%BFI_obs = bfi_obs
1776 self%read_from_file = .false.
1777 end if
1778 end subroutine read_baseflow_config
1779
1780 !> \brief Read 'directories_mpr' namelist content.
1781 subroutine read_directories_mpr(self, file)
1782 implicit none
1783 class(nml_directories_mpr_t), intent(inout) :: self
1784 character(*), intent(in) :: file !< file containing the namelist
1785
1786 integer :: unit !< file unit to open the given file
1787 character(256), dimension(maxNoDomains) :: dir_gridded_LAI !< directory of gridded LAI data, used when timeStep_LAI_input<0
1788
1789 namelist /directories_mpr/ &
1790 dir_gridded_lai
1791
1792 if ( self%read_from_file ) then
1793 call open_new_nml(file, unit)
1794 call position_nml(self%name, unit)
1795 read(unit, nml=directories_mpr)
1796 call close_nml(unit)
1797 self%dir_gridded_LAI = dir_gridded_lai
1798 self%read_from_file = .false.
1799 end if
1800 end subroutine read_directories_mpr
1801
1802 !> \brief Read 'soildata' namelist content.
1803 subroutine read_soildata(self, file)
1804 implicit none
1805 class(nml_soildata_t), intent(inout) :: self
1806 character(*), intent(in) :: file !< file containing the namelist
1807
1808 integer :: unit !< file unit to open the given file
1809 integer(i4) :: iFlag_soilDB !< options to handle different soil databases
1810 real(dp) :: tillageDepth !< [mm] Soil depth down to which organic
1811 integer(i4) :: nSoilHorizons_mHM !< Number of horizons to model
1812 real(dp), dimension(maxNoSoilHorizons) :: soil_Depth !< depth of the single horizons
1813
1814 namelist /soildata/ &
1815 iflag_soildb, &
1816 tillagedepth, &
1817 nsoilhorizons_mhm, &
1818 soil_depth
1819
1820 if ( self%read_from_file ) then
1821 soil_depth = 0.0_dp ! default soil depth
1822 call open_new_nml(file, unit)
1823 call position_nml(self%name, unit)
1824 read(unit, nml=soildata)
1825 call close_nml(unit)
1826 self%iFlag_soilDB = iflag_soildb
1827 self%tillageDepth = tillagedepth
1828 self%nSoilHorizons_mHM = nsoilhorizons_mhm
1829 self%soil_Depth = soil_depth
1830 self%read_from_file = .false.
1831 end if
1832 end subroutine read_soildata
1833
1834 !> \brief Read 'lai_data_information' namelist content.
1835 subroutine read_lai_data_information(self, file)
1836 implicit none
1837 class(nml_lai_data_information_t), intent(inout) :: self
1838 character(*), intent(in) :: file !< file containing the namelist
1839
1840 integer :: unit !< file unit to open the given file
1841 character(256) :: inputFormat_gridded_LAI !< format of gridded LAI data (nc only)
1842 integer(i4) :: timeStep_LAI_input !< time step of gridded LAI input
1843
1844 namelist /lai_data_information/ &
1845 inputformat_gridded_lai, &
1846 timestep_lai_input
1847
1848 if ( self%read_from_file ) then
1849 call open_new_nml(file, unit)
1850 call position_nml(self%name, unit)
1851 read(unit, nml=lai_data_information)
1852 call close_nml(unit)
1853 self%inputFormat_gridded_LAI = inputformat_gridded_lai
1854 self%timeStep_LAI_input = timestep_lai_input
1855 self%read_from_file = .false.
1856 end if
1857 end subroutine read_lai_data_information
1858
1859 !> \brief Read 'lcover_mpr' namelist content.
1860 subroutine read_lcover_mpr(self, file)
1861 implicit none
1862 class(nml_lcover_mpr_t), intent(inout) :: self
1863 character(*), intent(in) :: file !< file containing the namelist
1864
1865 integer :: unit !< file unit to open the given file
1866 real(dp) :: fracSealed_cityArea !< fraction of area within city assumed to be perfectly sealed [0-1]
1867
1868 namelist /lcover_mpr/ &
1869 fracsealed_cityarea
1870
1871 if ( self%read_from_file ) then
1872 call open_new_nml(file, unit)
1873 call position_nml(self%name, unit)
1874 read(unit, nml=lcover_mpr)
1875 call close_nml(unit)
1876 self%fracSealed_cityArea = fracsealed_cityarea
1877 self%read_from_file = .false.
1878 end if
1879 end subroutine read_lcover_mpr
1880
1881 !> \brief Read 'interception1' namelist content.
1882 subroutine read_interception1(self, file)
1883 implicit none
1884 class(nml_interception1_t), intent(inout) :: self
1885 character(*), intent(in) :: file !< file containing the namelist
1886
1887 integer :: unit !< file unit to open the given file
1888 real(dp), dimension(nColPars) :: canopyInterceptionFactor !< multiplier to relate LAI to interception storage [-]
1889
1890 namelist /interception1/ &
1891 canopyinterceptionfactor
1892
1893 if ( self%read_from_file ) then
1894 call open_new_nml(file, unit)
1895 call position_nml(self%name, unit)
1896 read(unit, nml=interception1)
1897 call close_nml(unit)
1898 self%canopyInterceptionFactor = canopyinterceptionfactor
1899 self%read_from_file = .false.
1900 end if
1901 end subroutine read_interception1
1902
1903 !> \brief Read 'snow1' namelist content.
1904 subroutine read_snow1(self, file)
1905 implicit none
1906 class(nml_snow1_t), intent(inout) :: self
1907 character(*), intent(in) :: file !< file containing the namelist
1908
1909 integer :: unit !< file unit to open the given file
1910 real(dp), dimension(nColPars) :: snowTreshholdTemperature !< Threshold for rain/snow partitioning [degC]
1911 real(dp), dimension(nColPars) :: degreeDayFactor_forest !< forest: deg day factors to determine melting flux [m degC-1]
1912 real(dp), dimension(nColPars) :: degreeDayFactor_impervious !< impervious: deg day factors to determine melting flux [m degC-1]
1913 real(dp), dimension(nColPars) :: degreeDayFactor_pervious !< pervious: deg day factors to determine melting flux [m degC-1]
1914 real(dp), dimension(nColPars) :: increaseDegreeDayFactorByPrecip !< increase of deg day factor in case of precipitation [degC-1]
1915 real(dp), dimension(nColPars) :: maxDegreeDayFactor_forest !< forest: maximum values for degree day factor [m degC-1]
1916 real(dp), dimension(nColPars) :: maxDegreeDayFactor_impervious !< impervious: maximum values for degree day factor [m degC-1]
1917 real(dp), dimension(nColPars) :: maxDegreeDayFactor_pervious !< pervious: maximum values for degree day factor [m degC-1]
1918
1919 namelist /snow1/ &
1920 snowtreshholdtemperature, &
1921 degreedayfactor_forest, &
1922 degreedayfactor_impervious, &
1923 degreedayfactor_pervious, &
1924 increasedegreedayfactorbyprecip, &
1925 maxdegreedayfactor_forest, &
1926 maxdegreedayfactor_impervious, &
1927 maxdegreedayfactor_pervious
1928
1929 if ( self%read_from_file ) then
1930 call open_new_nml(file, unit)
1931 call position_nml(self%name, unit)
1932 read(unit, nml=snow1)
1933 call close_nml(unit)
1934 self%snowTreshholdTemperature = snowtreshholdtemperature
1935 self%degreeDayFactor_forest = degreedayfactor_forest
1936 self%degreeDayFactor_impervious = degreedayfactor_impervious
1937 self%degreeDayFactor_pervious = degreedayfactor_pervious
1938 self%increaseDegreeDayFactorByPrecip = increasedegreedayfactorbyprecip
1939 self%maxDegreeDayFactor_forest = maxdegreedayfactor_forest
1940 self%maxDegreeDayFactor_impervious = maxdegreedayfactor_impervious
1941 self%maxDegreeDayFactor_pervious = maxdegreedayfactor_pervious
1942 self%read_from_file = .false.
1943 end if
1944 end subroutine read_snow1
1945
1946 !> \brief Read 'soilmoisture1' namelist content.
1947 subroutine read_soilmoisture1(self, file)
1948 implicit none
1949 class(nml_soilmoisture1_t), intent(inout) :: self
1950 character(*), intent(in) :: file !< file containing the namelist
1951
1952 integer :: unit !< file unit to open the given file
1953 real(dp), dimension(nColPars) :: orgMatterContent_forest !< organic matter content [%] for forest
1954 real(dp), dimension(nColPars) :: orgMatterContent_impervious !< organic matter content [%] for impervious
1955 real(dp), dimension(nColPars) :: orgMatterContent_pervious !< organic matter content [%] for pervious
1956 !> Zacharias PTF parameters below 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
1957 real(dp), dimension(nColPars) :: PTF_lower66_5_constant
1958 real(dp), dimension(nColPars) :: PTF_lower66_5_clay !< multiplier for clay constant (see PTF_lower66_5_constant)
1959 real(dp), dimension(nColPars) :: PTF_lower66_5_Db !< multiplier for mineral bulk density (see PTF_lower66_5_constant)
1960 !> Zacharias PTF parameters above 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
1961 real(dp), dimension(nColPars) :: PTF_higher66_5_constant
1962 real(dp), dimension(nColPars) :: PTF_higher66_5_clay !< multiplier for clay constant (see PTF_higher66_5_constant)
1963 real(dp), dimension(nColPars) :: PTF_higher66_5_Db !< multiplier for mineral bulk density (see PTF_higher66_5_constant)
1964 !> PTF parameters for saturated hydraulic conductivity after Cosby et al. (1984)
1965 real(dp), dimension(nColPars) :: PTF_Ks_constant
1966 real(dp), dimension(nColPars) :: PTF_Ks_sand !< multiplier for sand (see PTF_Ks_constant)
1967 real(dp), dimension(nColPars) :: PTF_Ks_clay !< multiplier for clay (see PTF_Ks_constant)
1968 real(dp), dimension(nColPars) :: PTF_Ks_curveSlope !< unit conversion factor from inch/h to cm/d
1969 !> shape factor for root distribution with depth, which follows an exponential function [-] for forest
1970 real(dp), dimension(nColPars) :: rootFractionCoefficient_forest
1971 !> shape factor for root distribution with depth, which follows an exponential function [-] for impervious
1972 real(dp), dimension(nColPars) :: rootFractionCoefficient_impervious
1973 !> shape factor for root distribution with depth, which follows an exponential function [-] for pervious
1974 real(dp), dimension(nColPars) :: rootFractionCoefficient_pervious
1975 !> shape factor for partitioning effective precipitation into runoff and infiltration based on soil wetness [-]
1976 real(dp), dimension(nColPars) :: infiltrationShapeFactor
1977
1978 namelist /soilmoisture1/ &
1979 orgmattercontent_forest, &
1980 orgmattercontent_impervious, &
1981 orgmattercontent_pervious, &
1982 ptf_lower66_5_constant, &
1983 ptf_lower66_5_clay, &
1984 ptf_lower66_5_db, &
1985 ptf_higher66_5_constant, &
1986 ptf_higher66_5_clay, &
1987 ptf_higher66_5_db, &
1988 ptf_ks_constant, &
1989 ptf_ks_sand, &
1990 ptf_ks_clay, &
1991 ptf_ks_curveslope, &
1992 rootfractioncoefficient_forest, &
1993 rootfractioncoefficient_impervious, &
1994 rootfractioncoefficient_pervious, &
1995 infiltrationshapefactor
1996
1997 if ( self%read_from_file ) then
1998 call open_new_nml(file, unit)
1999 call position_nml(self%name, unit)
2000 read(unit, nml=soilmoisture1)
2001 call close_nml(unit)
2002 self%orgMatterContent_forest = orgmattercontent_forest
2003 self%orgMatterContent_impervious = orgmattercontent_impervious
2004 self%orgMatterContent_pervious = orgmattercontent_pervious
2005 self%PTF_lower66_5_constant = ptf_lower66_5_constant
2006 self%PTF_lower66_5_clay = ptf_lower66_5_clay
2007 self%PTF_lower66_5_Db = ptf_lower66_5_db
2008 self%PTF_higher66_5_constant = ptf_higher66_5_constant
2009 self%PTF_higher66_5_clay = ptf_higher66_5_clay
2010 self%PTF_higher66_5_Db = ptf_higher66_5_db
2011 self%PTF_Ks_constant = ptf_ks_constant
2012 self%PTF_Ks_sand = ptf_ks_sand
2013 self%PTF_Ks_clay = ptf_ks_clay
2014 self%PTF_Ks_curveSlope = ptf_ks_curveslope
2015 self%rootFractionCoefficient_forest = rootfractioncoefficient_forest
2016 self%rootFractionCoefficient_impervious = rootfractioncoefficient_impervious
2017 self%rootFractionCoefficient_pervious = rootfractioncoefficient_pervious
2018 self%infiltrationShapeFactor = infiltrationshapefactor
2019 self%read_from_file = .false.
2020 end if
2021 end subroutine read_soilmoisture1
2022
2023 !> \brief Read 'soilmoisture2' namelist content.
2024 subroutine read_soilmoisture2(self, file)
2025 implicit none
2026 class(nml_soilmoisture2_t), intent(inout) :: self
2027 character(*), intent(in) :: file !< file containing the namelist
2028
2029 integer :: unit !< file unit to open the given file
2030 real(dp), dimension(nColPars) :: orgMatterContent_forest !< organic matter content [%] for forest
2031 real(dp), dimension(nColPars) :: orgMatterContent_impervious !< organic matter content [%] for impervious
2032 real(dp), dimension(nColPars) :: orgMatterContent_pervious !< organic matter content [%] for pervious
2033 !> Zacharias PTF parameters below 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
2034 real(dp), dimension(nColPars) :: PTF_lower66_5_constant
2035 real(dp), dimension(nColPars) :: PTF_lower66_5_clay !< multiplier for clay constant (see PTF_lower66_5_constant)
2036 real(dp), dimension(nColPars) :: PTF_lower66_5_Db !< multiplier for mineral bulk density (see PTF_lower66_5_constant)
2037 !> Zacharias PTF parameters above 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
2038 real(dp), dimension(nColPars) :: PTF_higher66_5_constant
2039 real(dp), dimension(nColPars) :: PTF_higher66_5_clay !< multiplier for clay constant (see PTF_higher66_5_constant)
2040 real(dp), dimension(nColPars) :: PTF_higher66_5_Db !< multiplier for mineral bulk density (see PTF_higher66_5_constant)
2041 !> PTF parameters for saturated hydraulic conductivity after Cosby et al. (1984)
2042 real(dp), dimension(nColPars) :: PTF_Ks_constant
2043 real(dp), dimension(nColPars) :: PTF_Ks_sand !< multiplier for sand (see PTF_Ks_constant)
2044 real(dp), dimension(nColPars) :: PTF_Ks_clay !< multiplier for clay (see PTF_Ks_constant)
2045 real(dp), dimension(nColPars) :: PTF_Ks_curveSlope !< unit conversion factor from inch/h to cm/d
2046 !> shape factor for root distribution with depth, which follows an exponential function [-] for forest
2047 real(dp), dimension(nColPars) :: rootFractionCoefficient_forest
2048 !> shape factor for root distribution with depth, which follows an exponential function [-] for impervious
2049 real(dp), dimension(nColPars) :: rootFractionCoefficient_impervious
2050 !> shape factor for root distribution with depth, which follows an exponential function [-] for pervious
2051 real(dp), dimension(nColPars) :: rootFractionCoefficient_pervious
2052 !> shape factor for partitioning effective precipitation into runoff and infiltration based on soil wetness [-]
2053 real(dp), dimension(nColPars) :: infiltrationShapeFactor
2054 real(dp), dimension(nColPars) :: jarvis_sm_threshold_c1 !< soil moisture threshod for jarvis model
2055
2056 namelist /soilmoisture2/ &
2057 orgmattercontent_forest, &
2058 orgmattercontent_impervious, &
2059 orgmattercontent_pervious, &
2060 ptf_lower66_5_constant, &
2061 ptf_lower66_5_clay, &
2062 ptf_lower66_5_db, &
2063 ptf_higher66_5_constant, &
2064 ptf_higher66_5_clay, &
2065 ptf_higher66_5_db, &
2066 ptf_ks_constant, &
2067 ptf_ks_sand, &
2068 ptf_ks_clay, &
2069 ptf_ks_curveslope, &
2070 rootfractioncoefficient_forest, &
2071 rootfractioncoefficient_impervious, &
2072 rootfractioncoefficient_pervious, &
2073 infiltrationshapefactor, &
2074 jarvis_sm_threshold_c1
2075
2076 if ( self%read_from_file ) then
2077 call open_new_nml(file, unit)
2078 call position_nml(self%name, unit)
2079 read(unit, nml=soilmoisture2)
2080 call close_nml(unit)
2081 self%orgMatterContent_forest = orgmattercontent_forest
2082 self%orgMatterContent_impervious = orgmattercontent_impervious
2083 self%orgMatterContent_pervious = orgmattercontent_pervious
2084 self%PTF_lower66_5_constant = ptf_lower66_5_constant
2085 self%PTF_lower66_5_clay = ptf_lower66_5_clay
2086 self%PTF_lower66_5_Db = ptf_lower66_5_db
2087 self%PTF_higher66_5_constant = ptf_higher66_5_constant
2088 self%PTF_higher66_5_clay = ptf_higher66_5_clay
2089 self%PTF_higher66_5_Db = ptf_higher66_5_db
2090 self%PTF_Ks_constant = ptf_ks_constant
2091 self%PTF_Ks_sand = ptf_ks_sand
2092 self%PTF_Ks_clay = ptf_ks_clay
2093 self%PTF_Ks_curveSlope = ptf_ks_curveslope
2094 self%rootFractionCoefficient_forest = rootfractioncoefficient_forest
2095 self%rootFractionCoefficient_impervious = rootfractioncoefficient_impervious
2096 self%rootFractionCoefficient_pervious = rootfractioncoefficient_pervious
2097 self%infiltrationShapeFactor = infiltrationshapefactor
2098 self%jarvis_sm_threshold_c1 = jarvis_sm_threshold_c1
2099 self%read_from_file = .false.
2100 end if
2101 end subroutine read_soilmoisture2
2102
2103 !> \brief Read 'soilmoisture3' namelist content.
2104 subroutine read_soilmoisture3(self, file)
2105 implicit none
2106 class(nml_soilmoisture3_t), intent(inout) :: self
2107 character(*), intent(in) :: file !< file containing the namelist
2108
2109 integer :: unit !< file unit to open the given file
2110 real(dp), dimension(nColPars) :: orgMatterContent_forest !< organic matter content [%] for forest
2111 real(dp), dimension(nColPars) :: orgMatterContent_impervious !< organic matter content [%] for impervious
2112 real(dp), dimension(nColPars) :: orgMatterContent_pervious !< organic matter content [%] for pervious
2113 !> Zacharias PTF parameters below 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
2114 real(dp), dimension(nColPars) :: PTF_lower66_5_constant
2115 real(dp), dimension(nColPars) :: PTF_lower66_5_clay !< multiplier for clay constant (see PTF_lower66_5_constant)
2116 real(dp), dimension(nColPars) :: PTF_lower66_5_Db !< multiplier for mineral bulk density (see PTF_lower66_5_constant)
2117 !> Zacharias PTF parameters above 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
2118 real(dp), dimension(nColPars) :: PTF_higher66_5_constant
2119 real(dp), dimension(nColPars) :: PTF_higher66_5_clay !< multiplier for clay constant (see PTF_higher66_5_constant)
2120 real(dp), dimension(nColPars) :: PTF_higher66_5_Db !< multiplier for mineral bulk density (see PTF_higher66_5_constant)
2121 !> PTF parameters for saturated hydraulic conductivity after Cosby et al. (1984)
2122 real(dp), dimension(nColPars) :: PTF_Ks_constant
2123 real(dp), dimension(nColPars) :: PTF_Ks_sand !< multiplier for sand (see PTF_Ks_constant)
2124 real(dp), dimension(nColPars) :: PTF_Ks_clay !< multiplier for clay (see PTF_Ks_constant)
2125 real(dp), dimension(nColPars) :: PTF_Ks_curveSlope !< unit conversion factor from inch/h to cm/d
2126 !> shape factor for root distribution with depth, which follows an exponential function [-] for forest
2127 real(dp), dimension(nColPars) :: rootFractionCoefficient_forest
2128 !> shape factor for root distribution with depth, which follows an exponential function [-] for impervious
2129 real(dp), dimension(nColPars) :: rootFractionCoefficient_impervious
2130 !> shape factor for root distribution with depth, which follows an exponential function [-] for pervious
2131 real(dp), dimension(nColPars) :: rootFractionCoefficient_pervious
2132 !> shape factor for partitioning effective precipitation into runoff and infiltration based on soil wetness [-]
2133 real(dp), dimension(nColPars) :: infiltrationShapeFactor
2134 real(dp), dimension(nColPars) :: FCmin_glob !< global field capacity minimum
2135 real(dp), dimension(nColPars) :: FCdelta_glob !< difference between global field capacity minimum and maximum
2136 real(dp), dimension(nColPars) :: rootFractionCoefficient_sand !< threshold for actual ET reduction for sand
2137 real(dp), dimension(nColPars) :: rootFractionCoefficient_clay !< threshold for actual ET reduction for clay
2138 real(dp), dimension(nColPars) :: jarvis_sm_threshold_c1 !< soil moisture threshod for jarvis model
2139
2140 namelist /soilmoisture3/ &
2141 orgmattercontent_forest, &
2142 orgmattercontent_impervious, &
2143 orgmattercontent_pervious, &
2144 ptf_lower66_5_constant, &
2145 ptf_lower66_5_clay, &
2146 ptf_lower66_5_db, &
2147 ptf_higher66_5_constant, &
2148 ptf_higher66_5_clay, &
2149 ptf_higher66_5_db, &
2150 ptf_ks_constant, &
2151 ptf_ks_sand, &
2152 ptf_ks_clay, &
2153 ptf_ks_curveslope, &
2154 rootfractioncoefficient_forest, &
2155 rootfractioncoefficient_impervious, &
2156 rootfractioncoefficient_pervious, &
2157 infiltrationshapefactor, &
2158 rootfractioncoefficient_sand, &
2159 rootfractioncoefficient_clay, &
2160 fcmin_glob, &
2161 fcdelta_glob, &
2162 jarvis_sm_threshold_c1
2163
2164 if ( self%read_from_file ) then
2165 call open_new_nml(file, unit)
2166 call position_nml(self%name, unit)
2167 read(unit, nml=soilmoisture3)
2168 call close_nml(unit)
2169 self%orgMatterContent_forest = orgmattercontent_forest
2170 self%orgMatterContent_impervious = orgmattercontent_impervious
2171 self%orgMatterContent_pervious = orgmattercontent_pervious
2172 self%PTF_lower66_5_constant = ptf_lower66_5_constant
2173 self%PTF_lower66_5_clay = ptf_lower66_5_clay
2174 self%PTF_lower66_5_Db = ptf_lower66_5_db
2175 self%PTF_higher66_5_constant = ptf_higher66_5_constant
2176 self%PTF_higher66_5_clay = ptf_higher66_5_clay
2177 self%PTF_higher66_5_Db = ptf_higher66_5_db
2178 self%PTF_Ks_constant = ptf_ks_constant
2179 self%PTF_Ks_sand = ptf_ks_sand
2180 self%PTF_Ks_clay = ptf_ks_clay
2181 self%PTF_Ks_curveSlope = ptf_ks_curveslope
2182 self%rootFractionCoefficient_forest = rootfractioncoefficient_forest
2183 self%rootFractionCoefficient_impervious = rootfractioncoefficient_impervious
2184 self%rootFractionCoefficient_pervious = rootfractioncoefficient_pervious
2185 self%infiltrationShapeFactor = infiltrationshapefactor
2186 self%rootFractionCoefficient_sand = rootfractioncoefficient_sand
2187 self%rootFractionCoefficient_clay = rootfractioncoefficient_clay
2188 self%FCmin_glob = fcmin_glob
2189 self%FCdelta_glob = fcdelta_glob
2190 self%jarvis_sm_threshold_c1 = jarvis_sm_threshold_c1
2191 self%read_from_file = .false.
2192 end if
2193 end subroutine read_soilmoisture3
2194
2195 !> \brief Read 'soilmoisture4' namelist content.
2196 subroutine read_soilmoisture4(self, file)
2197 implicit none
2198 class(nml_soilmoisture4_t), intent(inout) :: self
2199 character(*), intent(in) :: file !< file containing the namelist
2200
2201 integer :: unit !< file unit to open the given file
2202 real(dp), dimension(nColPars) :: orgMatterContent_forest !< organic matter content [%] for forest
2203 real(dp), dimension(nColPars) :: orgMatterContent_impervious !< organic matter content [%] for impervious
2204 real(dp), dimension(nColPars) :: orgMatterContent_pervious !< organic matter content [%] for pervious
2205 !> Zacharias PTF parameters below 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
2206 real(dp), dimension(nColPars) :: PTF_lower66_5_constant
2207 real(dp), dimension(nColPars) :: PTF_lower66_5_clay !< multiplier for clay constant (see PTF_lower66_5_constant)
2208 real(dp), dimension(nColPars) :: PTF_lower66_5_Db !< multiplier for mineral bulk density (see PTF_lower66_5_constant)
2209 !> Zacharias PTF parameters above 66.5 % sand content (Zacharias et al., 2007, doi:10.2136/sssaj2006.0098)
2210 real(dp), dimension(nColPars) :: PTF_higher66_5_constant
2211 real(dp), dimension(nColPars) :: PTF_higher66_5_clay !< multiplier for clay constant (see PTF_higher66_5_constant)
2212 real(dp), dimension(nColPars) :: PTF_higher66_5_Db !< multiplier for mineral bulk density (see PTF_higher66_5_constant)
2213 !> PTF parameters for saturated hydraulic conductivity after Cosby et al. (1984)
2214 real(dp), dimension(nColPars) :: PTF_Ks_constant
2215 real(dp), dimension(nColPars) :: PTF_Ks_sand !< multiplier for sand (see PTF_Ks_constant)
2216 real(dp), dimension(nColPars) :: PTF_Ks_clay !< multiplier for clay (see PTF_Ks_constant)
2217 real(dp), dimension(nColPars) :: PTF_Ks_curveSlope !< unit conversion factor from inch/h to cm/d
2218 !> shape factor for root distribution with depth, which follows an exponential function [-] for forest
2219 real(dp), dimension(nColPars) :: rootFractionCoefficient_forest
2220 !> shape factor for root distribution with depth, which follows an exponential function [-] for impervious
2221 real(dp), dimension(nColPars) :: rootFractionCoefficient_impervious
2222 !> shape factor for root distribution with depth, which follows an exponential function [-] for pervious
2223 real(dp), dimension(nColPars) :: rootFractionCoefficient_pervious
2224 !> shape factor for partitioning effective precipitation into runoff and infiltration based on soil wetness [-]
2225 real(dp), dimension(nColPars) :: infiltrationShapeFactor
2226 real(dp), dimension(nColPars) :: FCmin_glob !< global field capacity minimum
2227 real(dp), dimension(nColPars) :: FCdelta_glob !< difference between global field capacity minimum and maximum
2228 real(dp), dimension(nColPars) :: rootFractionCoefficient_sand !< threshold for actual ET reduction for sand
2229 real(dp), dimension(nColPars) :: rootFractionCoefficient_clay !< threshold for actual ET reduction for clay
2230
2231 namelist /soilmoisture4/ &
2232 orgmattercontent_forest, &
2233 orgmattercontent_impervious, &
2234 orgmattercontent_pervious, &
2235 ptf_lower66_5_constant, &
2236 ptf_lower66_5_clay, &
2237 ptf_lower66_5_db, &
2238 ptf_higher66_5_constant, &
2239 ptf_higher66_5_clay, &
2240 ptf_higher66_5_db, &
2241 ptf_ks_constant, &
2242 ptf_ks_sand, &
2243 ptf_ks_clay, &
2244 ptf_ks_curveslope, &
2245 rootfractioncoefficient_forest, &
2246 rootfractioncoefficient_impervious, &
2247 rootfractioncoefficient_pervious, &
2248 infiltrationshapefactor, &
2249 rootfractioncoefficient_sand, &
2250 rootfractioncoefficient_clay, &
2251 fcmin_glob, &
2252 fcdelta_glob
2253
2254 if ( self%read_from_file ) then
2255 call open_new_nml(file, unit)
2256 call position_nml(self%name, unit)
2257 read(unit, nml=soilmoisture4)
2258 call close_nml(unit)
2259 self%orgMatterContent_forest = orgmattercontent_forest
2260 self%orgMatterContent_impervious = orgmattercontent_impervious
2261 self%orgMatterContent_pervious = orgmattercontent_pervious
2262 self%PTF_lower66_5_constant = ptf_lower66_5_constant
2263 self%PTF_lower66_5_clay = ptf_lower66_5_clay
2264 self%PTF_lower66_5_Db = ptf_lower66_5_db
2265 self%PTF_higher66_5_constant = ptf_higher66_5_constant
2266 self%PTF_higher66_5_clay = ptf_higher66_5_clay
2267 self%PTF_higher66_5_Db = ptf_higher66_5_db
2268 self%PTF_Ks_constant = ptf_ks_constant
2269 self%PTF_Ks_sand = ptf_ks_sand
2270 self%PTF_Ks_clay = ptf_ks_clay
2271 self%PTF_Ks_curveSlope = ptf_ks_curveslope
2272 self%rootFractionCoefficient_forest = rootfractioncoefficient_forest
2273 self%rootFractionCoefficient_impervious = rootfractioncoefficient_impervious
2274 self%rootFractionCoefficient_pervious = rootfractioncoefficient_pervious
2275 self%infiltrationShapeFactor = infiltrationshapefactor
2276 self%rootFractionCoefficient_sand = rootfractioncoefficient_sand
2277 self%rootFractionCoefficient_clay = rootfractioncoefficient_clay
2278 self%FCmin_glob = fcmin_glob
2279 self%FCdelta_glob = fcdelta_glob
2280 self%read_from_file = .false.
2281 end if
2282 end subroutine read_soilmoisture4
2283
2284 !> \brief Read 'directrunoff1' namelist content.
2285 subroutine read_directrunoff1(self, file)
2286 implicit none
2287 class(nml_directrunoff1_t), intent(inout) :: self
2288 character(*), intent(in) :: file !< file containing the namelist
2289
2290 integer :: unit !< file unit to open the given file
2291 real(dp), dimension(nColPars) :: imperviousStorageCapacity !< direct Runoff: Sealed Area storage capacity
2292
2293 namelist /directrunoff1/ &
2294 imperviousstoragecapacity
2295
2296 if ( self%read_from_file ) then
2297 call open_new_nml(file, unit)
2298 call position_nml(self%name, unit)
2299 read(unit, nml=directrunoff1)
2300 call close_nml(unit)
2301 self%imperviousStorageCapacity = imperviousstoragecapacity
2302 self%read_from_file = .false.
2303 end if
2304 end subroutine read_directrunoff1
2305
2306 !> \brief Read 'petminus1' namelist content.
2307 subroutine read_petminus1(self, file)
2308 implicit none
2309 class(nml_petminus1_t), intent(inout) :: self
2310 character(*), intent(in) :: file !< file containing the namelist
2311
2312 integer :: unit !< file unit to open the given file
2313 real(dp), dimension(nColPars) :: PET_a_forest !< DSF=PET_a+PET_b*(1-exp(PET_c*LAI)) to correct PET as PET=DSF*PET
2314 real(dp), dimension(nColPars) :: PET_a_impervious !< DSF=PET_a+PET_b*(1-exp(PET_c*LAI)) to correct PET as PET=DSF*PET
2315 real(dp), dimension(nColPars) :: PET_a_pervious !< DSF=PET_a+PET_b*(1-exp(PET_c*LAI)) to correct PET as PET=DSF*PET
2316 real(dp), dimension(nColPars) :: PET_b !< DSF=PET_a+PET_b*(1-exp(PET_c*LAI)) to correct PET as PET=DSF*PET
2317 real(dp), dimension(nColPars) :: PET_c !< DSF=PET_a+PET_b*(1-exp(PET_c*LAI)) to correct PET as PET=DSF*PET
2318
2319 namelist /petminus1/ &
2320 pet_a_forest, &
2321 pet_a_impervious, &
2322 pet_a_pervious, &
2323 pet_b, &
2324 pet_c
2325
2326 if ( self%read_from_file ) then
2327 call open_new_nml(file, unit)
2328 call position_nml(self%name, unit)
2329 read(unit, nml=petminus1)
2330 call close_nml(unit)
2331 self%PET_a_forest = pet_a_forest
2332 self%PET_a_impervious = pet_a_impervious
2333 self%PET_a_pervious = pet_a_pervious
2334 self%PET_b = pet_b
2335 self%PET_c = pet_c
2336 self%read_from_file = .false.
2337 end if
2338 end subroutine read_petminus1
2339
2340 !> \brief Read 'pet0' namelist content.
2341 subroutine read_pet0(self, file)
2342 implicit none
2343 class(nml_pet0_t), intent(inout) :: self
2344 character(*), intent(in) :: file !< file containing the namelist
2345
2346 integer :: unit !< file unit to open the given file
2347 real(dp), dimension(nColPars) :: minCorrectionFactorPET !< minimum factor for PET correction with aspect
2348 real(dp), dimension(nColPars) :: maxCorrectionFactorPET !< maximum factor for PET correction with aspect
2349 real(dp), dimension(nColPars) :: aspectTresholdPET !< aspect threshold for PET correction with aspect
2350
2351 namelist /pet0/ &
2352 mincorrectionfactorpet, &
2353 maxcorrectionfactorpet, &
2354 aspecttresholdpet
2355
2356 if ( self%read_from_file ) then
2357 call open_new_nml(file, unit)
2358 call position_nml(self%name, unit)
2359 read(unit, nml=pet0)
2360 call close_nml(unit)
2361 self%minCorrectionFactorPET = mincorrectionfactorpet
2362 self%maxCorrectionFactorPET = maxcorrectionfactorpet
2363 self%aspectTresholdPET = aspecttresholdpet
2364 self%read_from_file = .false.
2365 end if
2366 end subroutine read_pet0
2367
2368 !> \brief Read 'pet1' namelist content.
2369 subroutine read_pet1(self, file)
2370 implicit none
2371 class(nml_pet1_t), intent(inout) :: self
2372 character(*), intent(in) :: file !< file containing the namelist
2373
2374 integer :: unit !< file unit to open the given file
2375 real(dp), dimension(nColPars) :: minCorrectionFactorPET !< minimum factor for PET correction with aspect
2376 real(dp), dimension(nColPars) :: maxCorrectionFactorPET !< maximum factor for PET correction with aspect
2377 real(dp), dimension(nColPars) :: aspectTresholdPET !< aspect threshold for PET correction with aspect
2378 real(dp), dimension(nColPars) :: HargreavesSamaniCoeff !< coefficient for Hargreaves Samani
2379
2380 namelist /pet1/ &
2381 mincorrectionfactorpet, &
2382 maxcorrectionfactorpet, &
2383 aspecttresholdpet, &
2384 hargreavessamanicoeff
2385
2386 if ( self%read_from_file ) then
2387 call open_new_nml(file, unit)
2388 call position_nml(self%name, unit)
2389 read(unit, nml=pet1)
2390 call close_nml(unit)
2391 self%minCorrectionFactorPET = mincorrectionfactorpet
2392 self%maxCorrectionFactorPET = maxcorrectionfactorpet
2393 self%aspectTresholdPET = aspecttresholdpet
2394 self%HargreavesSamaniCoeff = hargreavessamanicoeff
2395 self%read_from_file = .false.
2396 end if
2397 end subroutine read_pet1
2398
2399 !> \brief Read 'pet2' namelist content.
2400 subroutine read_pet2(self, file)
2401 implicit none
2402 class(nml_pet2_t), intent(inout) :: self
2403 character(*), intent(in) :: file !< file containing the namelist
2404
2405 integer :: unit !< file unit to open the given file
2406 real(dp), dimension(nColPars) :: PriestleyTaylorCoeff !< Priestley-Taylor coefficient
2407 real(dp), dimension(nColPars) :: PriestleyTaylorLAIcorr !< Priestley-Taylor LAI correction factor
2408
2409 namelist /pet2/ &
2410 priestleytaylorcoeff, &
2411 priestleytaylorlaicorr
2412
2413 if ( self%read_from_file ) then
2414 call open_new_nml(file, unit)
2415 call position_nml(self%name, unit)
2416 read(unit, nml=pet2)
2417 call close_nml(unit)
2418 self%PriestleyTaylorCoeff = priestleytaylorcoeff
2419 self%PriestleyTaylorLAIcorr = priestleytaylorlaicorr
2420 self%read_from_file = .false.
2421 end if
2422 end subroutine read_pet2
2423
2424 !> \brief Read 'pet3' namelist content.
2425 subroutine read_pet3(self, file)
2426 implicit none
2427 class(nml_pet3_t), intent(inout) :: self
2428 character(*), intent(in) :: file !< file containing the namelist
2429
2430 integer :: unit !< file unit to open the given file
2431 real(dp), dimension(nColPars) :: canopyheigth_forest !< canopy height for foreset
2432 real(dp), dimension(nColPars) :: canopyheigth_impervious !< canopy height for impervious
2433 real(dp), dimension(nColPars) :: canopyheigth_pervious !< canopy height for pervious
2434 real(dp), dimension(nColPars) :: displacementheight_coeff !< displacement height coefficient
2435 real(dp), dimension(nColPars) :: roughnesslength_momentum_coeff !< roughness length momentum coefficient
2436 real(dp), dimension(nColPars) :: roughnesslength_heat_coeff !< roughness length heat coefficient
2437 real(dp), dimension(nColPars) :: stomatal_resistance !< stomatal resistance
2438
2439 namelist /pet3/ &
2440 canopyheigth_forest, &
2441 canopyheigth_impervious, &
2442 canopyheigth_pervious, &
2443 displacementheight_coeff, &
2444 roughnesslength_momentum_coeff, &
2445 roughnesslength_heat_coeff, &
2446 stomatal_resistance
2447
2448 if ( self%read_from_file ) then
2449 call open_new_nml(file, unit)
2450 call position_nml(self%name, unit)
2451 read(unit, nml=pet3)
2452 call close_nml(unit)
2453 self%canopyheigth_forest = canopyheigth_forest
2454 self%canopyheigth_impervious = canopyheigth_impervious
2455 self%canopyheigth_pervious = canopyheigth_pervious
2456 self%displacementheight_coeff = displacementheight_coeff
2457 self%roughnesslength_momentum_coeff = roughnesslength_momentum_coeff
2458 self%roughnesslength_heat_coeff = roughnesslength_heat_coeff
2459 self%stomatal_resistance = stomatal_resistance
2460 self%read_from_file = .false.
2461 end if
2462 end subroutine read_pet3
2463
2464 !> \brief Read 'interflow1' namelist content.
2465 subroutine read_interflow1(self, file)
2466 implicit none
2467 class(nml_interflow1_t), intent(inout) :: self
2468 character(*), intent(in) :: file !< file containing the namelist
2469
2470 integer :: unit !< file unit to open the given file
2471 real(dp), dimension(nColPars) :: interflowStorageCapacityFactor !< interflow storage capacity factor
2472 real(dp), dimension(nColPars) :: interflowRecession_slope !< multiplier for slope to derive interflow recession constant
2473 !> multiplier to derive fast interflow recession constant for forest
2474 real(dp), dimension(nColPars) :: fastInterflowRecession_forest
2475 !> multiplier for variability of saturated hydraulic conductivity to derive slow interflow recession constant
2476 real(dp), dimension(nColPars) :: slowInterflowRecession_Ks
2477 !> multiplier for variability of saturated hydraulic conductivity to derive slow interflow exponent
2478 real(dp), dimension(nColPars) :: exponentSlowInterflow
2479
2480 namelist /interflow1/ &
2481 interflowstoragecapacityfactor, &
2482 interflowrecession_slope, &
2483 fastinterflowrecession_forest, &
2484 slowinterflowrecession_ks, &
2485 exponentslowinterflow
2486
2487 if ( self%read_from_file ) then
2488 call open_new_nml(file, unit)
2489 call position_nml(self%name, unit)
2490 read(unit, nml=interflow1)
2491 call close_nml(unit)
2492 self%interflowStorageCapacityFactor = interflowstoragecapacityfactor
2493 self%interflowRecession_slope = interflowrecession_slope
2494 self%fastInterflowRecession_forest = fastinterflowrecession_forest
2495 self%slowInterflowRecession_Ks = slowinterflowrecession_ks
2496 self%exponentSlowInterflow = exponentslowinterflow
2497 self%read_from_file = .false.
2498 end if
2499 end subroutine read_interflow1
2500
2501 !> \brief Read 'percolation1' namelist content.
2502 subroutine read_percolation1(self, file)
2503 implicit none
2504 class(nml_percolation1_t), intent(inout) :: self
2505 character(*), intent(in) :: file !< file containing the namelist
2506
2507 integer :: unit !< file unit to open the given file
2508 real(dp), dimension(nColPars) :: rechargeCoefficient !< recharge coefficient
2509 real(dp), dimension(nColPars) :: rechargeFactor_karstic !< recharge factor for karstic percolation
2510 real(dp), dimension(nColPars) :: gain_loss_GWreservoir_karstic !< gain loss in ground water reservoir for karstic
2511
2512 namelist /percolation1/ &
2513 rechargecoefficient, &
2514 rechargefactor_karstic, &
2515 gain_loss_gwreservoir_karstic
2516
2517 if ( self%read_from_file ) then
2518 call open_new_nml(file, unit)
2519 call position_nml(self%name, unit)
2520 read(unit, nml=percolation1)
2521 call close_nml(unit)
2522 self%rechargeCoefficient = rechargecoefficient
2523 self%rechargeFactor_karstic = rechargefactor_karstic
2524 self%gain_loss_GWreservoir_karstic = gain_loss_gwreservoir_karstic
2525 self%read_from_file = .false.
2526 end if
2527 end subroutine read_percolation1
2528
2529 !> \brief Read 'neutrons1' namelist content.
2530 subroutine read_neutrons1(self, file)
2531 implicit none
2532 class(nml_neutrons1_t), intent(inout) :: self
2533 character(*), intent(in) :: file !< file containing the namelist
2534
2535 integer :: unit !< file unit to open the given file
2536 real(dp), dimension(nColPars) :: Desilets_N0 !< Desilets N0 parameter
2537 real(dp), dimension(nColPars) :: Desilets_LW0 !< Desilets LW0 parameter
2538 real(dp), dimension(nColPars) :: Desilets_LW1 !< Desilets LW1 parameter
2539
2540 namelist /neutrons1/ &
2541 desilets_n0, &
2542 desilets_lw0, &
2543 desilets_lw1
2544
2545 if ( self%read_from_file ) then
2546 call open_new_nml(file, unit)
2547 call position_nml(self%name, unit)
2548 read(unit, nml=neutrons1)
2549 call close_nml(unit)
2550 self%Desilets_N0 = desilets_n0
2551 self%Desilets_LW0 = desilets_lw0
2552 self%Desilets_LW1 = desilets_lw1
2553 self%read_from_file = .false.
2554 end if
2555 end subroutine read_neutrons1
2556
2557 !> \brief Read 'neutrons2' namelist content.
2558 subroutine read_neutrons2(self, file)
2559 implicit none
2560 class(nml_neutrons2_t), intent(inout) :: self
2561 character(*), intent(in) :: file !< file containing the namelist
2562
2563 integer :: unit !< file unit to open the given file
2564 real(dp), dimension(nColPars) :: COSMIC_N0 !< cosmic N0 parameter
2565 real(dp), dimension(nColPars) :: COSMIC_N1 !< cosmic N1 parameter
2566 real(dp), dimension(nColPars) :: COSMIC_N2 !< cosmic N2 parameter
2567 real(dp), dimension(nColPars) :: COSMIC_alpha0 !< cosmic alpha0 parameter
2568 real(dp), dimension(nColPars) :: COSMIC_alpha1 !< cosmic alpha1 parameter
2569 real(dp), dimension(nColPars) :: COSMIC_L30 !< cosmic L30 parameter
2570 real(dp), dimension(nColPars) :: COSMIC_L31 !< cosmic L31 parameter
2571 real(dp), dimension(nColPars) :: COSMIC_LW0 !< cosmic LW0 parameter
2572 real(dp), dimension(nColPars) :: COSMIC_LW1 !< cosmic LW1 parameter
2573
2574 namelist /neutrons2/ &
2575 cosmic_n0, &
2576 cosmic_n1, &
2577 cosmic_n2, &
2578 cosmic_alpha0, &
2579 cosmic_alpha1, &
2580 cosmic_l30, &
2581 cosmic_l31, &
2582 cosmic_lw0, &
2583 cosmic_lw1
2584
2585 if ( self%read_from_file ) then
2586 call open_new_nml(file, unit)
2587 call position_nml(self%name, unit)
2588 read(unit, nml=neutrons2)
2589 call close_nml(unit)
2590 self%COSMIC_N0 = cosmic_n0
2591 self%COSMIC_N1 = cosmic_n1
2592 self%COSMIC_N2 = cosmic_n2
2593 self%COSMIC_alpha0 = cosmic_alpha0
2594 self%COSMIC_alpha1 = cosmic_alpha1
2595 self%COSMIC_L30 = cosmic_l30
2596 self%COSMIC_L31 = cosmic_l31
2597 self%COSMIC_LW0 = cosmic_lw0
2598 self%COSMIC_LW1 = cosmic_lw1
2599 self%read_from_file = .false.
2600 end if
2601 end subroutine read_neutrons2
2602
2603 !> \brief Read 'geoparameter' namelist content.
2604 subroutine read_geoparameter(self, file)
2605 implicit none
2606 class(nml_geoparameter_t), intent(inout) :: self
2607 character(*), intent(in) :: file !< file containing the namelist
2608
2609 integer :: unit !< file unit to open the given file
2610 !> geological parameters (ordering according to file 'geology_classdefinition.txt')
2611 real(dp), dimension(maxGeoUnit, nColPars) :: GeoParam
2612
2613 namelist /geoparameter/ &
2614 geoparam
2615
2616 if ( self%read_from_file ) then
2617 geoparam = nodata_dp
2618 call open_new_nml(file, unit)
2619 call position_nml(self%name, unit)
2620 read(unit, nml=geoparameter)
2621 call close_nml(unit)
2622 self%GeoParam = geoparam
2623 self%read_from_file = .false.
2624 end if
2625 end subroutine read_geoparameter
2626
2627 !> \brief Read 'mainconfig_mrm' namelist content.
2628 subroutine read_mainconfig_mrm(self, file)
2629 implicit none
2630 class(nml_mainconfig_mrm_t), intent(inout) :: self
2631 character(*), intent(in) :: file !< file containing the namelist
2632
2633 integer :: unit !< file unit to open the given file
2634 logical :: ALMA_convention !< flag for ALMA convention (see http://www.lmd.jussieu.fr/~polcher/ALMA/convention_3.html)
2635 character(256) :: filenameTotalRunoff !< Filename of simulated total runoff file
2636 character(256) :: varnameTotalRunoff !< variable name of total runoff
2637 logical :: gw_coupling !< switch to enable ground water coupling
2638
2639 namelist /mainconfig_mrm/ &
2640 alma_convention, &
2641 filenametotalrunoff, &
2642 varnametotalrunoff, &
2643 gw_coupling
2644
2645 if ( self%read_from_file ) then
2646 alma_convention = .false.
2647 filenametotalrunoff = 'total_runoff'
2648 varnametotalrunoff = 'total_runoff'
2649 gw_coupling = .false.
2650 call open_new_nml(file, unit)
2651 call position_nml(self%name, unit)
2652 read(unit, nml=mainconfig_mrm)
2653 call close_nml(unit)
2654 self%ALMA_convention = alma_convention
2655 self%filenameTotalRunoff = filenametotalrunoff
2656 self%varnameTotalRunoff = varnametotalrunoff
2657 self%gw_coupling = gw_coupling
2658 self%read_from_file = .false.
2659 end if
2660 end subroutine read_mainconfig_mrm
2661
2662 !> \brief Read 'directories_mrm' namelist content.
2663 subroutine read_directories_mrm(self, file)
2664 implicit none
2665 class(nml_directories_mrm_t), intent(inout) :: self
2666 character(*), intent(in) :: file !< file containing the namelist
2667
2668 integer :: unit !< file unit to open the given file
2669 character(256), dimension(maxNoDomains) :: dir_Gauges !< directory containing gauge time series
2670 character(256), dimension(maxNoDomains) :: dir_Total_Runoff !< directory where simulated runoff can be found
2671 character(256), dimension(maxNoDomains) :: dir_Bankfull_Runoff !< directory where runoff at bankfull conditions can be found
2672
2673 namelist /directories_mrm/ &
2674 dir_gauges, &
2675 dir_total_runoff, &
2676 dir_bankfull_runoff
2677
2678 if ( self%read_from_file ) then
2679 call open_new_nml(file, unit)
2680 call position_nml(self%name, unit)
2681 read(unit, nml=directories_mrm)
2682 call close_nml(unit)
2683 self%dir_Gauges = dir_gauges
2684 self%dir_Total_Runoff = dir_total_runoff
2685 self%dir_Bankfull_Runoff = dir_bankfull_runoff
2686 self%read_from_file = .false.
2687 end if
2688 end subroutine read_directories_mrm
2689
2690 !> \brief Read 'evaluation_gauges' namelist content.
2691 subroutine read_evaluation_gauges(self, file)
2692 implicit none
2693 class(nml_evaluation_gauges_t), intent(inout) :: self
2694 character(*), intent(in) :: file !< file containing the namelist
2695
2696 integer :: unit !< file unit to open the given file
2697 integer(i4) :: nGaugesTotal !< Number of evaluation gauges for all domains
2698 integer(i4), dimension(maxNoDomains) :: NoGauges_domain !< number of gauges per domain
2699 integer(i4), dimension(maxNoDomains, maxNoGauges) :: Gauge_id !< gauge ID for each gauge
2700 character(256), dimension(maxNoDomains, maxNoGauges) :: Gauge_filename !< filename for each gauge time series
2701
2702 namelist /evaluation_gauges/ &
2703 ngaugestotal, &
2704 nogauges_domain, &
2705 gauge_id, &
2706 gauge_filename
2707
2708 if ( self%read_from_file ) then
2709 ngaugestotal = nodata_i4
2710 nogauges_domain = nodata_i4
2711 gauge_id = nodata_i4
2712 gauge_filename = num2str(nodata_i4)
2713 call open_new_nml(file, unit)
2714 call position_nml(self%name, unit)
2715 read(unit, nml=evaluation_gauges)
2716 call close_nml(unit)
2717 self%nGaugesTotal = ngaugestotal
2718 self%NoGauges_domain = nogauges_domain
2719 self%Gauge_id = gauge_id
2720 self%gauge_filename = gauge_filename
2721 self%read_from_file = .false.
2722 end if
2723 end subroutine read_evaluation_gauges
2724
2725 !> \brief Read 'inflow_gauges' namelist content.
2726 subroutine read_inflow_gauges(self, file)
2727 implicit none
2728 class(nml_inflow_gauges_t), intent(inout) :: self
2729 character(*), intent(in) :: file !< file containing the namelist
2730
2731 integer :: unit !< file unit to open the given file
2732 integer(i4) :: nInflowGaugesTotal !< Number of evaluation gauges for all domains
2733 integer(i4), dimension(maxNoDomains) :: NoInflowGauges_domain !< number of gauges for subdomain (1)
2734 integer(i4), dimension(maxNoDomains, maxNoGauges) :: InflowGauge_id !< id of inflow gauge(1) for subdomain(1) --> (1,1)
2735 !> name of file with timeseries of inflow gauge(1) for subdomain(1) --> (1,1)
2736 character(256), dimension(maxNoDomains, maxNoGauges) :: InflowGauge_filename
2737 !> consider flows from upstream/headwater cells of inflow gauge(1) for subdomain(1) --> (1,1)
2738 logical, dimension(maxNoDomains, maxNoGauges) :: InflowGauge_Headwater
2739
2740 namelist /inflow_gauges/ &
2741 ninflowgaugestotal, &
2742 noinflowgauges_domain, &
2743 inflowgauge_id, &
2744 inflowgauge_filename, &
2745 inflowgauge_headwater
2746
2747 if ( self%read_from_file ) then
2748 ninflowgaugestotal = 0
2749 noinflowgauges_domain = 0
2750 inflowgauge_id = nodata_i4
2751 inflowgauge_filename = num2str(nodata_i4)
2752 call open_new_nml(file, unit)
2753 call position_nml(self%name, unit)
2754 read(unit, nml=inflow_gauges)
2755 call close_nml(unit)
2756 self%nInflowGaugesTotal = ninflowgaugestotal
2757 self%NoInflowGauges_domain = noinflowgauges_domain
2758 self%InflowGauge_id = inflowgauge_id
2759 self%InflowGauge_filename = inflowgauge_filename
2760 self%InflowGauge_Headwater = inflowgauge_headwater
2761 self%read_from_file = .false.
2762 end if
2763 end subroutine read_inflow_gauges
2764
2765 !> \brief Read 'mrm_outputs' namelist content.
2766 subroutine read_mrm_outputs(self, file)
2767 use mo_message, only : message
2768 implicit none
2769 class(nml_mrm_outputs_t), intent(inout) :: self
2770 character(*), intent(in) :: file !< file containing the namelist
2771
2772 integer :: unit !< file unit to open the given file
2773 integer(i4) :: output_deflate_level_mrm !< netcdf deflate level
2774 logical :: output_double_precision_mrm !< switch to enable double precision in netcdf
2775 integer(i4) :: output_time_reference_mrm !< time reference point location in output nc files
2776 integer(i4) :: timeStep_model_outputs_mrm !< timestep for writing model outputs
2777 logical, dimension(mrm_nOutFlxState) :: outputFlxState_mrm !< Define model outputs see "mhm_outputs.nml"
2778
2779 logical :: file_exists
2780
2781 namelist /nloutputresults/ &
2782 output_deflate_level_mrm, &
2783 output_double_precision_mrm, &
2784 output_time_reference_mrm, &
2785 timestep_model_outputs_mrm, &
2786 outputflxstate_mrm
2787
2788 if ( self%read_from_file ) then
2789 output_deflate_level_mrm = 6
2790 output_double_precision_mrm = .true.
2791 output_time_reference_mrm = 0
2792 outputflxstate_mrm = .false.
2793 timestep_model_outputs_mrm = -2
2794 inquire(file = file, exist = file_exists)
2795 if (file_exists) then
2796 call open_new_nml(file, unit)
2797 call position_nml(self%name, unit)
2798 read(unit, nml=nloutputresults)
2799 call close_nml(unit)
2800 else
2801 call message('***Warning: No file specifying mRM output fluxes exists')
2802 end if
2803 self%output_deflate_level_mrm = output_deflate_level_mrm
2804 self%output_double_precision_mrm = output_double_precision_mrm
2805 self%output_time_reference_mrm = output_time_reference_mrm
2806 self%timeStep_model_outputs_mrm = timestep_model_outputs_mrm
2807 self%outputFlxState_mrm = outputflxstate_mrm
2808 self%read_from_file = .false.
2809 end if
2810 end subroutine read_mrm_outputs
2811
2812 !> \brief Read 'routing1' namelist content.
2813 subroutine read_routing1(self, file)
2814 implicit none
2815 class(nml_routing1_t), intent(inout) :: self
2816 character(*), intent(in) :: file !< file containing the namelist
2817
2818 integer :: unit !< file unit to open the given file
2819 real(dp), dimension(nColPars) :: muskingumTravelTime_constant !< muskingum parameter constant
2820 real(dp), dimension(nColPars) :: muskingumTravelTime_riverLength !< muskingum parameter river length
2821 real(dp), dimension(nColPars) :: muskingumTravelTime_riverSlope !< muskingum parameter river slope
2822 real(dp), dimension(nColPars) :: muskingumTravelTime_impervious !< muskingum parameter impervious
2823 real(dp), dimension(nColPars) :: muskingumAttenuation_riverSlope !< muskingum parameter attenuation river slope
2824
2825 namelist /routing1/ &
2826 muskingumtraveltime_constant, &
2827 muskingumtraveltime_riverlength, &
2828 muskingumtraveltime_riverslope, &
2829 muskingumtraveltime_impervious, &
2830 muskingumattenuation_riverslope
2831
2832 if ( self%read_from_file ) then
2833 call open_new_nml(file, unit)
2834 call position_nml(self%name, unit)
2835 read(unit, nml=routing1)
2836 call close_nml(unit)
2837 self%muskingumTravelTime_constant = muskingumtraveltime_constant
2838 self%muskingumTravelTime_riverLength = muskingumtraveltime_riverlength
2839 self%muskingumTravelTime_riverSlope = muskingumtraveltime_riverslope
2840 self%muskingumTravelTime_impervious = muskingumtraveltime_impervious
2841 self%muskingumAttenuation_riverSlope = muskingumattenuation_riverslope
2842 self%read_from_file = .false.
2843 end if
2844 end subroutine read_routing1
2845
2846 !> \brief Read 'routing2' namelist content.
2847 subroutine read_routing2(self, file)
2848 implicit none
2849 class(nml_routing2_t), intent(inout) :: self
2850 character(*), intent(in) :: file !< file containing the namelist
2851
2852 integer :: unit !< file unit to open the given file
2853 real(dp), dimension(nColPars) :: streamflow_celerity !< streamflow celerity
2854
2855 namelist /routing2/ &
2856 streamflow_celerity
2857 if ( self%read_from_file ) then
2858 call open_new_nml(file, unit)
2859 call position_nml(self%name, unit)
2860 read(unit, nml=routing2)
2861 call close_nml(unit)
2862 self%streamflow_celerity = streamflow_celerity
2863 self%read_from_file = .false.
2864 end if
2865 end subroutine read_routing2
2866
2867 !> \brief Read 'routing3' namelist content.
2868 subroutine read_routing3(self, file)
2869 implicit none
2870 class(nml_routing3_t), intent(inout) :: self
2871 character(*), intent(in) :: file !< file containing the namelist
2872
2873 integer :: unit !< file unit to open the given file
2874 real(dp), dimension(nColPars) :: slope_factor !< slope factor
2875
2876 namelist /routing3/ &
2877 slope_factor
2878
2879 if ( self%read_from_file ) then
2880 call open_new_nml(file, unit)
2881 call position_nml(self%name, unit)
2882 read(unit, nml=routing3)
2883 call close_nml(unit)
2884 self%slope_factor = slope_factor
2885 self%read_from_file = .false.
2886 end if
2887 end subroutine read_routing3
2888
2889 !> \brief Read 'config_riv_temp' namelist content.
2890 subroutine read_config_riv_temp(self, file)
2891 implicit none
2892 class(nml_config_riv_temp_t), intent(inout) :: self
2893 character(*), intent(in) :: file !< file containing the namelist
2894
2895 integer :: unit !< file unit to open the given file
2896 real(dp) :: albedo_water !< albedo of open water
2897 real(dp) :: pt_a_water !< priestley taylor alpha parameter for PET on open water
2898 real(dp) :: emissivity_water !< emissivity of water
2899 real(dp) :: turb_heat_ex_coeff !< lateral heat exchange coefficient water <-> air
2900 integer(i4) :: max_iter !< maximum number of iterations
2901 real(dp) :: delta_iter !< convergence delta
2902 real(dp) :: step_iter !< step size for iterative solver
2903 character(256) :: riv_widths_file !< file name for river widths
2904 character(256) :: riv_widths_name !< variable name for river widths
2905 character(256), dimension(maxNoDomains) :: dir_riv_widths !< files for river widths
2906
2907 namelist /config_riv_temp/ &
2908 albedo_water, &
2909 pt_a_water, &
2910 emissivity_water, &
2911 turb_heat_ex_coeff, &
2912 max_iter, &
2913 delta_iter, &
2914 step_iter, &
2915 riv_widths_file, &
2916 riv_widths_name, &
2917 dir_riv_widths
2918
2919 if ( self%read_from_file ) then
2920 albedo_water = 0.15_dp
2921 pt_a_water = 1.26_dp
2922 emissivity_water = 0.96_dp
2923 turb_heat_ex_coeff = 20.0_dp
2924 max_iter = 20_i4
2925 delta_iter = 1.0e-02_dp
2926 step_iter = 5.0_dp
2927 call open_new_nml(file, unit)
2928 call position_nml(self%name, unit)
2929 read(unit, nml=config_riv_temp)
2930 call close_nml(unit)
2931 self%albedo_water = albedo_water
2932 self%pt_a_water = pt_a_water
2933 self%emissivity_water = emissivity_water
2934 self%turb_heat_ex_coeff = turb_heat_ex_coeff
2935 self%max_iter = max_iter
2936 self%delta_iter = delta_iter
2937 self%step_iter = step_iter
2938 self%riv_widths_file = riv_widths_file
2939 self%riv_widths_name = riv_widths_name
2940 self%dir_riv_widths = dir_riv_widths
2941 self%read_from_file = .false.
2942 end if
2943 end subroutine read_config_riv_temp
2944
2945 !> \brief Read 'coupling' namelist content.
2946 subroutine read_coupling(self, file)
2947 implicit none
2948 class(nml_coupling_t), intent(inout) :: self
2949 character(*), intent(in) :: file !< file containing the namelist
2950
2951 integer :: unit, status
2952 integer(i4) :: case !< coupling case
2953 integer(i4) :: meteo_timestep !< timestep for meteo-data from coupling
2954 logical :: meteo_time_ref_endpoint !< expect meteo has time reference point at end of associated time interval
2955 logical :: meteo_expect_pre !< expect meteo from coupling: [mm] Precipitation
2956 logical :: meteo_expect_temp !< expect meteo from coupling: [degC] Air temperature
2957 logical :: meteo_expect_pet !< expect meteo from coupling: [mm TS-1] Potential evapotranspiration
2958 logical :: meteo_expect_tmin !< expect meteo from coupling: [degC] minimum daily air temperature
2959 logical :: meteo_expect_tmax !< expect meteo from coupling: [degC] maximum daily air temperature
2960 logical :: meteo_expect_netrad !< expect meteo from coupling: [W m2] net radiation
2961 logical :: meteo_expect_absvappress !< expect meteo from coupling: [Pa] absolute vapour pressure
2962 logical :: meteo_expect_windspeed !< expect meteo from coupling: [m s-1] windspeed
2963 logical :: meteo_expect_ssrd !< expect meteo from coupling: [W m2] short wave radiation
2964 logical :: meteo_expect_strd !< expect meteo from coupling: [W m2] long wave radiation
2965 logical :: meteo_expect_tann !< expect meteo from coupling: [degC] annual mean air temperature
2966
2967 namelist /coupling/ &
2968 case, &
2969 meteo_timestep, &
2970 meteo_time_ref_endpoint, &
2971 meteo_expect_pre, &
2972 meteo_expect_temp, &
2973 meteo_expect_pet, &
2974 meteo_expect_tmin, &
2975 meteo_expect_tmax, &
2976 meteo_expect_netrad, &
2977 meteo_expect_absvappress, &
2978 meteo_expect_windspeed, &
2979 meteo_expect_ssrd, &
2980 meteo_expect_strd, &
2981 meteo_expect_tann
2982
2983 if ( self%read_from_file ) then
2984 case = 0_i4 ! no coupling by default
2985 meteo_timestep = 0_i4 ! only valid if no meteo expected
2986 meteo_time_ref_endpoint = .false. ! meteo data usually given at begin of time interval (i.e. 00:00 for current day)
2987 meteo_expect_pre = .false.
2988 meteo_expect_temp = .false.
2989 meteo_expect_pet = .false.
2990 meteo_expect_tmin = .false.
2991 meteo_expect_tmax = .false.
2992 meteo_expect_netrad = .false.
2993 meteo_expect_absvappress = .false.
2994 meteo_expect_windspeed = .false.
2995 meteo_expect_ssrd = .false.
2996 meteo_expect_strd = .false.
2997 meteo_expect_tann = .false.
2998 call open_new_nml(file, unit)
2999 call position_nml(self%name, unit, status=status)
3000 if (status == 0) read(unit, nml=coupling)
3001 call close_nml(unit)
3002 self%case = case
3003 self%meteo_timestep = meteo_timestep
3004 self%meteo_time_ref_endpoint = meteo_time_ref_endpoint
3005 self%meteo_expect_pre = meteo_expect_pre
3006 self%meteo_expect_temp = meteo_expect_temp
3007 self%meteo_expect_pet = meteo_expect_pet
3008 self%meteo_expect_tmin = meteo_expect_tmin
3009 self%meteo_expect_tmax = meteo_expect_tmax
3010 self%meteo_expect_netrad = meteo_expect_netrad
3011 self%meteo_expect_absvappress = meteo_expect_absvappress
3012 self%meteo_expect_windspeed = meteo_expect_windspeed
3013 self%meteo_expect_ssrd = meteo_expect_ssrd
3014 self%meteo_expect_strd = meteo_expect_strd
3015 self%meteo_expect_tann = meteo_expect_tann
3016 end if
3017 end subroutine read_coupling
3018
3019end module mo_namelists
Provides constants commonly used by mHM, mRM and MPR.
integer(i4), parameter, public ncolpars
integer(i4), parameter, public maxnodomains
integer(i4), parameter, public maxnlcovers
real(dp), parameter, public nodata_dp
integer(i4), parameter, public nodata_i4
Provides structures needed by mHM, mRM and/or mpr.
logical, public restart_reset_fluxes_states
flag to reset fluxes and states read from restart to default values
integer(i4), parameter, public nerror_model
real(dp), dimension(nerror_model), public mcmc_error_params
Provides common types needed by mHM, mRM and/or mpr.
Provides structures needed by mHM, mRM and/or mpr.
integer(i4), parameter, public nprocesses
character(1024), public history
details on version/creation date
character(1024), public setup_description
any specific description of simulation
logical, public write_restart
character(1024), public project_details
project including funding instituion., PI, etc.
character(1024), public contact
contact details, incl.
character(256), public dirconfigout
character(256), public conventions
convention used for dataset
character(1024), public simulation_type
e.g.
integer(i4), public nlcoverscene
character(256), public dircommonfiles
integer(i4), public iflag_cordinate_sys
character(1024), public mhm_details
developing institution, specific mHM revision
Provides mHM specific constants.
integer(i4), parameter, public noutflxstate
Provides MPR specific constants.
integer(i4), parameter, public maxgeounit
integer(i4), parameter, public maxnosoilhorizons
Provides mRM specific constants.
integer(i4), parameter, public maxnogauges
Module containing all namelists representations.
subroutine read_interception1(self, file)
Read 'interception1' namelist content.
type(nml_soilmoisture3_t), public nml_soilmoisture3
'soilmoisture3' namelist content
type(nml_baseflow_config_t), public nml_baseflow_config
'baseflow_config' namelist content
subroutine read_lcover_mpr(self, file)
Read 'lcover_mpr' namelist content.
type(nml_evaluation_gauges_t), public nml_evaluation_gauges
'evaluation_gauges' namelist content
type(nml_percolation1_t), public nml_percolation1
'percolation1' namelist content
subroutine read_directories_general(self, file)
Read 'directories_general' namelist content.
subroutine read_inflow_gauges(self, file)
Read 'inflow_gauges' namelist content.
type(nml_coupling_t), public nml_coupling
'coupling' namelist content
subroutine read_neutrons2(self, file)
Read 'neutrons2' namelist content.
subroutine close_nml(unit)
Close namelist file.
subroutine read_interflow1(self, file)
Read 'interflow1' namelist content.
subroutine read_routing1(self, file)
Read 'routing1' namelist content.
type(nml_panevapo_t), public nml_panevapo
'panevapo' namelist content
type(nml_pet1_t), public nml_pet1
'pet1' namelist content
type(nml_directories_mrm_t), public nml_directories_mrm
'directories_mrm' namelist content
type(nml_mainconfig_mrm_t), public nml_mainconfig_mrm
'mainconfig_mrm' namelist content
subroutine read_optional_data(self, file)
Read 'optional_data' namelist content.
type(nml_lcover_mpr_t), public nml_lcover_mpr
'lcover_mpr' namelist content
type(nml_interflow1_t), public nml_interflow1
'interflow1' namelist content
subroutine read_directrunoff1(self, file)
Read 'directrunoff1' namelist content.
subroutine read_petminus1(self, file)
Read 'petminus1' namelist content.
type(nml_snow1_t), public nml_snow1
'snow1' namelist content
subroutine read_processselection(self, file)
Read 'processSelection' namelist content.
type(nml_routing3_t), public nml_routing3
'routing3' namelist content
type(nml_lcover_t), public nml_lcover
'LCover' namelist content
subroutine read_config_riv_temp(self, file)
Read 'config_riv_temp' namelist content.
type(nml_petminus1_t), public nml_petminus1
'petminus1' namelist content
type(nml_pet0_t), public nml_pet0
'pet0' namelist content
type(nml_routing1_t), public nml_routing1
'routing1' namelist content
subroutine read_lai_data_information(self, file)
Read 'lai_data_information' namelist content.
type(nml_mainconfig_mhm_mrm_t), public nml_mainconfig_mhm_mrm
'mainconfig_mhm_mrm' namelist content
subroutine read_directories_mhm(self, file)
Read 'directories_mhm' namelist content.
subroutine read_mainconfig(self, file)
Read 'mainconfig' namelist content.
type(nml_pet2_t), public nml_pet2
'pet2' namelist content
subroutine read_pet2(self, file)
Read 'pet2' namelist content.
type(nml_config_riv_temp_t), public nml_config_riv_temp
'config_riv_temp' namelist content
type(nml_neutrons1_t), public nml_neutrons1
'neutrons1' namelist content
type(nml_soilmoisture1_t), public nml_soilmoisture1
'soilmoisture1' namelist content
type(nml_lai_data_information_t), public nml_lai_data_information
'lai_data_information' namelist content
type(nml_optional_data_t), public nml_optional_data
'optional_data' namelist content
subroutine read_panevapo(self, file)
Read 'panevapo' namelist content.
type(nml_inflow_gauges_t), public nml_inflow_gauges
'inflow_gauges' namelist content
subroutine read_mainconfig_mhm_mrm(self, file)
Read 'mainconfig_mhm_mrm' namelist content.
type(nml_processselection_t), public nml_processselection
'processSelection' namelist content
subroutine read_optimization(self, file)
Read 'optimization' namelist content.
subroutine read_nightdayratio(self, file)
Read 'nightdayratio' namelist content.
subroutine read_percolation1(self, file)
Read 'percolation1' namelist content.
subroutine read_soildata(self, file)
Read 'soildata' namelist content.
subroutine read_neutrons1(self, file)
Read 'neutrons1' namelist content.
subroutine read_soilmoisture1(self, file)
Read 'soilmoisture1' namelist content.
type(nml_neutrons2_t), public nml_neutrons2
'neutrons2' namelist content
type(nml_mainconfig_t), public nml_mainconfig
'mainconfig' namelist content
subroutine read_evaluation_gauges(self, file)
Read 'evaluation_gauges' namelist content.
subroutine read_time_periods(self, file)
Read 'time_periods' namelist content.
type(nml_directories_mpr_t), public nml_directories_mpr
'directories_mpr' namelist content
subroutine read_geoparameter(self, file)
Read 'geoparameter' namelist content.
subroutine read_pet3(self, file)
Read 'pet3' namelist content.
subroutine read_coupling(self, file)
Read 'coupling' namelist content.
type(nml_soilmoisture2_t), public nml_soilmoisture2
'soilmoisture2' namelist content
type(nml_pet3_t), public nml_pet3
'pet3' namelist content
type(nml_optimization_t), public nml_optimization
'optimization' namelist content
subroutine read_baseflow_config(self, file)
Read 'baseflow_config' namelist content.
type(nml_mrm_outputs_t), public nml_mrm_outputs
'mrm_outputs' namelist content
type(nml_nloutputresults_t), public nml_nloutputresults
'nloutputresults' namelist content
subroutine open_new_nml(file, unit)
Open namelist file and generate a new unit.
type(nml_time_periods_t), public nml_time_periods
'time_periods' namelist content
type(nml_nightdayratio_t), public nml_nightdayratio
'nightdayratio' namelist content
type(nml_directories_mhm_t), public nml_directories_mhm
'directories_mhm' namelist content
subroutine read_routing2(self, file)
Read 'routing2' namelist content.
type(nml_soildata_t), public nml_soildata
'soildata' namelist content
type(nml_geoparameter_t), public nml_geoparameter
'geoparameter' namelist content
type(nml_directrunoff1_t), public nml_directrunoff1
'directrunoff1' namelist content
subroutine read_directories_mpr(self, file)
Read 'directories_mpr' namelist content.
type(nml_interception1_t), public nml_interception1
'interception1' namelist content
subroutine read_soilmoisture4(self, file)
Read 'soilmoisture4' namelist content.
type(nml_project_description_t), public nml_project_description
'project_description' namelist content
type(nml_soilmoisture4_t), public nml_soilmoisture4
'soilmoisture4' namelist content
subroutine read_pet1(self, file)
Read 'pet1' namelist content.
subroutine read_snow1(self, file)
Read 'snow1' namelist content.
subroutine read_nloutputresults(self, file)
Read 'nloutputresults' namelist content.
subroutine read_directories_mrm(self, file)
Read 'directories_mrm' namelist content.
subroutine read_lcover(self, file)
Read 'LCover' namelist content.
subroutine read_soilmoisture3(self, file)
Read 'soilmoisture3' namelist content.
type(nml_directories_general_t), public nml_directories_general
'directories_general' namelist content
subroutine read_pet0(self, file)
Read 'pet0' namelist content.
subroutine read_soilmoisture2(self, file)
Read 'soilmoisture2' namelist content.
subroutine read_routing3(self, file)
Read 'routing3' namelist content.
subroutine read_mrm_outputs(self, file)
Read 'mrm_outputs' namelist content.
subroutine read_project_description(self, file)
Read 'project_description' namelist content.
subroutine read_mainconfig_mrm(self, file)
Read 'mainconfig_mrm' namelist content.
type(nml_routing2_t), public nml_routing2
'routing2' namelist content
'baseflow_config' namelist content
'config_riv_temp' namelist content
'coupling' namelist content
'directories_general' namelist content
'directories_mhm' namelist content
'directories_mpr' namelist content
'directories_mrm' namelist content
'directrunoff1' namelist content
'evaluation_gauges' namelist content
'geoparameter' namelist content
'inflow_gauges' namelist content
'interception1' namelist content
'interflow1' namelist content
'lai_data_information' namelist content
'lcover_mpr' namelist content
'LCover' namelist content
'mainconfig_mhm_mrm' namelist content
'mainconfig_mrm' namelist content
'mainconfig' namelist content
'mrm_outputs' namelist content
'neutrons1' namelist content
'neutrons2' namelist content
'nightdayratio' namelist content
'nloutputresults' namelist content
'optimization' namelist content
'optional_data' namelist content
'panevapo' namelist content
'percolation1' namelist content
'pet0' namelist content
'pet1' namelist content
'pet2' namelist content
'pet3' namelist content
'petminus1' namelist content
'processSelection' namelist content
'project_description' namelist content
'routing1' namelist content
'routing2' namelist content
'routing3' namelist content
'snow1' namelist content
'soildata' namelist content
'soilmoisture1' namelist content
'soilmoisture2' namelist content
'soilmoisture3' namelist content
'soilmoisture4' namelist content
'time_periods' namelist content