-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work around xarray bug; only add coordinates if not already present
An xarray bug (pydata/xarray#2180 (comment), pydata/xarray#4393, pydata/xarray#4415) can deletes attributes of coordinates when a new DataArray is assigned to a Dataset. This commit adds workarounds for that bug in several places. Also adds checks for if 'ycoord' and 'zcoord' already exist in apply_geometry() before creating them. Helps with re-applying apply_geometry() to existing or re-loaded Datasets.
- Loading branch information
1 parent
93b37a7
commit 451eda4
Showing
1 changed file
with
50 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters