From 38c0adc1680833c2aef32ee735c629dd4d8fb6ba Mon Sep 17 00:00:00 2001 From: Sandor Kertesz Date: Mon, 3 Jun 2024 15:36:46 +0100 Subject: [PATCH] Fix earthkit.geo import --- src/anemoi/datasets/create/functions/filters/rotate_winds.py | 4 ++-- .../datasets/create/functions/filters/unrotate_winds.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/anemoi/datasets/create/functions/filters/rotate_winds.py b/src/anemoi/datasets/create/functions/filters/rotate_winds.py index e6795d2e..33bfca0e 100644 --- a/src/anemoi/datasets/create/functions/filters/rotate_winds.py +++ b/src/anemoi/datasets/create/functions/filters/rotate_winds.py @@ -10,7 +10,7 @@ from collections import defaultdict from earthkit.data.indexing.fieldlist import FieldArray -from earthkit.geo.rotate import rotate_wind +from earthkit.geo.rotate import rotate_vector class NewDataField: @@ -65,7 +65,7 @@ def execute( assert x.grid_mapping == y.grid_mapping lats, lons = x.grid_points() - x_new, y_new = rotate_wind( + x_new, y_new = rotate_vector( lats, lons, x.to_numpy(flatten=True), diff --git a/src/anemoi/datasets/create/functions/filters/unrotate_winds.py b/src/anemoi/datasets/create/functions/filters/unrotate_winds.py index 218f4919..1b8ff340 100644 --- a/src/anemoi/datasets/create/functions/filters/unrotate_winds.py +++ b/src/anemoi/datasets/create/functions/filters/unrotate_winds.py @@ -11,7 +11,7 @@ # import numpy as np from earthkit.data.indexing.fieldlist import FieldArray -from earthkit.geo.rotate import unrotate_wind +from earthkit.geo.rotate import unrotate_vector class NewDataField: @@ -60,7 +60,7 @@ def execute(context, input, u, v): assert x.rotation == y.rotation - u_new, v_new = unrotate_wind( + u_new, v_new = unrotate_vector( lats, lons, x.to_numpy(flatten=True),