Skip to content
Draft
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ dynamic = [ "version" ]
dependencies = [
"anemoi-utils>=0.5.1",
"cfunits",
"earthkit-data>=0.12.4,<1",
"earthkit-geo>=0.3",
"earthkit-meteo>=0.4.1",
"earthkit-regrid>=0.4",
"earthkit-data==1.0.0rc12",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update

"earthkit-geo==1.0.0rc8",
"earthkit-meteo==1.0.0rc3",
"healpy",
"pandas<3",
]
Expand Down
4 changes: 2 additions & 2 deletions src/anemoi/transform/commands/get-grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def run(self, args: argparse.Namespace) -> None:
else:
input = args.input

ds = from_source(args.source, input)
lat, lon = ds[0].grid_points()
ds = from_source(args.source, input).to_fieldlist()
lat, lon = ds[0].geography.latlons()
np.savez(args.output, latitudes=lat, longitudes=lon)


Expand Down
6 changes: 3 additions & 3 deletions src/anemoi/transform/commands/make-regrid-file.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def _ds_to_lat_lon(path: str) -> tuple[np.ndarray, np.ndarray]:
import earthkit.data as ekd

try:
ds = ekd.from_source("file", path)
return ds[0].grid_points()
ds = ekd.from_source("file", path).to_fieldlist()
return ds[0].geography.latlons()
except TypeError:
# This is a workaround for datasets that do not have data variables,
# but have "latitude" and "longitude" coordinates.
Expand Down Expand Up @@ -143,7 +143,7 @@ def run(self, args: argparse.Namespace) -> None:
def make_mir_matrix(lat1, lon1, lat2, lon2, output=None, mir="mir", **mir_kwargs):

import numpy as np
from earthkit.regrid.utils.mir import mir_make_matrix
from earthkit.geo.utils.mir import mir_make_matrix

sparse_array = mir_make_matrix(lat1, lon1, lat2, lon2, output=None, mir=mir, **mir_kwargs)

Expand Down
Loading
Loading