Skip to content

Commit

Permalink
fix earthkit error in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mathleur committed Nov 22, 2024
1 parent c253d0f commit d6eb20b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ polytope_venv_latest
new_updated_numpy_venv
newest-polytope-venv
serializedTree
new_polytope_venv
3 changes: 1 addition & 2 deletions tests/test_datacube_axes_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ def setup_method(self, method):
download_test_data(nexus_url, "foo.grib")

ds = data.from_source("file", "./tests/data/foo.grib")
# latlon_array = ds.to_xarray().isel(step=0).isel(number=0).isel(surface=0).isel(time=0)
latlon_array = ds.to_xarray()
latlon_array = ds.to_xarray(engine="cfgrib").isel(step=0).isel(number=0).isel(surface=0).isel(time=0)
latlon_array = latlon_array.t2m
self.options = {
"axis_config": [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_healpix_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def setup_method(self, method):
download_test_data(nexus_url, "healpix.grib")

ds = data.from_source("file", "./tests/data/healpix.grib")
self.latlon_array = ds.to_xarray().isel(step=0).isel(time=0).isel(isobaricInhPa=0).z
self.latlon_array = ds.to_xarray(engine="cfgrib").isel(step=0).isel(time=0).isel(isobaricInhPa=0).z
self.options = {
"axis_config": [
{
Expand Down
2 changes: 1 addition & 1 deletion tests/test_merge_octahedral_one_axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setup_method(self, method):
download_test_data(nexus_url, "foo.grib")

ds = data.from_source("file", "./tests/data/foo.grib")
self.latlon_array = ds.to_xarray().isel(step=0).isel(number=0).isel(surface=0).isel(time=0)
self.latlon_array = ds.to_xarray(engine="cfgrib").isel(step=0).isel(number=0).isel(surface=0).isel(time=0)
self.latlon_array = self.latlon_array.t2m
self.options = {
"axis_config": [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_octahedral_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setup_method(self, method):
download_test_data(nexus_url, "foo.grib")

ds = data.from_source("file", "./tests/data/foo.grib")
self.latlon_array = ds.to_xarray().isel(step=0).isel(number=0).isel(surface=0).isel(time=0)
self.latlon_array = ds.to_xarray(engine="cfgrib").isel(step=0).isel(number=0).isel(surface=0).isel(time=0)
self.latlon_array = self.latlon_array.t2m
self.options = {
"axis_config": [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_slicer_era5.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def setup_method(self, method):
download_test_data(nexus_url, "era5-levels-members.grib")

ds = data.from_source("file", "./tests/data/era5-levels-members.grib")
array = ds.to_xarray().isel(step=0).t
array = ds.to_xarray(engine="cfgrib").isel(step=0).t
self.slicer = HullSlicer()
options = {
"axis_config": [{"axis_name": "latitude", "transformations": [{"name": "reverse", "is_reverse": True}]}],
Expand Down
2 changes: 1 addition & 1 deletion tests/test_snapping_real_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def setup_method(self, method):
download_test_data(nexus_url, "era5-levels-members.grib")

ds = data.from_source("file", "./tests/data/era5-levels-members.grib")
array = ds.to_xarray().isel(step=0).t
array = ds.to_xarray(engine="cfgrib").isel(step=0).t
self.slicer = HullSlicer()
options = {
"axis_config": [
Expand Down

0 comments on commit d6eb20b

Please sign in to comment.