NWPconf
Version1.0
|
Module with functions for managing the reference time of NWP runs. More...
Functions | |
nwptime_init () | |
Initialise the time-related environment for a NWP run. More... | |
nwpbctimeloop_init () | |
Initialise a loop on the model runs providing input boundary conditions for a NWP run. More... | |
nwpbctimeloop_loop () | |
Advance a loop on the model runs providing input boundary conditions for a NWP run. More... | |
Module with functions for managing the reference time of NWP runs.
This module provides functions for performing various types of computations related to the reference and forecast time of a NWP model run and of the driving model data. Assimilation and forecast modes are supported, as well analysed and forecast boundary conditions with a desired reference time shift. The terms input model and driving model are used interchangeably hereafter.
The following environmental variables should be set in order to describe the model reference timing:
$DATE
(YYYYMMDD) and $TIME
(hhmm) indicate the current nominal date and time, i.e. the start of the run for a forecast run or the end of the run for an assimilation run$MODEL_STOP
indicates the total absolute duration of the run in hours$MODEL_BACK
indicates the number of hours to go back from $DATE$TIME
for starting an assimilation or warm-up run, typical values are 0 for a forecast run and $MODEL_BACK
for assimilation or warm-up, intermediate values between 0 and $MODEL_BACK
may give unexpected results$MODEL_BCANA
if set to Y
indicates that analysis data are used as boundary conditions$MODEL_DELTABD
indicates the difference in hours between $DATE$TIME
and the initialisation time of last available input model forecast, it is ignored if $MODEL_BCANA == Y
$PARENTMODEL_FREQANA
indicates the interval in hours between available analysis data from the driving model, used in the case of $MODEL_BCANA == Y
, it is assumed that analyses are produced at 00 UTC and successively every $PARENTMODEL_FREQANA
hours$PARENTMODEL_FREQINI
indicates the interval in hours between initialisation of successive driving model forecasts, used in the case of $MODEL_BCANA != Y
, it is assumed that forecasts are initialised at 00 UTC and successively every $PARENTMODEL_FREQINI
hours$PARENTMODEL_FREQFC
indicates the interval in hours between successive driving model forecast steps of a single forecast run, used in the case of $MODEL_BCANA != Y
It is an optional module and it has to be sourced after the main nwpconf.sh module.
nwptime_init | ( | ) |
Initialise the time-related environment for a NWP run.
This function is implicitly called when the module is sourced, it sets the following variables:
$DATES
and $TIMES
absolute date and time of start of model run, either assimilation or forecast, based on $DATE
, $TIME
and $MODEL_BACK
$DATEE
and $TIMEE
absolute date and time of end of model run, either assimilation or forecast, based on $DATE
, $TIME
, $MODEL_BACK
and $MODEL_STOP
$PARENTMODEL_FREQ
interval in h between available boundary conditions regardless of them being analysis or forecast nwpbctimeloop_init | ( | ) |
Initialise a loop on the model runs providing input boundary conditions for a NWP run.
This function has to be called for initialising a loop over the input model runs (called "slices") that provide the boundary conditions to an assimilation run. The most common cases are taken into account, like using analysed or forecast BC's, possibly with a shift in time and with specified frequency of availability. For the correct use see nwpbctimeloop_loop().
nwpbctimeloop_loop | ( | ) |
Advance a loop on the model runs providing input boundary conditions for a NWP run.
This function has to be called for advancing a loop over the model runs (called "slices") that provide the boundary conditions to an assimilation or forecast run. The function sets the variables:
$DATES_SLICE
and $TIMES_SLICE
date and time of start of current slice of input model providing BCs$MODEL_START_SLICE
and $MODEL_STOP_SLICE
indicate the first and the last instants, in h starting from $DATES
and $TIMES
, for which BCs are taken from current slice$MODEL_FREQ_SLICE
interval in h between available instants (boundary conditions) for current slice (actually equal for every slice and equal to $PARENTMODEL_FREQ
)$MODEL_DELTABD_SLICE
difference in h between start of assimilation and start of current slice of input model providing BCs$MODEL_INI_SLICE
whether current slice of input model may provide also initial data (.TRUE.
) or only boundary data (.FALSE.
).The return value is 1 (true) if the loop is not terminated, or 0 (false) if the loop is terminated, thus it should be used in the following way:
nwpbctimeloop_init while nwpbctimeloop_loop; do performoperationsintheloop done