diff --git a/src/download_script.sh b/src/download_script.sh index 85205f9..434be96 100755 --- a/src/download_script.sh +++ b/src/download_script.sh @@ -1,8 +1,24 @@ #!/bin/bash -source /etc/profile +# run +# conda activate HodographMaps +# first! + +# change configuration here +R=0 # select run 0 or 12z +D=$(date +"%Y%m%d") # date in format YYYYMMDD +D=20240502 # date in format YYYYMMDD + +echo "Hodograph Maps" +echo "Script configurations:" +echo "Model run: " ${R} +echo "Date: " ${D} +echo "Today Date: " $(date) +echo "--------------------------------" -conda activate HodographMaps +####################################################################### +# load bash profile +source /etc/profile store_path=$(pwd)/modeldata @@ -10,8 +26,6 @@ store_path=$(pwd)/modeldata mkdir -p ${store_path} mkdir -p ./images -# select run -R=0 # Path of the icon nest on the opendata-sever icon_model_pfad=https://opendata.dwd.de/weather/nwp/icon-eu/grib/$(printf "%02d" "$R") @@ -20,13 +34,6 @@ ifs_model_pfad=https://data.ecmwf.int/forecasts #/20240406/00z/ifs/0p4-beta/oper # Path the gfs on the opendata-sever gfs_model_pfad=https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod -# date -D=$(date +"%Y%m%d") - -echo "Run: " ${R} -echo "Date: " $(date) -echo "--------------------------------" - ####################################################################### # name of the model files @@ -35,10 +42,10 @@ icon_pressure=icon-eu_europe_regular-lat-lon_pressure-level_${D}$(printf "%02d" - -for X in 3 #9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 +for fp in 3 #9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 do - T=$(printf "%03d" "$X") + echo "Start downloading fp" ${fp} + T=$(printf "%03d" "$fp") # single level for N in CAPE_ML CAPE_CON PS do @@ -60,26 +67,29 @@ do done # ifs - ifs_file=${ifs_model_pfad}/${D}/$(printf "%02d" "$R")z/ifs/0p25/oper/${D}$(printf "%02d" "$R")0000-${X}h-oper-fc.grib2 - ifs_index=${ifs_model_pfad}/${D}/$(printf "%02d" "$R")z/ifs/0p25/oper/${D}$(printf "%02d" "$R")0000-${X}h-oper-fc.grib2 + ifs_file=${ifs_model_pfad}/${D}/$(printf "%02d" "$R")z/ifs/0p25/oper/${D}$(printf "%02d" "$R")0000-${fp}h-oper-fc.grib2 + ifs_index=${ifs_model_pfad}/${D}/$(printf "%02d" "$R")z/ifs/0p25/oper/${D}$(printf "%02d" "$R")0000-${fp}h-oper-fc.index wget ${ifs_file} -P ${store_path}/ wget ${ifs_index} -P ${store_path}/ - mv ${store_path}/${D}$(printf "%02d" "$R")0000-${X}h-oper-fc.grib2 ${store_path}/ifs_$(printf "%02d" "$R")z_${D}_f${T}.grib2 - mv ${store_path}/${D}$(printf "%02d" "$R")0000-${X}h-oper-fc.index ${store_path}/ifs_$(printf "%02d" "$R")z_${D}_f${T}.index + mv ${store_path}/${D}$(printf "%02d" "$R")0000-${fp}h-oper-fc.grib2 ${store_path}/ifs_$(printf "%02d" "$R")z_${D}_f${T}.grib2 + mv ${store_path}/${D}$(printf "%02d" "$R")0000-${fp}h-oper-fc.index ${store_path}/ifs_$(printf "%02d" "$R")z_${D}_f${T}.index # gfs gfs_file=${gfs_model_pfad}/gfs.${D}/$(printf "%02d" "$R")/atmos/gfs.t$(printf "%02d" "$R")z.pgrb2.0p25.f${T} wget ${gfs_file} -P ${store_path}/ - mv ${store_path}/gfs.t$(printf "%02d" "$R")z.goessimpgrb2.0p25.f${T} ${store_path}/gfs_$(printf "%02d" "$R")z_${D}_f${T}.grib2 - - # write run.yml + mv ${store_path}/gfs.t$(printf "%02d" "$R")z.pgrb2.0p25.f${T} ${store_path}/gfs_$(printf "%02d" "$R")z_${D}_f${T}.grib2 + # Plot Hodograph + # write run.yml configuration echo run: ${R} > run.yml - echo fp: ${X} >> run.yml + echo fp: ${fp} >> run.yml echo default_date: \"$(date +%Y-%m-%d)\" >> run.yml - # runt python script - python3 main.py Basic - # python3 main.py Basic --fp ${X} --run ${R} --date $(date +%Y-%m-%d) + echo "Plot Hodograph Maps" + # run python script + + python3 main.py IFS + python3 main.py GFS + python3 main.py ICON echo "done with leadtime ${T}h on $(date)" done diff --git a/src/run.yml b/src/run.yml index 2039963..623f50c 100644 --- a/src/run.yml +++ b/src/run.yml @@ -1,3 +1,3 @@ run: 0 -fp: 15 -default_date: "2024-04-22" +fp: 3 +default_date: "2024-05-02"