diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2023-08-24 17:22:32 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2023-08-24 17:22:32 +0200 |
commit | b85a2929e76ddc39f83ac0403f8356e05b71d129 (patch) | |
tree | 17a8e630d55d1d95bd6f071b07851665349e8586 /icon_download.sh | |
parent | 60ab2d134df00f8099add774e698b2d7d2395bdc (diff) | |
download | meteo_toolbox-b85a2929e76ddc39f83ac0403f8356e05b71d129.tar.gz |
stuff
Diffstat (limited to 'icon_download.sh')
-rwxr-xr-x | icon_download.sh | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/icon_download.sh b/icon_download.sh index cf00cca..343b10c 100755 --- a/icon_download.sh +++ b/icon_download.sh @@ -9,9 +9,10 @@ MODEL=icon-d2 MODEL_LONG=icon-d2_germany BASE="http://opendata.dwd.de/weather/nwp" -RUN="15" +RUN="00" PARAMETERS=( "t" "relhum" "u" "v" "fi" ) -PARAMETERS_SINGLE_LEVEL=( "cape_ml" "cin_ml" "tot_prec" "w_ctmax" ) +# tot_prec and cape_ml/cin_ml is in 15min intervals and screws with xygrib +PARAMETERS_SINGLE_LEVEL=( "w_ctmax" ) PRESSURE_LEVELS=( "1000" "975" "950" "850" "700" "600" "500" "400" "300" "250" "200" ) OFFSETS=( "000" "003" "006" "009" "012" "015" "018" "024" ) DATE=$(date +%Y%m%d) @@ -20,24 +21,24 @@ mkdir -p $OUTDIR echo -n > "$OUTDIR/index.txt" -for OFFSET in ${OFFSETS[@]}; do - for PARAMETER in ${PARAMETERS[@]}; do - for LEVEL in ${PRESSURE_LEVELS[@]}; do +for OFFSET in "${OFFSETS[@]}"; do + for PARAMETER in "${PARAMETERS[@]}"; do + for LEVEL in "${PRESSURE_LEVELS[@]}"; do URL="$BASE/$MODEL/grib/$RUN/$PARAMETER/${MODEL_LONG}_regular-lat-lon_pressure-level_${DATE}${RUN}_${OFFSET}_${LEVEL}_${PARAMETER}.grib2.bz2" BNAME=$(basename "$URL") echo Getting "$URL" echo "${BNAME%.bz2}" >> $OUTDIR/index.txt - wget -q --directory-prefix=$OUTDIR "$URL" + wget -q --directory-prefix=$OUTDIR "$URL" || echo FAILED! done done - for PARAMETER in ${PARAMETERS_SINGLE_LEVEL[@]}; do + for PARAMETER in "${PARAMETERS_SINGLE_LEVEL[@]}"; do URL="$BASE/$MODEL/grib/$RUN/$PARAMETER/${MODEL_LONG}_regular-lat-lon_single-level_${DATE}${RUN}_${OFFSET}_2d_${PARAMETER}.grib2.bz2" BNAME=$(basename "$URL") echo Getting "$URL" echo "${BNAME%.bz2}" >> $OUTDIR/index.txt - wget -q --directory-prefix=$OUTDIR "$URL" + wget -q --directory-prefix=$OUTDIR "$URL" || echo FAILED! done done |