Comments (4)
I am the developer of the CFtime
package, supporting the full range of defined CF Metadata Convention calendars. I have worked with Michael over the last 6 months or so to make that functionality available in ncmeta
. The dev version on GitHub now includes "extended" attributes, the only one of which is "time" (currently). Michael is working on a new release of ncmeta
that will include this. Michael is thus well aware of my efforts and also my intention to look at stars
. I am not sure how well Dave has been following recent developments but as ctb to ncmeta
he may be automatically notified of changes.
I'll make a proposal in a new issue to present my ideas in more detail.
Closing here now.
from stars.
Thanks, these are all good observations. The three different functions use three different code paths to get to the same array:
read_stars
uses "legacy" GDAL RasterDataSet: this returns a dataset with a large number of layers,stars
then tries to figure out the (time) dimension properties of the layers and puts it in the time dimension. This GDAL data model doesn't have names for x and y dimensions, hence they always get namedx
andy
byread_stars
. GDAL traditionally organizes imagery with row index increasing with decreasing y coordinate ("image orientation"), hence the negativey
offset
read_ncdf
uses R packagesncmeta
andRNetCDF
, the latter directly interfaces to thenetcdf
C library.read_mdim
uses the newer GDAL multidimensional array C++ interface, which for instance also reads and writes Zarr files (I'm not sure ifread_ncdf
can do this)
The summary stats are "summary of first 1e+05 cells", which depends on the order in the array and hence on the sign of y$delta
: for read_stars
this starts north, the others south. You can pass on n=Inf
to print.stars
to get the summary of the entire array, this should be identical for all.
Another observation is that only read_ncdf
returns irregular x
and y
dimension values (no offset
and delta
): maybe they are nearly regularly spaced, and the tolerance for deciding they are to be considered regularly spaced is too tight.
The fact that each of them, plotted, gives the same image confirms that these are semantically nearly identical representations of the data.
from stars.
Interesting then that read_stars()
and read_mdim()
return different data organisation while both are based on GDAL.
Is there an interest to more closely align the information collected through each function? As mentioned, I am tinkering with ncdf.R
and could do a proper fork and then send you a PR.
from stars.
Interesting then that read_stars() and read_mdim() return different data organisation while both are based on GDAL.
Yes: one code base, two different data models
Is there an interest to more closely align the information collected through each function? As mentioned, I am tinkering with ncdf.R and could do a proper fork and then send you a PR.
read_stars()
will always end up regular x
and y
dimensions, regardless whether they are regular in the netcdf file (another constraint of the RasterDataSet). It would be good if read_mdim()
and read_ncdf
agreed on this issue though, i.e. used the same tolerance.
I'm not sure what you are exactly tinkering with; @mdsumner and @dblodgett-usgs wrote read_ncdf()
, so some approval from them would also be good.
from stars.
Related Issues (20)
- 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
- starsdata not available, stars fails revdeps. HOT 7
- issue using `st_cells()` on a cropped image HOT 3
- workflow recommendations for simple spatial mean computations HOT 5
- An error occurred while using the st_get_dimension_values function to obtain the time HOT 1
- `mutate.stars` fails on attributes with spaces in its name HOT 1
- A better (efficient) way to convert a list to stars object with time dimension having only one value HOT 2
- Error with `mdim` test: `Error: cannot open driver` HOT 8
- Some tests cannot find files from `stars/nc` directory HOT 3
- Croping a stars object takes 16.89 hours while terra takes 0.16 seconds HOT 3
- Extracting to sf now gives "Error in make_intervals(x$start[i], x$end[i]) : length(start) > 0 is not TRUE" HOT 5
- Update failed for stars... same error for leafem, leafgl, and rgee installation. HOT 9
- Error file not found after st_warp() HOT 7
- Writing error as netcdf HOT 3
- Dimensions error when filtering HOT 3
- write_mdim() error "Error: NA value in which_dims: logic error" , but replacing values works?
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.