Comments (9)
There already was a
ss2 %>% st_set_dimensions("time", c("DJF", "MAM", "JJA", "SON"))
but the current setup should make this better. Pls test! See also e4d00b2
from stars.
from stars.
Thanks! (tested, works)
I am honoured, I really appreciate it.
from stars.
If s %>% st_set_dimensions("time", c("MAM", "JJA", "SON", "DJF"))
works, any reason why st_dimensions(s, "time") <- c("MAM", "JJA", "SON", "DJF")
should not?
from stars.
There is no st_dimensions<-
. A good reason to not have one is that st_set_dimensions
takes three arguments, and all replacement functions, afaict, take two.
from stars.
all replacement functions, afaict, take two
Ah OK, I did not know this. Thanks for the clarification.
from stars.
@adrfantini I encountered this labelling in these lessons that use Python's xarray https://carpentrieslab.github.io/python-aos-lesson/
Is that labelling and "time.season" functionality common in Python tools, or in the work you do with climate data? (Is it a CMIP5 thing?) I don't see those seasonal labels in the file in the lesson, so I assume it's an xarray idiom - but would like to know if it's widely used? I find it pretty fragile given all the variability in ways that time and dates can be encoded, but maybe in CMIP5 it's reliable enough?
from stars.
@mdsumner I'm not sure I understand what you mean.
Climatological seasons are different from actual seasons, for simplicity.
Labelling seasons with the initials of the respective months is extremely common in climate science (only in the final data-analysis, not in simulations). In Europe for example you will see papers referring to 'DJF' as often as to 'winter', or even more. In the same way, the monsoon season is usually referred to as 'JJAS' in India.
Is this what you were asking?
EDIT: as far as python goes I don't use it much so I'afraid I cannot reply on that one.
from stars.
That answers, thanks! It looks like xarray has auto-interpreters for time and will apply groupby("time.season") as a special case with those month-triplets as output labels.
from stars.
Related Issues (20)
- Unable to open Zarr files HOT 3
- read_mdim cannot find array but cli gdalmdiminfo finds array just fine? HOT 8
- read_ncdf: regular vs rectilinear grids? HOT 2
- Rotate around the centroid in st_geotransform
- Exporting s3 methods from namespace HOT 3
- Reading local Zarr files into stars HOT 13
- netcdf CF 1-8 conform data is missing meta data HOT 1
- Behaviour of `aggregate.stars` when multiple overlaps occur in the same raster pixel HOT 6
- Pixels in the border get weird values with `st_rasterize()` HOT 5
- Enhancement Request: Direct Access to Band Values Using Band Names in stars Object HOT 2
- Non `udunits` confirm units break the read in of netcdf files HOT 5
- st_rasterize Error in rep_len HOT 4
- Unexpected behavior: st_transform a raster and transforming back, it is not identical unless applying st_warp HOT 7
- Three different stars object descriptions from the same file HOT 4
- Proposal: Record time dimension in stars objects using CFtime package HOT 6
- Issues with particular file: North American Land Cover (NALC) Dataset HOT 5
- Additional nest in dimension while reading HDF5 file and terra workaround solution HOT 7
- GDAL Access window out of range on read-in of stars_proxy HOT 2
- aggregate.stars mean by time (by = "2 days") HOT 2
- netcdf dimensions get messed up if they are out of order and if axis attributes are available HOT 12
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 stars.