Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add retrieval function for ERA5 reanalysis data #1264

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8e8661c
Create era5.py
AdamRJensen Jun 16, 2021
25662a4
Update era5.py
AdamRJensen Jun 17, 2021
f6bc57e
Update era5.py
AdamRJensen Jun 17, 2021
57eecb5
Update era5.py
AdamRJensen Jul 27, 2021
c135481
Fix stickler
AdamRJensen Jul 27, 2021
f4e9242
Add xarray and cdsapi to requirements and setup.py
AdamRJensen Aug 8, 2021
af3067e
Remove grib support and update variable_map
AdamRJensen Aug 8, 2021
b2c400c
Fix stickler
AdamRJensen Aug 8, 2021
bb62d7f
Add era5 to api.rst, __init__, and whatsnewfile
AdamRJensen Aug 9, 2021
9f6b15f
Fix error in __init__.py
AdamRJensen Aug 9, 2021
9a22c04
Change parse to read in __init__.py
AdamRJensen Aug 9, 2021
21bedd1
Update get_era5 documentation
AdamRJensen Aug 9, 2021
6c76efd
Merge remote-tracking branch 'upstream/master' into era5
AdamRJensen Aug 9, 2021
3422ddf
Improve docs and use open_mfdataset in read_era5
AdamRJensen Aug 11, 2021
545bafa
Coverage for ERA5 incl. test file
AdamRJensen Aug 11, 2021
8ed6df5
Export CDSAPI_KEY in conda_linux.yml
AdamRJensen Aug 11, 2021
041732f
Fix stickler
AdamRJensen Aug 11, 2021
93bd4ec
Install xarray with pip in requirements-py36
AdamRJensen Aug 11, 2021
519b060
Include xarray in TEST_REQUIRE in setup.py
AdamRJensen Aug 11, 2021
b732c76
Add UID to era5 tests
AdamRJensen Aug 11, 2021
4c911ac
Add requires_xarray to conftest.py
AdamRJensen Aug 11, 2021
f1b83a2
Renaming get_era5 inputs
AdamRJensen Aug 11, 2021
7a13531
Updated CDSAPI_KEY usage
AdamRJensen Aug 11, 2021
87b6a50
Extend test coverage
AdamRJensen Aug 11, 2021
bff7299
Add dask as optional dependency
AdamRJensen Aug 16, 2021
5de52bc
Update documentation
AdamRJensen Aug 16, 2021
0721f15
More documentation updates
AdamRJensen Aug 16, 2021
2e90c67
Extend parsed metadata
AdamRJensen Aug 16, 2021
9f0a624
Coverage for output_format parameter
AdamRJensen Aug 16, 2021
7921666
Fix stickler
AdamRJensen Aug 16, 2021
03e4a5f
Update description of test_get_cams_bad_request
AdamRJensen Aug 16, 2021
5e1db86
Implement changes from review by kanderso-nrel
AdamRJensen Aug 16, 2021
dd443e4
Remove cds_client input parameter
AdamRJensen Aug 17, 2021
c25780e
Localize dataframe and add helper functions to pvlib.tools
AdamRJensen Aug 17, 2021
5a00ad5
Reformat imports of non-standard packages
AdamRJensen Aug 19, 2021
46f38c1
Set quit=True in cds_client and add depdencies in whatsnew
AdamRJensen Aug 20, 2021
cde8a4a
Rename variables before extracting metadata
AdamRJensen Aug 20, 2021
3f96eec
Change file_location to file_url and remove lat/lon offset
AdamRJensen Aug 27, 2021
6cd44b1
Merge branch 'master' into era5
AdamRJensen Aug 27, 2021
5db2fef
Remove has_tables from conftest.py
AdamRJensen Aug 27, 2021
f6443fc
Merge branch 'era5' of https://github.com/AdamRJensen/pvlib-python in…
AdamRJensen Aug 27, 2021
6534c66
Revert "Merge branch 'era5' of https://github.com/AdamRJensen/pvlib-p…
AdamRJensen Aug 27, 2021
3ae5327
Revert back to 3f96eec
AdamRJensen Aug 27, 2021
faa5a45
Merge remote-tracking branch 'upstream/master' into era5
AdamRJensen Sep 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/azure/conda_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
export NREL_API_KEY=$(nrelApiKey)
export BSRN_FTP_USERNAME=$(BSRN_FTP_USERNAME)
export BSRN_FTP_PASSWORD=$(BSRN_FTP_PASSWORD)
export CDSAPI_KEY=$(CDSAPI_KEY)
pytest pvlib --remote-data --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html
displayName: 'pytest'
- task: PublishTestResults@2
Expand Down
3 changes: 3 additions & 0 deletions ci/requirements-py36.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ channels:
- defaults
- conda-forge
dependencies:
- cdsapi
- coveralls
- cython
- dask
- ephem
- netcdf4
- nose
Expand All @@ -27,6 +29,7 @@ dependencies:
- shapely # pvfactors dependency
- siphon # conda-forge
- statsmodels
- xarray
- pip:
- dataclasses
- nrel-pysam>=2.0
Expand Down
3 changes: 3 additions & 0 deletions ci/requirements-py37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ channels:
- defaults
- conda-forge
dependencies:
- cdsapi
- coveralls
- cython
- dask
- ephem
- netcdf4
- nose
Expand All @@ -27,6 +29,7 @@ dependencies:
- shapely # pvfactors dependency
- siphon # conda-forge
- statsmodels
- xarray
- pip:
- nrel-pysam>=2.0
- pvfactors==1.4.1
3 changes: 3 additions & 0 deletions ci/requirements-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ channels:
- defaults
- conda-forge
dependencies:
- cdsapi
- coveralls
- cython
- dask
- ephem
- netcdf4
- nose
Expand All @@ -27,6 +29,7 @@ dependencies:
- shapely # pvfactors dependency
- siphon # conda-forge
- statsmodels
- xarray
- pip:
- nrel-pysam>=2.0
- pvfactors==1.4.1
3 changes: 3 additions & 0 deletions ci/requirements-py39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ channels:
- defaults
- conda-forge
dependencies:
- cdsapi
- coveralls
- cython
- dask
- ephem
# - netcdf4 # pulls in a different version of numpy with ImportError
- nose
Expand All @@ -27,6 +29,7 @@ dependencies:
- shapely # pvfactors dependency
# - siphon # conda-forge
- statsmodels
- xarray
- pip:
# - nrel-pysam>=2.0 # install error on windows
- pvfactors==1.4.1
2 changes: 2 additions & 0 deletions docs/sphinx/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,8 @@ of sources and file formats relevant to solar energy modeling.
iotools.get_cams
iotools.read_cams
iotools.parse_cams
iotools.get_era5
iotools.read_era5

A :py:class:`~pvlib.location.Location` object may be created from metadata
in some files.
Expand Down
6 changes: 6 additions & 0 deletions docs/sphinx/source/whatsnew/v0.9.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ Deprecations

Enhancements
~~~~~~~~~~~~
* Add :func:`~pvlib.iotools.get_era5` and
:func:`~pvlib.iotools.read_era5` for retrieving and reading
ERA5 reanalysis netcdf files from the Climate Data Store (CDS)
files. (:pull:`1264`)
* Add :func:`~pvlib.iotools.read_bsrn` for reading BSRN solar radiation data
files. (:pull:`1145`, :issue:`1015`)
* Added :func:`~pvlib.iotools.read_pvgis_hourly` and
:func:`~pvlib.iotools.get_pvgis_hourly` for reading and retrieving hourly
solar radiation data and PV power output from PVGIS. (:pull:`1186`,
Expand Down
Binary file added pvlib/data/era5_testfile.nc
Binary file not shown.
Binary file added pvlib/data/era5_testfile_1day.nc
Binary file not shown.
2 changes: 2 additions & 0 deletions pvlib/iotools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
from pvlib.iotools.sodapro import get_cams # noqa: F401
from pvlib.iotools.sodapro import read_cams # noqa: F401
from pvlib.iotools.sodapro import parse_cams # noqa: F401
from pvlib.iotools.era5 import get_era5 # noqa: F401
from pvlib.iotools.era5 import read_era5 # noqa: F401
Loading