Regrid updates and output fixes #447
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist:
What kind of change does this PR introduce?:
regrid.ipynb
psymaps
/psyplot
dependencyutils/common.py
:require_module
to accept an interval of unsupported versionsutils/dataset_utils.py
:get_coord_by_type
to suppress warning about a main variable not being identifiableutils/output_utils.py
:fix_netcdf_attrs_encoding
and '_fix_str_encoding
to fix utf-8 encoding issues for global and variable attributesops/base_operation.py
:core/regrid.py
:xarray
version warning correctly triggered for versions outside of compatible version intervalGrid.detect_extent
:(lon_extent, lat_extent)
instead of justlon_extent
Grid._grid_from_ds_adaptive
:Grid.to_netcdf
:ds.encoding['unlimited_dims']
not being updated byxarray
when dropping all time-dependent variables to write out solely the horizontal gridGrid.extent_lat, Grid.extent_lon
: added new attributesWeights
:post_mask_source='domain_edge'
setting when remapping a regional grid via nearest neighbour method, to avoid extrapolation beyond the original source domain (xESMF PR yet to be approved and merged)engine="h5netcdf"
Does this PR introduce a breaking change?:
clisops.core.regrid.Grid.detect_extent
now returns the tuple(lon_extent, lat_extent)
rather than justlon_extent
Grid.extent
now carries the combined extent in lon and lat direction and no longer just the extent in lon direction. If the grid is consideredglobal
in extent of both, lon and lat coordinates,Grid.extent
is set to"global"
else, it is set to"regional"
.Grid.extent_lon
andGrid.extent_lat
allow accessing the extent in only lon and lat direction, respectively.Other information:
I can update
HISTORY.rst
once all changes made by the PR are approved and potential feedback worked in.There are currently two
xesmf
PRs open (#444 #445) that should be merged and axesmf
release triggered before merging this in.