Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mammatus95 committed May 19, 2024
1 parent 92c36e0 commit b010db0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions run_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
17 changes: 11 additions & 6 deletions src/down_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand All @@ -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

2 changes: 1 addition & 1 deletion src/modelinfolib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/plotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
# ---------------------------------------------------------------------------------------------------------------------

Expand Down
Binary file modified test/.coverage
Binary file not shown.

0 comments on commit b010db0

Please sign in to comment.