-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Improvements for xarray provider #1800
Conversation
@barbuz are you able to rebase this PR? I'd rather cover the format handling as part of another issue/discussion. Are you able to reduce this PR to the pure Xarray fixes? |
0b09281
to
641a464
Compare
I have rebased this reverting the changes to the format handling. I have opened a separate issue to discuss format handling for coverage providers in general: #1821 |
* Manage non-cf-compliant time dimension * Manage datasets without a time dimension * Allow reversed slices also for axes * Convert also metadata to float64 for json output * Use named temporary file to enable netcdf4 engine * Make float64 conversion faster * Add netcdf output to xarray provider * Flake8 fixes * Fix bug when no time axis in data * Use new xarray interface * Add test for zarr dataset without time dimension * Avoid errors if missing long_name * Manage zarr and netcdf output in the same way * Revert "Manage zarr and netcdf output in the same way" This reverts commit 0b09281. * Revert "Add netcdf output to xarray provider" This reverts commit 9f72bf7.
Overview
Using the xarray provider to manage Zarr data extensively, I have noticed and fixed a few bugs and added a couple of features that could be useful, so I would like to contribute these changes.
Additional information
Summary of changes:
decode_times=False
This last change is the trickiest. I had to patch the APIRequest class to advertise the capability of producing more than one kind of output format for coverage data. At the moment I have hardcoded the two formats supported by the xarray provider, but eventually it would be nice to allow each provider to advertise an arbitrary list of output formats; I'm proposing this change as an initial implementation and a future PR could be able to expand on it and make this available to all providers. Please let me know what you think about this.
Dependency policy (RFC2)
Updates to public demo
Contributions and licensing
(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)