Skip to content
Snippets Groups Projects
Commit 25262fbb authored by Michael Langguth's avatar Michael Langguth
Browse files

Added final merging of created files and further documentation to get_era5_forecasts.sh.

parent d472006a
No related branches found
No related tags found
No related merge requests found
Pipeline #105858 failed
#!/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})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment