Users can download CDS data using the ecmwfr package in R with “cds” as the "service" although it is not supported by C3S. In the examples below, "KEY" and "UID" are your CDS API key and UID respectively.
Please have a look at the following example to download ERA5 2m temperature for a selected area in netCDF format:
|
This would return the data to a file called download_e5_single.nc.
The code below retrieves ERA5pressure level temperature data at 850hpa for a selected area in netCDF format:
|
3 Comments
Malcolm Mistry
Thanks. This really helps. Just wondering, is there a way to pass the 'area' argument (to subset the data by bounding box) for those datasets that are not on a regular lon lat grid. Example UERRA dataset which is on a Lambert Conformal Conic grid. For such datasets, the 'Geographical area' option does not appear when selecting/filtering the variable. I see there is a related question here (though this question in fact is for another dataset that is already on a regular lon lat grid, yet not available to subset the bounding box). I am not sure why it would be difficult to transform the user defined regular lon lat coordinates to the dataset's native projection on the back-end, i.e. the Show API request should be able to do this in the background and display the 'area' coordinates for subsetting.
Kevin Marsh
Hi Malcolm,
No, at this time I don't think it is possible to perform an area subset in the way you describe using the CDS API, but it is a good suggestion for a future development,
Thanks,
Kevin
Malcolm Mistry
Hi Kevin,
Thanks again!
Rgds
Malcolm