|
4 | 4 |
|
5 | 5 | An [xcube plugin](https://xcube.readthedocs.io/en/latest/plugins.html) |
6 | 6 | which can generate data cubes from the |
7 | | -[Copernicus Climate Data Store (CDS) API](https://cds.climate.copernicus.eu/api-how-to). |
| 7 | +[Copernicus Climate Data Store (CDS) API](https://cds-beta.climate.copernicus.eu/how-to-api). |
8 | 8 |
|
9 | 9 | ## Description |
10 | 10 |
|
|
14 | 14 |
|
15 | 15 | Currently supported datasets: |
16 | 16 |
|
17 | | - - [ERA5 hourly data on single levels from 1979 to present](https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels) |
18 | | - - [ERA5-Land hourly data from 1981 to present](https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-land) |
19 | | - - [ERA5 monthly averaged data on single levels from 1979 to present](https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels-monthly-means?tab=overview) |
20 | | - - [ERA5-Land monthly averaged data from 1981 to present](https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-land-monthly-means) |
21 | | - - [Soil moisture gridded data from 1978 to present](https://cds.climate.copernicus.eu/cdsapp#!/dataset/satellite-soil-moisture) |
22 | | - - [Sea ice thickness gridded data from 2002 to present](https://cds.climate.copernicus.eu/cdsapp#!/dataset/satellite-sea-ice-thickness) |
| 17 | + - [ERA5 hourly data on single levels from 1940 to present](https://cds-beta.climate.copernicus.eu/datasets/reanalysis-era5-single-levels?tab=overview) |
| 18 | + - [ERA5-Land hourly data from 1950 to present](https://cds-beta.climate.copernicus.eu/datasets/reanalysis-era5-land?tab=overview) |
| 19 | + - [ERA5 monthly averaged data on single levels from 1940 to present](https://cds-beta.climate.copernicus.eu/datasets/reanalysis-era5-single-levels-monthly-means?tab=overview) |
| 20 | + - [ERA5-Land monthly averaged data from 1950 to present](https://cds-beta.climate.copernicus.eu/datasets/reanalysis-era5-land-monthly-means?tab=overview) |
| 21 | + - [Soil moisture gridded data from 1978 to present](https://cds-beta.climate.copernicus.eu/datasets/satellite-soil-moisture?tab=overview) |
| 22 | + - [Sea ice thickness gridded data from 2002 to present](https://cds-beta.climate.copernicus.eu/datasets/satellite-sea-ice-thickness?tab=overview) |
23 | 23 |
|
24 | 24 | ## Setup |
25 | 25 |
|
26 | 26 | ### Configuring access to the CDS API |
27 | 27 |
|
28 | 28 | In order to use the CDS API via the xcube_cds plugin, you need to obtain a |
29 | | -CDS user ID (UID) and API key and write them to a configuration file. |
| 29 | +Personal Access Token and write it to a configuration file. |
30 | 30 | Additionally, you need to use the CDS website to agree in advance to the terms |
31 | 31 | of use for any datasets you want to acccess. |
32 | 32 |
|
33 | | -#### Obtain a CDS API key |
| 33 | +#### Obtain a CDS Personal Access Token |
34 | 34 |
|
35 | | -You can obtain the UID and API key as follows: |
| 35 | +You can obtain a CDS Personal Access Token as follows: |
36 | 36 |
|
37 | 37 | 1. Create a user account on the |
38 | | - [CDS Website](https://cds.climate.copernicus.eu/user/register). |
39 | | -2. Log in to the website with your user name and password. |
40 | | -3. Navigate to your [user page](https://cds.climate.copernicus.eu/user/) |
41 | | - on the website. Your API key is shown at the bottom of the page. |
| 38 | + [CDS Website](https://cds-beta.climate.copernicus.eu/). |
| 39 | +2. Log in to the website with your username and password. |
| 40 | +3. Navigate to your [user page](https://cds-beta.climate.copernicus.eu/profile), |
| 41 | + where you can find your Personal Access Token. |
42 | 42 |
|
43 | 43 | #### Configure CDS API access |
44 | 44 |
|
45 | | -Your CDS API key must be made available to the CDS API library. You can do |
46 | | -this by creating a file named `.cdsapirc` in your home directory, with the |
47 | | -following format: |
| 45 | +Your CDS Personal Access Token must be made available to the CDS API library. |
| 46 | +You can do this by creating a file named `.cdsapirc` in your home directory, |
| 47 | +with the following format: |
48 | 48 |
|
49 | 49 | ``` |
50 | | -url: https://cds.climate.copernicus.eu/api/v2 |
51 | | -key: <UID>:<API-KEY> |
| 50 | +url: https://cds-beta.climate.copernicus.eu/api |
| 51 | +key: <PERSONAL-ACCESS-TOKEN> |
52 | 52 | ``` |
53 | 53 |
|
54 | | -Replace `<UID>` with your UID and `<API-KEY>` with your API key, as obtained |
55 | | -from the CDS website. |
56 | | - |
57 | | -You can specify an alternative location for the CDS API configuration file |
58 | | -using the `CDSAPI_RC` environment variable, or provide the URL and key |
59 | | -without a configuration file by setting the `CDSAPI_URL` and `CDSAPI_KEY` |
60 | | -environment variables. You can also pass the URL and key directly to the |
61 | | -`CDSDataOpener` and `CDSDataStore` constructors using the named parameters |
62 | | -`cds_api_url` and `cds_api_key`. |
63 | | - |
64 | | -> :warning: Note that the `key` value must contain the UID *and* the API key, |
65 | | -> separated by a colon. If you get the error |
66 | | -> [‘TypeError: 'tuple' object is not callable in python cdsapi’](https://stackoverflow.com/q/64422955/6947739), |
67 | | -> check that the `key` value follows this format correctly. |
| 54 | +Replace `<PERSONAL-ACCESS-TOKEN>` with your Personal Access Token. |
68 | 55 |
|
69 | 56 | #### Agree to the terms of use for the datasets you require |
70 | 57 |
|
71 | 58 | The datasets available through CDS have associated terms of use. Before |
72 | 59 | accessing a dataset via the API, you must agree to its terms of use, which |
73 | 60 | can only be done via the CDS website, as follows: |
74 | 61 |
|
75 | | -1. [Log in](https://cds.climate.copernicus.eu/user/login) to the CDS website, |
76 | | - and use the |
77 | | - [search page](https://cds.climate.copernicus.eu/cdsapp#!/search?type=dataset) |
78 | | - to find the dataset you require. |
79 | | -2. On the dataset's web page, select the ‘Download data’ tab. |
| 62 | +1. [Log in](https://cds-beta.climate.copernicus.eu) to the CDS website, |
| 63 | + and go to 'Datasets' to find the dataset you require. |
| 64 | +2. On the dataset's web page, select the ‘Download’ tab. |
80 | 65 | 3. Scroll to the bottom of the page, and you will see a section titled |
81 | 66 | ‘Terms of use’, which will contain either an ‘Accept terms’ button to |
82 | 67 | allow you to accept the terms, or a confirmation that you have already |
83 | 68 | accepted the terms. |
84 | 69 |
|
85 | 70 | Once you have accepted the terms on the website, the dataset will also be |
86 | | -made available to you (using the same user credentials) through the API. |
| 71 | +made available to you through the API. |
87 | 72 |
|
88 | 73 | ### Installing the xcube-cds plugin |
89 | 74 |
|
|
0 commit comments