From b010db0a07f3404f00c6709b7d43f1bdeac194cb Mon Sep 17 00:00:00 2001 From: mammatus95 Date: Sun, 19 May 2024 21:47:03 +0200 Subject: [PATCH] small changes --- run_script.sh | 1 + src/down_script.sh | 17 +++++++++++------ src/modelinfolib.py | 2 +- src/plotlib.py | 2 +- test/.coverage | Bin 53248 -> 53248 bytes 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/run_script.sh b/run_script.sh index 87ee999..db5de7d 100755 --- a/run_script.sh +++ b/run_script.sh @@ -114,5 +114,6 @@ python3 main.py ICON >> log.txt 2>&1 echo "done with leadtime ${T}h on $(date)" ls -lh ./images/*${FP}.png +rm run.yml # remove nwp files rm -r ${store_path} diff --git a/src/down_script.sh b/src/down_script.sh index 5598063..ad2a95f 100755 --- a/src/down_script.sh +++ b/src/down_script.sh @@ -41,9 +41,9 @@ icon_pressure=icon-eu_europe_regular-lat-lon_pressure-level_${D}$(printf "%02d" -for fp in 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 +for FP in 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 do - T=$(printf "%03d" "$fp") + T=$(printf "%03d" "$FP") echo "Start downloading leadtime ${T}h" # ICON # single level @@ -67,12 +67,12 @@ do done # ifs - 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 + 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}/ >> log.txt 2>&1 wget ${ifs_index} -P ${store_path}/ >> log.txt 2>&1 - 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 + 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} @@ -81,5 +81,10 @@ do echo "download done with leadtime ${T}h on $(date)" ls ./modeldata/*${T}.grib2 + + # write run.yml configuration + echo run: ${R} > run.yml + echo fp: ${FP} >> run.yml + echo default_date: \"$(date +%Y-%m-%d)\" >> run.yml done diff --git a/src/modelinfolib.py b/src/modelinfolib.py index d015c2c..f0d4039 100644 --- a/src/modelinfolib.py +++ b/src/modelinfolib.py @@ -2,7 +2,7 @@ from datetime import datetime, date import pygrib import numpy as np -import utilitylib as ut +import src.utilitylib as ut """ # ICON Nest diff --git a/src/plotlib.py b/src/plotlib.py index 6224fb6..a7cf4b3 100644 --- a/src/plotlib.py +++ b/src/plotlib.py @@ -113,7 +113,7 @@ def two_plots(projection=crs.EuroPP(), lon1=3.56, lon2=16.5, lat1=46.2, lat2=55. clevs = np.array([50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) # cmap = LinearSegmentedColormap.from_list("", ["green", "yellow", "orange", "red", "darkred", "darkmagenta"]) -cmap = LinearSegmentedColormap.from_list("", ["yellowgreen", "tan", "orange", "red"]) +cmap = LinearSegmentedColormap.from_list("", ["yellowgreen", "gold", "orange", "red"]) cmap = ListedColormap(cmap(np.linspace(0, 1, 256))[4:240]) # --------------------------------------------------------------------------------------------------------------------- diff --git a/test/.coverage b/test/.coverage index 3fb8416641fcd0f7c996a91944386776a45fbb9b..ea9128ac2ccc7ef6bd22a346c5b839b4f77ed0b3 100644 GIT binary patch delta 36 scmZozz}&Eac>`Mm%V!4u&zl7WUh?yDGqP}UO6h#xmwS7g@1h9~0O^|zDF6Tf delta 30 mcmZozz}&Eac>`Mm%TEUWpPL02yys_UWn|&x