Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change of dtype due to xarray update #276

Closed
observingClouds opened this issue Apr 6, 2024 · 0 comments · Fixed by #277
Closed

Change of dtype due to xarray update #276

observingClouds opened this issue Apr 6, 2024 · 0 comments · Fixed by #277
Assignees
Labels
infrastructure what's needed to sustain the package

Comments

@observingClouds
Copy link
Owner

The recent release of xarray (v2024.03.0) implemented a more CF conform interpretation of the scale_factor and offset parameters (pydata/xarray#2304). Now the dtype of scale_factor and offset influence the returned dtype.

Some of the tests are impacted by this, in particular those that rely on the air_temperature xarray tutorial dataset:

short air(time=2920, lat=25, lon=53);
  :long_name = "4xDaily Air temperature at sigma level 995";
  :units = "degK";
...
  :actual_range = 185.16f, 322.1f; // float
  :scale_factor = 0.01; // double

Because the scale_factor is double, the returned value is now float64, while previously has been float32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure what's needed to sustain the package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant