5.13.2-dev0
mHM
The mesoscale Hydrological Model
Loading...
Searching...
No Matches
mo_meteo_helper Module Reference

Prepare meteorological forcings data for mHM. More...

Functions/Subroutines

subroutine, public meteo_forcings_wrapper (idomain, datapath, inputformat, dataout1, readper, ntstepforcingday, level1, level2, lower, upper, ncvarname, bound_error)
 Prepare meteorological forcings data for mHM at Level-1.
 
subroutine, public meteo_weights_wrapper (idomain, read_meteo_weights, datapath, dataout1, level1, level2, lower, upper, ncvarname)
 Prepare weights for meteorological forcings data for mHM at Level-1.
 
subroutine, public chunk_config (idomain, tt, ntstepday, simper, timestep, timestep_model_inputs, read_flag, readper)
 determines the start date, end date, and read_flag given Domain id and current timestep
 
logical function is_read (idomain, tt, ntstepday, simper, timestep, timestep_model_inputs)
 evaluate whether new chunk should be read at this timestep
 
subroutine chunk_size (idomain, tt, ntstepday, simper, timestep_model_inputs, readper)
 calculate beginning and end of read Period, i.e.
 

Detailed Description

Prepare meteorological forcings data for mHM.

Prepare meteorological forcings data for mHM.

Authors
Rohini Kumar
Date
Jan 2012

Function/Subroutine Documentation

◆ chunk_config()

subroutine, public mo_meteo_helper::chunk_config ( integer(i4), intent(in)  idomain,
integer(i4), intent(in)  tt,
integer(i4), intent(in)  ntstepday,
type(period), dimension(:), intent(in)  simper,
integer(i4), intent(in)  timestep,
integer(i4), dimension(:), intent(in)  timestep_model_inputs,
logical, intent(out)  read_flag,
type(period), intent(out)  readper 
)

determines the start date, end date, and read_flag given Domain id and current timestep

Changelog
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
  • Sebastian Müller Mar 2023
    • used by meteo-handler
    • now independent of global variables
Authors
Stephan Thober
Date
Jun 2014
Parameters
[in]idomaincurrent Domain
[in]ttcurrent timestep
[in]ntstepdayNumber of time intervals per day
[in]simperwarmPer + evalPer
[in]timestep[h] simulation time step (= TS) in [h]
[in]timestep_model_inputsfrequency for reading meteo input
[out]read_flagindicate whether reading data should be read

Definition at line 283 of file mo_meteo_helper.f90.

References chunk_size(), is_read(), and mo_common_constants::nodata_dp.

Referenced by mo_meteo_handler::prepare_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ chunk_size()

subroutine mo_meteo_helper::chunk_size ( integer(i4), intent(in)  idomain,
integer(i4), intent(in)  tt,
integer(i4), intent(in)  ntstepday,
type(period), dimension(:), intent(in)  simper,
integer(i4), dimension(:), intent(in)  timestep_model_inputs,
type(period), intent(out)  readper 
)
private

calculate beginning and end of read Period, i.e.

that is length of current chunk to read

Changelog
  • Stephan Thober Jan 2015
    • added iDomain
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
  • Sebastian Müller Mar 2023
    • used by meteo-handler
    • now independent of global variables
Authors
Stephan Thober
Date
Jun 2014
Parameters
[in]idomaincurrent Domain to process
[in]ttcurrent time step
[in]ntstepdayNumber of time intervals per day
[in]simperwarmPer + evalPer
[in]timestep_model_inputsfrequency for reading meteo input
[out]readperstart and end dates of read Period

Definition at line 431 of file mo_meteo_helper.f90.

Referenced by chunk_config().

Here is the caller graph for this function:

◆ is_read()

logical function mo_meteo_helper::is_read ( integer(i4), intent(in)  idomain,
integer(i4), intent(in)  tt,
integer(i4), intent(in)  ntstepday,
type(period), dimension(:), intent(in)  simper,
integer(i4), intent(in)  timestep,
integer(i4), dimension(:), intent(in)  timestep_model_inputs 
)
private

evaluate whether new chunk should be read at this timestep

Changelog
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
  • Sebastian Müller Mar 2023
    • used by meteo-handler
    • now independent of global variables
Authors
Stephan Thober
Date
Jun 2014
Parameters
[in]idomaincurrent Domain
[in]ttcurrent time step
[in]ntstepdayNumber of time intervals per day
[in]simperwarmPer + evalPer
[in]timestep[h] simulation time step (= TS) in [h]
[in]timestep_model_inputsfrequency for reading meteo input

