aboutsummaryrefslogtreecommitdiff
path: root/vertical_from_grib.py
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-09-11 22:06:09 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-09-11 22:06:09 +0200
commit76a9a93d72ad3ff21854f532d64aca42c72c1ebf (patch)
treeaa928009aebd154eb59001ea73fa47524efd9c11 /vertical_from_grib.py
parentba5ad1cb135cee769e92dd9b125e232db6ca6fb7 (diff)
downloadmeteo_toolbox-76a9a93d72ad3ff21854f532d64aca42c72c1ebf.tar.gz
confi reader
Diffstat (limited to 'vertical_from_grib.py')
-rwxr-xr-xvertical_from_grib.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/vertical_from_grib.py b/vertical_from_grib.py
index e5d6593..9251410 100755
--- a/vertical_from_grib.py
+++ b/vertical_from_grib.py
@@ -12,7 +12,7 @@ import skewt
import misc
config = {
- 'source':'dwd_icon-d2/combined.grib2',
+ 'source':'dwd_icon-eu/combined.grib2',
'plots':[
{
'lat':47.9626,
@@ -23,10 +23,10 @@ config = {
]
}
-def run(config):
- data = xr.load_dataset(config['source'], engine='cfgrib')
+def run(source, plots):
+ data = xr.load_dataset(source, engine='cfgrib')
- for plot in config['plots']:
+ for plot in plots:
_plot(data, **plot)
def _plot(data, lat, lon, name, analysis=None):
@@ -68,4 +68,4 @@ def _plot(data, lat, lon, name, analysis=None):
skt.plot(filename=f'skewt_{name}_{init_for_filename}+{hours_since_init_str}.png')
if __name__ == '__main__':
- run(config)
+ run(**config)