16 USE mo_kind,
ONLY : i4, dp
17 use mo_message,
only: message, error_message
105 use mo_nml,
only : close_nml, open_nml, position_nml
106 use mo_string_utils,
only : num2str
110 character(*),
intent(in) :: file_namelist
112 integer,
intent(in) :: unamelist
114 integer(i4) :: idomain, domainid
117 character(256),
dimension(maxNoDomains) :: dir_soil_moisture
120 character(256),
dimension(maxNoDomains) :: dir_neutrons
123 character(256),
dimension(maxNoDomains) :: dir_evapotranspiration
126 character(256),
dimension(maxNoDomains) :: dir_tws
128 integer(i4) :: timestep_tws_input
129 integer(i4) :: timestep_et_input
130 integer(i4) :: timestep_sm_input
131 integer(i4) :: timestep_neutrons_input
136 namelist /optional_data/ &
140 dir_evapotranspiration, &
143 timestep_neutrons_input, &
150 namelist /nloutputresults/ &
162 call open_nml(file_namelist, unamelist, quiet = .true.)
181 call position_nml(
'optional_data', unamelist)
182 read(unamelist, nml = optional_data)
185 l1_smobs(idomain)%dir = dir_soil_moisture(domainid)
186 l1_smobs(idomain)%timeStepInput = timestep_sm_input
190 call error_message(
'***ERROR: Number of soil horizons representative for input soil moisture exceeded', raise=.false.)
191 call error_message(
' defined number of soil horizions: ', adjustl(trim(num2str(
maxnosoilhorizons))),
'!')
195 call position_nml(
'optional_data', unamelist)
196 read(unamelist, nml = optional_data)
206 call position_nml(
'optional_data', unamelist)
207 read(unamelist, nml = optional_data)
210 l1_etobs(idomain)%dir = dir_evapotranspiration(domainid)
211 l1_etobs(idomain)%timeStepInput = timestep_et_input
216 call position_nml(
'optional_data', unamelist)
217 read(unamelist, nml = optional_data)
221 l1_twsaobs(idomain)%timeStepInput = timestep_tws_input
226 call position_nml(
'optional_data', unamelist)
227 read(unamelist, nml = optional_data)
230 l1_etobs(idomain)%dir = dir_evapotranspiration(domainid)
231 l1_etobs(idomain)%timeStepInput = timestep_et_input
236 call position_nml(
'optional_data', unamelist)
237 read(unamelist, nml = optional_data)
241 l1_twsaobs(idomain)%timeStepInput = timestep_tws_input
247 call position_nml(
'baseflow_config', unamelist)
248 read(unamelist, nml = baseflow_config)
257 call position_nml(
'panEvapo', unamelist)
258 read(unamelist, nml = panevapo)
262 call close_nml(unamelist)
272 call position_nml(
'NLoutputResults',
udefoutput)
277 call message(
'Following output will be written:')
280 call message(
' NetCDF output precision: double')
282 call message(
' NetCDF output precision: single')
286 call message(
' NetCDF output time reference point: start of time interval')
288 call message(
' NetCDF output time reference point: center of time interval')
290 call message(
' NetCDF output time reference point: end of time interval')
292 call message(
' STATES:')
294 call message(
' interceptional storage (L1_inter) [mm]')
297 call message(
' height of snowpack (L1_snowpack) [mm]')
300 call message(
' soil water content in the single layers (L1_soilMoist) [mm]')
303 call message(
' volumetric soil moisture in the single layers [mm/mm]')
306 call message(
' mean volum. soil moisture averaged over all soil layers [mm/mm]')
309 call message(
' waterdepth in reservoir of sealed areas (L1_sealSTW) [mm]')
312 call message(
' waterdepth in reservoir of unsat. soil zone (L1_unsatSTW) [mm]')
315 call message(
' waterdepth in reservoir of sat. soil zone (L1_satSTW) [mm]')
319 call message(
' ground albedo neutrons (L1_neutrons) [cph]')
322 call message(
' FLUXES:')
324 call message(
' potential evapotranspiration PET (L1_pet) [mm/T]')
327 call message(
' actual evapotranspiration aET (L1_aETCanopy) [mm/T]')
330 call message(
' total discharge generated per cell (L1_total_runoff) [mm/T]')
333 call message(
' direct runoff generated per cell (L1_runoffSeal) [mm/T]')
336 call message(
' fast interflow generated per cell (L1_fastRunoff) [mm/T]')
339 call message(
' slow interflow generated per cell (L1_slowRunoff) [mm/T]')
342 call message(
' baseflow generated per cell (L1_baseflow) [mm/T]')
345 call message(
' groundwater recharge (L1_percol) [mm/T]')
348 call message(
' infiltration (L1_infilSoil) [mm/T]')
351 call message(
' actual evapotranspiration from soil layers (L1_aETSoil) [mm/T]')
354 call message(
' effective precipitation (L1_preEffect) [mm/T]')
357 call message(
' snow melt (L1_melt) [mm/T]')
360 call message(
'FINISHED reading config')
364 call message(
'WARNING: FLUXES and STATES netCDF will be not written since optimization flag is TRUE ')
Provides constants commonly used by mHM, mRM and MPR.
integer(i4), parameter, public maxnodomains
integer(i4), parameter, public nodata_i4
Reading of main model configurations.
subroutine, public common_check_resolution(do_message, allow_subgrid_routing)
check resolution
Provides structures needed by mHM, mRM and/or mpr.
integer(i4), public opti_function
Provides structures needed by mHM, mRM and/or mpr.
type(domain_meta), public domainmeta
integer(i4), dimension(nprocesses, 3), public processmatrix
Provides file names and units for mHM.
integer, parameter udefoutput
Unit for file defining mHM's outputs.
character(:), allocatable file_defoutput
file defining mHM's outputs
Main global variables for mHM.
logical, dimension(noutflxstate) outputflxstate
Define model outputs see "mhm_outputs.nml" dim1 = number of output variables to be written.
type(optidata), dimension(:), allocatable, public l1_twsaobs
this stores L1_tws, the mask, the directory of the observerd data, and the timestepInput of the simul...
logical, public bfi_calc
calculate observed BFI from gauges with Eckhardt filter
type(optidata), dimension(:), allocatable, public l1_neutronsobs
type(optidata), dimension(:), allocatable, public l1_smobs
integer(i4) timestep_model_outputs
timestep for writing model outputs
integer(i4) output_deflate_level
deflate level in nc files
logical output_double_precision
output precision in nc files
integer(i4) output_time_reference
time reference point location in output nc files
real(dp), dimension(int(yearmonths, i4)), public evap_coeff
[-] Evap.
integer(i4) nsoilhorizons_sm_input
type(optidata), dimension(:), allocatable, public l1_etobs
real(dp), dimension(:), allocatable, public bfi_obs
given base-flow index per domain
Reading of main model configurations.
subroutine, public mhm_read_config(file_namelist, unamelist)
Read main configurations for mHM.
Provides MPR specific constants.
integer(i4), parameter, public maxnosoilhorizons
Global variables for mpr only.
integer(i4), public nsoilhorizons_mhm