diff --git a/Jupyter_Notebooks/get_era5_forecasts.sh b/Jupyter_Notebooks/get_era5_forecasts.sh index 57ec979d003132aeadac9316ff2e9992f658ffd9..2b275d2e62268136ac9055b8f8f4948508a479db 100755 --- a/Jupyter_Notebooks/get_era5_forecasts.sh +++ b/Jupyter_Notebooks/get_era5_forecasts.sh @@ -1,9 +1,28 @@ #!/usr/bin/env bash -# This bash-script reads the 2m temperature from ERA5 short-range forecasts files, crops the data to the largest target domain (see Dataset ID 1-3) and then performs a merging step with the ground truth and the persistence forecast data provided by from the postprocessing of a trained model (see prostprocess-step of workflow.) +# ********************************************* doc-string ********************************************* +# This bash-script reads the 2m temperature from ERA5 short-range forecasts files, +# crops the data to the largest target domain (see Dataset ID 1-3) and then performs a merging step +# with the ground truth and the persistence forecast data provided by from the postprocessing +# of a trained model (see prostprocess-step of workflow). +# More details on the ERA 5 short-range forecasts is documented under the following link: +# https://confluence.ecmwf.int/pages/viewpage.action?pageId=85402030 +# The forecast-files here must contain the 2m temperature (2t) and should be organized as follows: +# --- indir +# | |--- [<YYYY>] +# | | |--- [>MM>] +# | | | |--- fc_06 +# | | | | | [<YYYYMMDDHH>_{06..12}_sf_fc.grb +# | | | |--- fc_18 +# | | | | | [<YYYYMMDDHH>_{06..12}_sf_fc.grb +# +# Thus, data must be available in grib-files for each forecast hour (between lead time 06 and 12 hours) in +# yearly and monthly subdirectories. Furthermore, separate subdirectories exist for the short-range forecasts +# initialized at 06 and 18 UTC. +# ********************************************* doc-string ********************************************* # Parse script argument -yr=$1 +yr=$1 # year for which data is available (2019 in the manuscript) # some directory parameters indir=<path_to_era5_short_range_forecasts>/${yr} # directory where the ERA5-short range forecasts are located @@ -18,7 +37,7 @@ fi hh_s=6 # start of lead time range in hours hh_e=12 # end of lead time range in hours -declare -a hh_list=(18) # initialization hour of ERA5 forecasts to evaluate (either 6 or 18) +declare -a hh_list=(6 18) # initialization hour of ERA5 forecasts to evaluate (either 6 or 18) for hh in ${hh_list[@]}; do hh0=$(printf "%02d" ${hh})