From fdd42d69e89f104ebfd842de4a1060a5e643f097 Mon Sep 17 00:00:00 2001 From: Baudouin Raoult Date: Sun, 22 Sep 2024 07:35:45 +0000 Subject: [PATCH] Change climetlab to earthkit --- .gitignore | 5 +++++ utils/pangu-gfs-input.py | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 68bc17f..7d373a9 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,8 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ + + +*.onnx +*.grib +*.out diff --git a/utils/pangu-gfs-input.py b/utils/pangu-gfs-input.py index 652a3a6..7db5345 100755 --- a/utils/pangu-gfs-input.py +++ b/utils/pangu-gfs-input.py @@ -11,7 +11,7 @@ import sys -import climetlab as cml +import earthkit.data as ekd import tqdm date = sys.argv[1] @@ -24,7 +24,7 @@ time = int(time) time = f"{time:02d}" -gfs = cml.load_source( +gfs = ekd.from_source( "url-pattern", "https://data.rda.ucar.edu/ds084.1/{year}/{date}/" "gfs.0p25.{date}{time}.f{step}.grib2", @@ -62,7 +62,7 @@ ).order_by(param=param_sfc) print("Write", output) -out = cml.new_grib_output(output) +out = ekd.new_grib_output(output) G = {"gh": 9.80665} PARAM = {"gh": "z", "prmsl": "msl"}