Skip to content

Commit e643c02

Browse files
committed
update comments & links
+ dependency: add cdsapi>=0.7.0 version constraint on pyproject.toml and requirements.txt files + tests/test_dload.py: update print out website link + README: - remove obsolete link to retostauffer.org website - update link to the "create a new account" link
1 parent 6f49dbf commit e643c02

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,19 @@ Test the installation by running:
5757
python PyAPS/tests/test_calc.py
5858
```
5959

60-
### 2. Account setup for [ERA5](https://retostauffer.org/code/Download-ERA5/)
60+
### 2. Account setup for ERA5
6161

62-
Starting from 26 September 2024, ERA5 data set is redistributed over the Copernicus Climate Data Store (CDS)-beta ([guidlines](https://confluence.ecmwf.int/display/CKB/Please+read%3A+CDS+and+ADS+migrating+to+new+infrastructure%3A+Common+Data+Store+%28CDS%29+Engine)). Registration is required for the data access and downloading.
62+
ERA5 data set is redistributed over the Copernicus Climate Data Store (CDS)-beta ([migration guide](https://confluence.ecmwf.int/display/CKB/Please+read%3A+CDS+and+ADS+migrating+to+new+infrastructure%3A+Common+Data+Store+%28CDS%29+Engine)). Registration is required for the data access and downloading.
6363

64-
65-
+ [Create a new account](https://cds.climate.copernicus.eu/user/register) on the CDS website if you don't own a user account yet.
66-
+ [CDS API setup](https://cds-beta.climate.copernicus.eu/how-to-api#install-the-cds-api-client): Create the local file `$HOME/.cdsapirc` and add the following two lines:
64+
+ [Create a new account](https://cds-beta.climate.copernicus.eu/) on the CDS-beta website if you don't own a user account yet. Note: the old CDS account won't work.
65+
+ [CDS API setup](https://cds-beta.climate.copernicus.eu/how-to-api#install-the-cds-api-client): Create the local file `$HOME/.cdsapirc` (in your Unix/Linux environment) and add the following two lines:
6766

6867
```shell
6968
url: https://cds-beta.climate.copernicus.eu/api
7069
key: your-personal-access-token
7170
```
7271

73-
Your Personal Access Token can be found under the [setup guide](https://cds-beta.climate.copernicus.eu/how-to-api#install-the-cds-api-client) or under [Your profile > Personal Access Token](https://cds-beta.climate.copernicus.eu/profile). Alternatively, you could add the token to the `[CDS]` section in `model.cfg` file in the package directory, `site-packages/pyaps3` if installed via conda. Do not put the personal user ID (UID) there, it won't be recognized. Also, if you use your [old API Key](https://cds.climate.copernicus.eu/user/311901), it leads to a 401 Client Error and Authentication failed.
72+
Your Personal Access Token can be found under [Your profile > Personal Access Token](https://cds-beta.climate.copernicus.eu/profile) section or on the [setup guide](https://cds-beta.climate.copernicus.eu/how-to-api#install-the-cds-api-client) page. Alternatively, you could add the token to the `[CDS]` section in `model.cfg` file in the package directory, `site-packages/pyaps3` if installed via conda. Note: using your [old CDS API key](https://cds.climate.copernicus.eu/) will lead to a 401 Client Error and Authentication failed.
7473

7574
+ **Make sure** that you accept the data license in the Terms of use on ECMWF website: Login, under [Datasets > ERA5 hourly data on pressure levels from 1940 to present > Download > Terms of use](https://cds-beta.climate.copernicus.eu/datasets/reanalysis-era5-pressure-levels?tab=download), click **Accept** to accespt the license to use Copernicus Products.
7675

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ classifiers=[
2222
"Programming Language :: Python :: 3",
2323
]
2424
dependencies = [
25-
"cdsapi",
25+
"cdsapi>=0.7.0",
2626
"matplotlib",
2727
"numpy",
2828
"pygrib",

requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# for running
2-
cdsapi
2+
cdsapi>=0.7.0
33
matplotlib
44
numpy
55
pygrib
@@ -11,4 +11,4 @@ urllib3
1111
pip
1212
setuptools
1313
setuptools_scm
14-
wheel
14+
wheel

tests/test_dload.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
print('import pyaps3 from {}'.format(pa.__file__))
99
print('------------------------------------------------')
1010
print('test ERA5 data download')
11-
print('NOTE: Account setup is required on the Copernicus Climate Data Store (CDS).')
12-
print(' More detailed info can be found on: https://retostauffer.org/code/Download-ERA5/')
11+
print('NOTE: Account setup is required on the Copernicus Climate Data Store (CDS)-beta.')
12+
print(' More detailed info can be found on: https://cds-beta.climate.copernicus.eu/how-to-api')
1313
print(' Add your account info to ~/.cdsapirc file.')
1414
filedir = os.path.join(os.path.dirname(__file__), 'data', 'ERA5')
1515
pa.ECMWFdload(['20200601','20200901'], hr='14', filedir=filedir, model='ERA5', snwe=(30,40,120,140))

0 commit comments

Comments
 (0)