Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
2 changes: 1 addition & 1 deletion docs/sphinx/source/whatsnew/v0.9.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ Testing
* Speed up CI setup using micromamba instead of conda (:pull:`1493`)
* Drop python 3.6 (reached end of life Dec 2021) and add 3.10 to test matrix (:pull:`1507`)


Documentation
~~~~~~~~~~~~~
* Added a reference to :py:func:`pvlib.inverter.sandia_multi`. (:pull:`1479`)
* Add gallery example of simulating rearside irradiance for a fixed-tilt
array with pvfactors (:pull:`1470`)
* Updated reference links to CAMS Radiation (:issue:`1515`, :pull:`1529`)

Benchmarking
~~~~~~~~~~~~~
Expand Down
38 changes: 16 additions & 22 deletions pvlib/iotools/sodapro.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
server='www.soda-is.com', timeout=30):
"""
Retrieve time-series of radiation and/or clear-sky global, beam, and
diffuse radiation from CAMS. Data from CAMS Radiation [1]_ and CAMS McClear
[2]_ are retrieved from SoDa [3]_.
diffuse radiation from CAMS (see [1]_). Data is retrieved from SoDa [2]_.

Time coverage: 2004-01-01 to two days ago

Access: free, but requires registration, see [1]_
Access: free, but requires registration, see [2]_

Requests: max. 100 per day
Geographical coverage: worldwide for CAMS McClear and approximately -66° to
Expand Down Expand Up @@ -107,7 +106,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
Notes
-----
In order to use the CAMS services, users must register for a free SoDa
account using an email address [1]_.
account using an email address [2]_.

The returned data DataFrame includes the following fields:

Expand All @@ -130,7 +129,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
======================== ====== =========================================

†Parameters only returned if identifier='cams_radiation'. For description
of additional output parameters in verbose mode, see [1]_ and [2]_.
of additional output parameters in verbose mode, see [1]_.

Note that it is recommended to specify the latitude and longitude to at
least the fourth decimal place.
Expand All @@ -152,12 +151,10 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',

References
----------
.. [1] `CAMS Radiation Service Info
<https://www.soda-pro.com/web-services/radiation/cams-radiation-service/info>`_
.. [2] `CAMS McClear Service Info
<https://www.soda-pro.com/web-services/radiation/cams-mcclear/info>`_
.. [3] `CAMS McClear Automatic Access
<https://www.soda-pro.com/help/cams-services/cams-mcclear-service/automatic-access>`_
.. [1] `CAMS solar radiation documentation
<https://atmosphere.copernicus.eu/solar-radiation>`_
.. [2] `CAMS Radiation Automatic Access (SoDa)
<https://www.soda-pro.com/help/cams-services/cams-radiation-service/automatic-access>`_
"""
try:
time_step_str = TIME_STEPS_MAP[time_step]
Expand Down Expand Up @@ -233,7 +230,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
def parse_cams(fbuf, integrated=False, label=None, map_variables=True):
"""
Parse a file-like buffer with data in the format of a CAMS Radiation or
McClear file. The CAMS services are described in [1]_ and [2]_.
McClear file. The CAMS solar radiation services are described in [1]_.

Parameters
----------
Expand Down Expand Up @@ -262,10 +259,8 @@ def parse_cams(fbuf, integrated=False, label=None, map_variables=True):

References
----------
.. [1] `CAMS Radiation Service Info
<https://www.soda-pro.com/web-services/radiation/cams-radiation-service/info>`_
.. [2] `CAMS McClear Service Info
<https://www.soda-pro.com/web-services/radiation/cams-mcclear/info>`_
.. [1] `CAMS solar radiation documentation
<https://atmosphere.copernicus.eu/solar-radiation>`_
"""
metadata = {}
# Initial lines starting with # contain metadata
Expand Down Expand Up @@ -334,8 +329,9 @@ def parse_cams(fbuf, integrated=False, label=None, map_variables=True):

def read_cams(filename, integrated=False, label=None, map_variables=True):
"""
Read a CAMS Radiation or McClear file into a pandas DataFrame. CAMS
radiation and McClear are described in [1]_ and [2]_, respectively.
Read a CAMS Radiation or McClear file into a pandas DataFrame.

CAMS Radiation and McClear are described in [1]_.

Parameters
----------
Expand Down Expand Up @@ -365,10 +361,8 @@ def read_cams(filename, integrated=False, label=None, map_variables=True):

References
----------
.. [1] `CAMS Radiation Service Info
<https://www.soda-pro.com/web-services/radiation/cams-radiation-service/info>`_
.. [2] `CAMS McClear Service Info
<https://www.soda-pro.com/web-services/radiation/cams-mcclear/info>`_
.. [1] `CAMS solar radiation documentation
<https://atmosphere.copernicus.eu/solar-radiation>`_
"""
with open(str(filename), 'r') as fbuf:
content = parse_cams(fbuf, integrated, label, map_variables)
Expand Down