|
9 | 9 | import warnings
|
10 | 10 | from pvlib import tools
|
11 | 11 |
|
12 |
| -from pvlib._deprecation import deprecated |
| 12 | +from pvlib._deprecation import deprecated, renamed_kwarg_warning |
13 | 13 |
|
14 | 14 | URL = 'api.soda-solardata.com'
|
15 | 15 |
|
|
45 | 45 | '0 year 1 month 0 day 0 h 0 min 0 s': '1M'}
|
46 | 46 |
|
47 | 47 |
|
| 48 | +@renamed_kwarg_warning( |
| 49 | + since='0.13.0', |
| 50 | + old_param_name='server', |
| 51 | + new_param_name='url', |
| 52 | + removal="0.14.0") |
48 | 53 | def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
|
49 | 54 | altitude=None, time_step='1h', time_ref='UT', verbose=False,
|
50 | 55 | integrated=False, label=None, map_variables=True,
|
51 |
| - server=URL, timeout=30): |
| 56 | + url=URL, timeout=30): |
52 | 57 | """Retrieve irradiance and clear-sky time series from CAMS.
|
53 | 58 |
|
54 | 59 | Time-series of radiation and/or clear-sky global, beam, and
|
@@ -98,7 +103,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
|
98 | 103 | map_variables: bool, default: True
|
99 | 104 | When true, renames columns of the DataFrame to pvlib variable names
|
100 | 105 | where applicable. See variable :const:`VARIABLE_MAP`.
|
101 |
| - server: str, default: :const:`pvlib.iotools.sodapro.URL` |
| 106 | + url: str, default: :const:`pvlib.iotools.sodapro.URL` |
102 | 107 | Base url of the SoDa Pro CAMS Radiation API.
|
103 | 108 | timeout : int, default: 30
|
104 | 109 | Time in seconds to wait for server response before timeout
|
@@ -199,7 +204,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
|
199 | 204 | email = email.replace('@', '%2540') # Format email address
|
200 | 205 | identifier = 'get_{}'.format(identifier.lower()) # Format identifier str
|
201 | 206 |
|
202 |
| - base_url = f"https://{server}/service/wps" |
| 207 | + base_url = f"https://{url}/service/wps" |
203 | 208 |
|
204 | 209 | data_inputs_dict = {
|
205 | 210 | 'latitude': latitude,
|
|
0 commit comments