aboutsummaryrefslogtreecommitdiff
path: root/grib.py
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-08-24 17:22:32 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-08-24 17:22:32 +0200
commitb85a2929e76ddc39f83ac0403f8356e05b71d129 (patch)
tree17a8e630d55d1d95bd6f071b07851665349e8586 /grib.py
parent60ab2d134df00f8099add774e698b2d7d2395bdc (diff)
downloadmeteo_toolbox-b85a2929e76ddc39f83ac0403f8356e05b71d129.tar.gz
stuff
Diffstat (limited to 'grib.py')
-rwxr-xr-xgrib.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/grib.py b/grib.py
index c298450..767f3d7 100755
--- a/grib.py
+++ b/grib.py
@@ -16,15 +16,34 @@ target_lon='10.0646952'
grib = pygrib.open('dwd_icon-d2/combined.grib2')
+# GRIB-Objekt wichtige attribute:
+# analDate
+# validDate
+# units
+# level
+# typeOfLevel
+# name
+# shortName
for grb in grib:
- print(grb)
+ #print(grb)
vals = grb.values
lats, lons = grb.latlons()
+ for k in grb.keys():
+ print(k)
+
+ print(grb.analDate)
+ print(grb.validDate)
+ print(grb.units)
+ print(grb.typeOfLevel)
+ break
+
+ # TODO Data in xarray?
+
print(grb.name)
- #print(grb.level)
+ print(grb.level)
#print('lats min/max: ', lats.shape, lats.max(), lats.min())
#print('lons min/max: ', lons.shape, lons.max(), lons.min())