Description
There are a few upcoming changes happening to the CAMS Radiation Service (below is a quote from an email sent out on June 30th 2023):
• The CAMS Radiation Service for HIMAWARI satellite field of view is now open in beta test.
• New error messages for CAMS Radiation and McClear services that can affect your acquisition routine. More details in the relase note below.
See the complete release note at: https://www.soda-pro.com/help/cams-services/release-notes-cams#2023-07-03
This is exciting news in that CAMS will now also be covering Asia and Australia in addition to the current coverage of Europe and Africa!
New error messages
As stated above, the team is also making changes to the error messages, which will require an update to the pvlib get_cams
function. Based on the beta version, it seems the API now raises an HTTP error when encountering invalid requests. Previously the status was always 200 (OK), and the error message had to be manually detected using these lines:
pvlib-python/pvlib/iotools/sodapro.py
Lines 217 to 222 in 6bf9e07
The beta API can be tried out by manually specifying the URL:
data, meta = pvlib.iotools.get_cams(
latitude=-24.98,
longitude=118.60,
start=pd.Timestamp('2020-01-01'),
end=pd.Timestamp('2020-01-02'),
email='redacted',
server='vhost5.soda-is.com',
)
Solution
The above lines should be substituted by something along the lines of:
if not res.ok:
res.raise_for_status()
A big thanks goes out to the CAMS team!