| cds_python_to_r | R Documentation |
When looking for a dataset on https://cds.climate.copernicus.eu/datasets,
you have the option to copy the API request code to the clipboard. However,
this is Python code and cannot be used directly in this package.
Use this function to translate the code to a request that can be handled by
the package. For more details see vignette("translate")
cds_python_to_r(text, ...)
text |
A |
... |
Ignored |
A named list that can be used as input for the functions
cds_submit_job() and cds_estimate_costs()
python_code <-
"import cdsapi
dataset = \"reanalysis-era5-land\"
request = {
\"variable\": [\"2m_dewpoint_temperature\"],
\"year\": \"2025\",
\"month\": \"01\",
\"day\": [\"01\"],
\"time\": [
\"00:00\", \"01:00\", \"02:00\",
\"03:00\", \"04:00\", \"05:00\",
\"06:00\", \"07:00\", \"08:00\",
\"09:00\", \"10:00\", \"11:00\",
\"12:00\", \"13:00\", \"14:00\",
\"15:00\", \"16:00\", \"17:00\",
\"18:00\", \"19:00\", \"20:00\",
\"21:00\", \"22:00\", \"23:00\"
],
\"data_format\": \"netcdf\",
\"download_format\": \"unarchived\"
}
client = cdsapi.Client()
client.retrieve(dataset, request).download()
"
cds_python_to_r(python_code)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.