1515 'GHI no corr' , 'BHI no corr' , 'DHI no corr' , 'BNI no corr' ]
1616
1717# Dictionary mapping CAMS Radiation and McClear variables to pvlib names
18- CAMS_VARIABLE_MAP = {
18+ VARIABLE_MAP = {
1919 'TOA' : 'ghi_extra' ,
2020 'Clear sky GHI' : 'ghi_clear' ,
2121 'Clear sky BHI' : 'bhi_clear' ,
@@ -47,12 +47,11 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
4747 server = 'www.soda-is.com' , timeout = 30 ):
4848 """
4949 Retrieve time-series of radiation and/or clear-sky global, beam, and
50- diffuse radiation from CAMS. Data from CAMS Radiation [1]_ and CAMS McClear
51- [2]_ are retrieved from SoDa [3]_.
50+ diffuse radiation from CAMS (see [1]_). Data is retrieved from SoDa [2]_.
5251
5352 Time coverage: 2004-01-01 to two days ago
5453
55- Access: free, but requires registration, see [1 ]_
54+ Access: free, but requires registration, see [2 ]_
5655
5756 Requests: max. 100 per day
5857 Geographical coverage: worldwide for CAMS McClear and approximately -66° to
@@ -91,7 +90,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
9190 all time steps except for '1M' which has a default of 'right'.
9291 map_variables: bool, default: True
9392 When true, renames columns of the DataFrame to pvlib variable names
94- where applicable. See variable CAMS_VARIABLE_MAP .
93+ where applicable. See variable :const:`VARIABLE_MAP` .
9594 server: str, default: 'www.soda-is.com'
9695 Main server (www.soda-is.com) or backup mirror server (pro.soda-is.com)
9796 timeout : int, default: 30
@@ -107,7 +106,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
107106 Notes
108107 -----
109108 In order to use the CAMS services, users must register for a free SoDa
110- account using an email address [1 ]_.
109+ account using an email address [2 ]_.
111110
112111 The returned data DataFrame includes the following fields:
113112
@@ -130,15 +129,14 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
130129 ======================== ====== =========================================
131130
132131 †Parameters only returned if identifier='cams_radiation'. For description
133- of additional output parameters in verbose mode, see [1]_ and [2]_ .
132+ of additional output parameters in verbose mode, see [1]_.
134133
135134 Note that it is recommended to specify the latitude and longitude to at
136135 least the fourth decimal place.
137136
138137 Variables corresponding to standard pvlib variables are renamed,
139- e.g. `sza` becomes `solar_zenith`. See the
140- `pvlib.iotools.cams.CAMS_VARIABLE_MAP` dict for the complete
141- mapping.
138+ e.g. `sza` becomes `solar_zenith`. See variable :const:`VARIABLE_MAP` for
139+ the complete mapping.
142140
143141 See Also
144142 --------
@@ -152,12 +150,10 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
152150
153151 References
154152 ----------
155- .. [1] `CAMS Radiation Service Info
156- <https://www.soda-pro.com/web-services/radiation/cams-radiation-service/info>`_
157- .. [2] `CAMS McClear Service Info
158- <https://www.soda-pro.com/web-services/radiation/cams-mcclear/info>`_
159- .. [3] `CAMS McClear Automatic Access
160- <https://www.soda-pro.com/help/cams-services/cams-mcclear-service/automatic-access>`_
153+ .. [1] `CAMS solar radiation documentation
154+ <https://atmosphere.copernicus.eu/solar-radiation>`_
155+ .. [2] `CAMS Radiation Automatic Access (SoDa)
156+ <https://www.soda-pro.com/help/cams-services/cams-radiation-service/automatic-access>`_
161157 """
162158 try :
163159 time_step_str = TIME_STEPS_MAP [time_step ]
@@ -233,7 +229,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
233229def parse_cams (fbuf , integrated = False , label = None , map_variables = True ):
234230 """
235231 Parse a file-like buffer with data in the format of a CAMS Radiation or
236- McClear file. The CAMS services are described in [1]_ and [2 ]_.
232+ McClear file. The CAMS solar radiation services are described in [1]_.
237233
238234 Parameters
239235 ----------
@@ -247,7 +243,7 @@ def parse_cams(fbuf, integrated=False, label=None, map_variables=True):
247243 all time steps except for '1M' which has a default of 'right'.
248244 map_variables: bool, default: True
249245 When true, renames columns of the Dataframe to pvlib variable names
250- where applicable. See variable CAMS_VARIABLE_MAP .
246+ where applicable. See variable :const:`VARIABLE_MAP` .
251247
252248 Returns
253249 -------
@@ -262,10 +258,8 @@ def parse_cams(fbuf, integrated=False, label=None, map_variables=True):
262258
263259 References
264260 ----------
265- .. [1] `CAMS Radiation Service Info
266- <https://www.soda-pro.com/web-services/radiation/cams-radiation-service/info>`_
267- .. [2] `CAMS McClear Service Info
268- <https://www.soda-pro.com/web-services/radiation/cams-mcclear/info>`_
261+ .. [1] `CAMS solar radiation documentation
262+ <https://atmosphere.copernicus.eu/solar-radiation>`_
269263 """
270264 metadata = {}
271265 # Initial lines starting with # contain metadata
@@ -327,15 +321,16 @@ def parse_cams(fbuf, integrated=False, label=None, map_variables=True):
327321 TIME_STEPS_IN_HOURS [time_step ])
328322 data .index .name = None # Set index name to None
329323 if map_variables :
330- data = data .rename (columns = CAMS_VARIABLE_MAP )
324+ data = data .rename (columns = VARIABLE_MAP )
331325
332326 return data , metadata
333327
334328
335329def read_cams (filename , integrated = False , label = None , map_variables = True ):
336330 """
337- Read a CAMS Radiation or McClear file into a pandas DataFrame. CAMS
338- radiation and McClear are described in [1]_ and [2]_, respectively.
331+ Read a CAMS Radiation or McClear file into a pandas DataFrame.
332+
333+ CAMS Radiation and McClear are described in [1]_.
339334
340335 Parameters
341336 ----------
@@ -349,7 +344,7 @@ def read_cams(filename, integrated=False, label=None, map_variables=True):
349344 all time steps except for '1M' which has a default of 'right'.
350345 map_variables: bool, default: True
351346 When true, renames columns of the Dataframe to pvlib variable names
352- where applicable. See variable CAMS_VARIABLE_MAP .
347+ where applicable. See variable VARIABLE_MAP .
353348
354349 Returns
355350 -------
@@ -365,10 +360,8 @@ def read_cams(filename, integrated=False, label=None, map_variables=True):
365360
366361 References
367362 ----------
368- .. [1] `CAMS Radiation Service Info
369- <https://www.soda-pro.com/web-services/radiation/cams-radiation-service/info>`_
370- .. [2] `CAMS McClear Service Info
371- <https://www.soda-pro.com/web-services/radiation/cams-mcclear/info>`_
363+ .. [1] `CAMS solar radiation documentation
364+ <https://atmosphere.copernicus.eu/solar-radiation>`_
372365 """
373366 with open (str (filename ), 'r' ) as fbuf :
374367 content = parse_cams (fbuf , integrated , label , map_variables )
0 commit comments