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