Definition at line 339 of file mo_meteo_helper.f90.

References is_read().

Referenced by chunk_config(), and is_read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meteo_forcings_wrapper()

subroutine, public mo_meteo_helper::meteo_forcings_wrapper ( integer(i4), intent(in)  idomain,
character(len = *), intent(in)  datapath,
character(len = *), intent(in)  inputformat,
real(dp), dimension(:, :), intent(inout), allocatable  dataout1,
type(period), intent(in)  readper,
integer(i4), intent(inout)  ntstepforcingday,
type(grid), dimension(:), intent(in)  level1,
type(grid), dimension(:), intent(in)  level2,
real(dp), intent(in), optional  lower,
real(dp), intent(in), optional  upper,
character(len = *), intent(in), optional  ncvarname,
logical, intent(in), optional  bound_error 
)

Prepare meteorological forcings data for mHM at Level-1.

Prepare meteorological forcings data for mHM, which include 1) Reading meteo. datasets at their native resolution for every Domain 2) Perform aggregation or disaggregation of meteo. datasets from their native resolution (level-2) to the required hydrologic resolution (level-1) 3) Pad the above datasets of every Domain to their respective global ones

Changelog
  • Stephan Thober Jun 2014
    • changed to readPer
  • Stephan Thober Feb 2016
    • refactored deallocate statements
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
  • Sebastian Müller Mar 2023
    • used by meteo-handler
    • now independent of global variables
Authors
Rohini Kumar
Date
Jan 2013
Parameters
[in]idomainDomain Id
[in]datapathData path where a given meteo. variable is stored
[in]inputformatonly 'nc' possible at the moment
[in,out]dataout1Packed meterological variable for the whole simulation period
[in]readperstart and end dates of read period
[in,out]ntstepforcingdayNumber of forcing intervals per day
[in]level1grid information at hydrologic level
[in]level2Reference of the metereological variables
[in]lowerLower bound for check of validity of data values
[in]upperUpper bound for check of validity of data values
[in]ncvarnamename of the variable (for .nc files)
[in]bound_error.FALSE. to only warn about bound (lower, upper) violations, default = .TRUE. - raise an error

Definition at line 50 of file mo_meteo_helper.f90.

References mo_common_constants::nodata_dp, and mo_read_nc::read_nc().

Referenced by mo_meteo_handler::prepare_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meteo_weights_wrapper()

subroutine, public mo_meteo_helper::meteo_weights_wrapper ( integer(i4), intent(in)  idomain,
logical, intent(in)  read_meteo_weights,
character(len = *), intent(in)  datapath,
real(dp), dimension(:, :, :), intent(inout), allocatable  dataout1,
type(grid), dimension(:), intent(in)  level1,
type(grid), dimension(:), intent(in)  level2,
real(dp), intent(in), optional  lower,
real(dp), intent(in), optional  upper,
character(len = *), intent(in), optional  ncvarname 
)

Prepare weights for meteorological forcings data for mHM at Level-1.

Prepare meteorological weights data for mHM, which include 1) Reading meteo. weights datasets at their native resolution for every Domain 2) Perform aggregation or disaggregation of meteo. weights datasets from their native resolution (level-2) to the required hydrologic resolution (level-1) 3) Pad the above datasets of every Domain to their respective global ones

Changelog
  • Stephan Thober May 2017
    • updated documentation
  • Robert Schweppe Jun 2018
    • refactoring and reformatting
  • Oldrich Rakovec Aug 2018
    • adding message about reading meteo_weights
  • Sebastian Müller Mar 2023
    • used by meteo-handler
    • now independent of global variables
Authors
Stephan Thober & Rohini Kumar
Date
Jan 2017
Parameters
[in]idomainDomain Id
[in]read_meteo_weightsFlag for reading meteo weights
[in]datapathData path where a given meteo. variable is stored
[in,out]dataout1Packed meterological variable for the whole simulation period
[in]level1grid information at hydrologic level
[in]level2Reference of the metereological variables
[in]lowerLower bound for check of validity of data values
[in]upperUpper bound for check of validity of data values
[in]ncvarnamename of the variable (for .nc files)

Definition at line 175 of file mo_meteo_helper.f90.

References mo_common_constants::nodata_dp, and mo_read_nc::read_weights_nc().

Referenced by mo_meteo_handler::prepare_data().

Here is the call graph for this function:
Here is the caller graph for this function: