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.
These are some changes I have made to COAsT whilst writing the profile validation script.
Changes:
Changes to PROFILE() data structure, variable naming and reading. read_EN4 multiple read method has been modified because there was a problem concatenating automatically (there is no monotonically increasing dimension in EN4 files apparently). It now reads in a list of files one at a time and concatenates using concat. It requires the file naming formats to be the same as the EN4 format (so assuming the user hasn't renamed the EN4 files). This is to order then correctly in time.
New MASK_MAKER object, which contains a couple of routines to help with defining model masks. I've used this to define the area masks for analysis. It has routines for drawing polygons onto an array (using skimage) either by index or by longitude/latitude.
crps_util updated with things for apply_crps that were never merged.
general_utils updated with things from apply_crps. Also a generalisation of some routines that pop up in a few places. Significantly sped up nearest_indices_2D() when using a landmask (was very slow previously -- BallTree doesn't seem to like NaNs).
Changes to COAsT.load() for multiple files. I was having big problems loading multiple files using xarray.open_mfdataset (see linked issue). I have slightly changed the call to open_mfdataset to make this a lot faster based on internet advice.
Unit testing updated to reflect changes.