-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add function to store (grid) data as NetCDF #905
Comments
This would be useful feature indeed. My suggestion would be to write method to convert data (exceedance, hazard, impact, or whatever object is applies to) to and from xarray (with fixed conventions for each class) and let xarray deal with the reading/writing of the file. More specifically: I suggest there are methods |
@bguillod Thanks for the input. Indeed, To consolidate any efforts already undertaken: Do you, by any chance, already have a code available that brings any Climada data structure into an xarray structure? |
I'm also very much in favour of an |
That would be very much welcome! One thing to keep in mind overall is that xarray and netcdf do not really support sparse data. CLIMADA's success however relies on the use of sparse data structures for hazard events, impacts and exposures. If this can be somehow brought together, that would be very useful. |
@DahyannAraya Please upload the functions you wrote for writing Impact to NetCDF here, as we just discussed personally 🙏 @chahank The feature request focuses on writing NetCDF data, not necessarily transforming Climada data structures into equivalent @hsteptoe Thanks a lot for volunteering! 😊 Let's clarify the exact feature request first, and then draft an implementation plan. |
Early versions of #898 #857 provided functions to store the exceedance map data as NetCDF files. We decided to remove this feature from the PR(s).
@DahyannAraya has also been working on NetCDF output of Impacts. It might be worthwhile to consolidate these efforts.
Minimal Viable Feature
Provide a function that "rasterizes" a GeoDataFrame into an xarray DataArray or Dataset, and writes its data into a NetCDF file. Throw an error if the data cannot be rasterized (apparently is not gridded).
The text was updated successfully, but these errors were encountered: