How to access the data using R?
Freestyleyang opened this issue · 1 comments
Hi there,
Thank you for developing the downscaled CMIP6 dataset! Is it possible to access the data using R? Could you please share some example codes?
Thanks for your question and interest!
Unfortunately, this looks like it's still tricky. zarr support for R is being worked on, but it looks like it's in it's early stages. See this issue on zarr-developers: zarr-developers/community#18
There is an example of reading from the STAC collection with R here: https://github.com/microsoft/PlanetaryComputerExamples/blob/main/quickstarts/reading-stac-r.ipynb
One thing you could do is to download a subset of the data in python, save to netCDF or something with better R support, and then open it locally in R. You could read in the data with xarray as we show in the examples and then save to netcdf with xr.Dataset.to_netcdf
, e.g.:
ds.to_netcdf("local_filepath.nc")
The access to the data is provided by https://github.com/microsoft/PlanetaryComputer, so that's a good place to go for general access & support questions.