[Git][debian-gis-team/pyaps3][master] 5 commits: New upstream version 0.3.5
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Sep 21 14:06:22 BST 2024
Antonio Valentino pushed to branch master at Debian GIS Project / pyaps3
Commits:
6009ed73 by Antonio Valentino at 2024-09-21T12:50:23+00:00
New upstream version 0.3.5
- - - - -
098558a6 by Antonio Valentino at 2024-09-21T12:50:38+00:00
Update upstream source from tag 'upstream/0.3.5'
Update to upstream version '0.3.5'
with Debian dir a3d6f6f1476e6e9e8700bc9bf404ec5d80bd0c5b
- - - - -
aea6c60a by Antonio Valentino at 2024-09-21T12:51:34+00:00
New upstream release
- - - - -
1e6772d9 by Antonio Valentino at 2024-09-21T12:58:53+00:00
Update dependencies
- - - - -
0990cd4d by Antonio Valentino at 2024-09-21T13:03:36+00:00
Set distribution to unstable
- - - - -
10 changed files:
- .circleci/config.yml
- README.md
- debian/changelog
- debian/control
- pyproject.toml
- requirements.txt
- src/pyaps3/autoget.py
- src/pyaps3/model.cfg
- + tests/requirements.txt
- tests/test_dload.py
Changes:
=====================================
.circleci/config.yml
=====================================
@@ -54,7 +54,7 @@ jobs:
export PYTHONUNBUFFERED=1
# install dependencies and source code
source activate root
- mamba install --verbose --yes --file ${PYAPS_HOME}/requirements.txt
+ mamba install --verbose --yes --file ${PYAPS_HOME}/requirements.txt --file ${PYAPS_HOME}/tests/requirements.txt
python -m pip install ${PYAPS_HOME}
- run:
=====================================
README.md
=====================================
@@ -7,7 +7,7 @@
## PyAPS - Python based Atmospheric Phase Screen estimation
-This python 3 module estimates differential phase delay maps due to the stratified atmosphere for correcting radar interferograms. It is rewritten in Python 3 language from PYAPS source code and adapted for ECMWF's ERA-5 corrections.
+This Python 3 module estimates differential phase delay maps due to the stratified atmosphere for correcting radar interferograms. It is rewritten in Python 3 language from PyAPS source code and adapted for ECMWF's ERA-5 corrections.
WARNING: The current version does not work with NARR and MERRA datasets. Contributions are welcomed.
@@ -57,21 +57,21 @@ Test the installation by running:
python PyAPS/tests/test_calc.py
```
-### 2. Account setup for [ERA5](https://retostauffer.org/code/Download-ERA5/)
+### 2. Account setup for [ERA5](https://www.ecmwf.int/en/forecasts/dataset/ecmwf-reanalysis-v5)
-ERA5 data set is redistributed over the Copernicus Climate Data Store (CDS). Registration is required for the data access and downloading.
+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.
-+ [Create a new account](https://cds.climate.copernicus.eu/user/register) on the CDS website if you don't own a user account yet.
-+ Create the local file `$HOME/.cdsapirc` and add the following two lines:
++ [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.
++ [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:
```shell
-url: https://cds.climate.copernicus.eu/api/v2
-key: 12345:abcdefghij-134-abcdefgadf-82391b9d3f
+url: https://cds-beta.climate.copernicus.eu/api
+key: your-personal-access-token
```
-where 12345 is your personal user ID (UID), the part behind the colon is your personal API key. More details can be found [here](https://cds.climate.copernicus.eu/api-how-to). Alternatively, you could edit the `model.cfg` file in the package directory, `site-packages/pyaps3` if installed via conda, and fill in the `[CDS]` section.
+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.
-+ **Make sure** that you accept the data license in the Terms of use on ECMWF website.
++ **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.
+ Test the account setup by running:
=====================================
debian/changelog
=====================================
@@ -1,9 +1,14 @@
-pyaps3 (0.3.4-2) UNRELEASED; urgency=medium
+pyaps3 (0.3.5-1) unstable; urgency=medium
- * Team upload.
+ [ Bas Couwenberg ]
* Bump Standards-Version to 4.7.0, no changes.
- -- Bas Couwenberg <sebastic at debian.org> Sun, 28 Jul 2024 19:52:44 +0200
+ [ Antonio Valentino ]
+ * New upstream release.
+ * debian/control:
+ - Update dependencies.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sat, 21 Sep 2024 13:03:00 +0000
pyaps3 (0.3.4-1) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -32,9 +32,9 @@ Depends: ${python3:Depends},
${misc:Depends},
python3-cdsapi,
python3-grib,
- python3-matplotlib,
python3-scipy,
python3-urllib3
+Recommends: python3-matplotlib
Suggests: python3-hdf4,
python3-netcdf4
Description: Python based Atmospheric Phase Screen Estimation
=====================================
pyproject.toml
=====================================
@@ -1,5 +1,5 @@
[build-system]
-requires = ["setuptools>=61.0", "setuptools_scm[toml]", "wheel"]
+requires = ["setuptools>=64.0", "setuptools_scm[toml]>=8", "wheel"]
build-backend = "setuptools.build_meta"
[project]
@@ -9,8 +9,8 @@ authors = [
{name="Romain Jolivet", email="insar at geologie.ens.fr"},
{name="Angelique Benoit"},
]
-readme = "README.md"
requires-python = ">=3.8"
+
keywords = ["InSAR", "troposphere", "geodesy", "geophysics", "ERA5"]
license = {text = "GPL-3.0-or-later"}
classifiers=[
@@ -21,26 +21,28 @@ classifiers=[
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
-dependencies = [
- "cdsapi",
- "matplotlib",
- "numpy",
- "pygrib",
- "scipy",
- "urllib3",
- #"netcdf4", # for MERRA, which is currently not supported
- #"pyhdf", # for MERRA, which is currently not supported
-]
-dynamic = ["version"]
+
+# see section: setuptools_scm
+# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata
+# dependencies will be read from text files
+dynamic = ["version", "readme", "dependencies", "optional-dependencies"]
[project.urls]
"Homepage" = "https://github.com/insarlab/PyAPS"
-"Bug Tracker" = "https://github.com/insarlab/PyAPS/issues"
+"Issues" = "https://github.com/insarlab/PyAPS/issues"
[tool.setuptools]
include-package-data = true
zip-safe = false
+[tool.setuptools.dynamic]
+dependencies = { file = ["requirements.txt"] }
+readme = { file = ["README.md"], content-type = "text/markdown" }
+
+# extra requirements: `pip install pyaps3[test]` or `pip install .[test]`
+[tool.setuptools.dynamic.optional-dependencies.test]
+file = ["tests/requirements.txt"]
+
[tool.setuptools.packages.find]
where = ["src"]
=====================================
requirements.txt
=====================================
@@ -1,14 +1,7 @@
-# for running
-cdsapi
-matplotlib
+cdsapi>=0.7.0
numpy
pygrib
scipy
urllib3
#netcdf4 #for MERRA, which is currently not supported
#pyhdf #for MERRA, which is currently not supported
-# for packaging and installation
-pip
-setuptools
-setuptools_scm
-wheel
\ No newline at end of file
=====================================
src/pyaps3/autoget.py
=====================================
@@ -48,8 +48,8 @@ def ECMWFdload(bdate,hr,filedir,model='ERA5',datatype='fc',humidity='Q',snwe=Non
print('WARNING: you are downloading from the old ECMWF platform. '
'ERA-Interim is deprecated, use ERA-5 instead.')
if model in 'ERA5':
- print('INFO: You are using the latest ECMWF platform for downloading datasets: '
- 'https://cds.climate.copernicus.eu/api/v2')
+ cds_url = 'https://cds-beta.climate.copernicus.eu/api'
+ print('INFO: You are using the latest ECMWF platform for downloading datasets: ', cds_url)
#-------------------------------------------
# Define parameters
@@ -91,14 +91,14 @@ def ECMWFdload(bdate,hr,filedir,model='ERA5',datatype='fc',humidity='Q',snwe=Non
fname = flist[i]
#-------------------------------------------
- # CASE 1: request for CDS API client (new ECMWF platform, for ERA5)
+ # CASE 1: request for CDS API client (new ECMWF platform, for ERA5)
if model in 'ERA5':
# Contact the server
rc_file = os.path.expanduser('~/.cdsapirc')
if os.path.isfile(rc_file):
c = cdsapi.Client()
else:
- url = 'https://cds.climate.copernicus.eu/api/v2'
+ url = cds_url
key = config.get('CDS', 'key')
c = cdsapi.Client(url=url, key=key)
@@ -206,7 +206,7 @@ def MERRAdload(bdate,hr,filedir, hdf=False):
else:
weburl = '%s%s%s%s%s%s%s%s%s%s%s%s%s' %(url1,yr,url2,mon,url3n,date,url4,hr,url5,hr,url6n,date,url7)
dir = '%s' %(filename)
-
+
if not os.path.exists(dir):
#urllib3.urlretrieve(weburl,dir)
dloadCmd = 'wget "{}" --user {} --password {} -O {}'.format(weburl, user, pw, filename)
@@ -222,7 +222,7 @@ def NARRdload(bdate,hr,filedir):
os.makedirs(filedir)
print('create foler: {}'.format(filedir))
- flist = []
+ flist = []
for i, day in enumerate(bdate):
webdir = day[0:6]
fname = 'narr-a_221_%s_%s00_000.grb'%(day,hr)
=====================================
src/pyaps3/model.cfg
=====================================
@@ -3,19 +3,19 @@
#Get it from https://retostauffer.org/code/Download-ERA5/
#for ERA5
[CDS]
-key = your-uid:your-api-key
+key = your-personal-access-token
#####The key to the new server for ECMWF
-#Get it from https://software.ecmwf.int/wiki/display/WEBAPI/Accessing+ECMWF+data+servers+in+batch
+#Get it from https://software.ecmwf.int/wiki/display/WEBAPI/Accessing+ECMWF+data+servers+in+batch
#for ERA-Interim [outdated]
[ECMWF]
email = the-email-address-used-as-login at ecmwf-website.org
-key =
+key =
#####Passwd and key for download from ucar
[ERA]
email = the-email-adress-used-as-login at ucar-website.org
-key =
+key =
#####No username/password is required for NARR
[NARR]
=====================================
tests/requirements.txt
=====================================
@@ -0,0 +1,5 @@
+matplotlib
+pip
+setuptools
+setuptools_scm
+wheel
=====================================
tests/test_dload.py
=====================================
@@ -8,8 +8,8 @@ print('------------------------------------------------')
print('import pyaps3 from {}'.format(pa.__file__))
print('------------------------------------------------')
print('test ERA5 data download')
-print('NOTE: Account setup is required on the Copernicus Climate Data Store (CDS).')
-print(' More detailed info can be found on: https://retostauffer.org/code/Download-ERA5/')
+print('NOTE: Account setup is required on the Copernicus Climate Data Store (CDS)-beta.')
+print(' More detailed info can be found on: https://cds-beta.climate.copernicus.eu/how-to-api')
print(' Add your account info to ~/.cdsapirc file.')
filedir = os.path.join(os.path.dirname(__file__), 'data', 'ERA5')
pa.ECMWFdload(['20200601','20200901'], hr='14', filedir=filedir, model='ERA5', snwe=(30,40,120,140))
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyaps3/-/compare/7cf6ffba9615e631b97f2b9a3e006c4ebbaa0403...0990cd4dbc2018ecec710d3af2c8ceb8e7f0a0d9
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyaps3/-/compare/7cf6ffba9615e631b97f2b9a3e006c4ebbaa0403...0990cd4dbc2018ecec710d3af2c8ceb8e7f0a0d9
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20240921/105be125/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list