Comments (5)
@agstephens Interesting. You mean how best to implement subset along a z/elevation axis? I think it would make the most sense there as well. I don't imagine it would be too difficult to implement.
from clisops.
@Zeitsperre: yes, we are talking about the "z" axis. Let's discuss when we meet how to set this up in clisops.core.subset.
I am hoping that the Xarray/Dask lazy evaluation means that we can chain a subset_level
function with the other existing functions rather than modifying what already works.
from clisops.
I think that we should consider this in the same way subset_time
is addressed within the subset_bbox
function:
clisops/clisops/core/subset.py
Line 650 in 999a34f
subset_bbox
has the optional arguments start_date
and end_date
, at the end of the function there is optionally a call to subset_time
.
We could imagine that the 'z' axis could be handled in the same way, by adding (and integrating) the following:
def subset_level(ds, start_level, end_level)
This would need to:
- check available levels overlap with the level range provided
- reverse the start_level and end_level if they are ordered differently to the values in the level axis - this is reasonable because the user may not know how the file is structured
- select the data within the level range provided
from clisops.
I realize that the number of existing decorators is getting a bit unwieldy but given that checks exist for X and Y dims, the best option I would suggest for the start_level
and end_level
checks would be to write a check_levels
decorator (or expand the check_lons
as I mentioned in #65) to be able to add this easily to other subsetting functions.
If a function is written to perform the Z-axis subsetting, it can be added to all other subsetting functions, as needed. In-depth level check could be added to either function or the decorator, I imagine.
With all these different functions, it would be interesting to consider alternative means of calling these functions down-the-line Perhaps something to consider if clisops
proceeds with #37.
from clisops.
Now merged into master.
from clisops.
Related Issues (20)
- Get rid of shapely Deprecating Warnings
- New release HOT 5
- Prototype adding time bounds to Datasets returned by time averaging
- Review the regrid-main branch ready for merger HOT 1
- Encountering problem with `clisops.ops.subset` related to `clisops.utils.dataset_utils.check_lon_alignment` HOT 2
- inconsistent bounds (lat_bnds etc) after subset operation HOT 7
- subset with time_components fails for day values which are not in the netcdf file HOT 2
- Notebooks are not being served on ReadTheDocs
- InvalidParameterValue in average notebook
- subset_bbox_indexer broken with latest xarray HOT 2
- Add a 'intersects' option to subset bbox and shape HOT 2
- Problem when lon_bnds set to None in subset_bbox
- use a test data generator for specfic test cases?
- Migrate to shapely 2.0 HOT 2
- shape_bbox_indexer seems fragile with some geometries HOT 1
- Support for points in shape_bbox_indexer HOT 1
- ⚠️ Nightly upstream-dev CI failed ⚠️
- Error: The defined _FillValue and missing_value are not the same HOT 5
- Problems with ATLAS datasets HOT 8
- PermissionError upon importing clisops.core in some Windows environments HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clisops.