63
63
64
64
def get_psm3 (latitude , longitude , api_key , email , names = 'tmy' , interval = 60 ,
65
65
attributes = ATTRIBUTES , leap_day = True , full_name = PVLIB_PYTHON ,
66
- affiliation = PVLIB_PYTHON , map_variables = None , url = None ,
66
+ affiliation = PVLIB_PYTHON , map_variables = True , url = None ,
67
67
timeout = 30 ):
68
68
"""
69
69
Retrieve NSRDB PSM3 timeseries weather data from the PSM3 API. The NSRDB
@@ -105,14 +105,14 @@ def get_psm3(latitude, longitude, api_key, email, names='tmy', interval=60,
105
105
for lists of available fields. Alternatively, pvlib names may also be
106
106
used (e.g. 'ghi' rather than 'GHI'); see :const:`REQUEST_VARIABLE_MAP`.
107
107
To retrieve all available fields, set ``attributes=[]``.
108
- leap_day : boolean , default : True
108
+ leap_day : bool , default : True
109
109
include leap day in the results. Only used for single-year requests
110
110
(i.e., it is ignored for tmy/tgy/tdy requests).
111
111
full_name : str, default 'pvlib python'
112
112
optional
113
113
affiliation : str, default 'pvlib python'
114
114
optional
115
- map_variables : boolean, optional
115
+ map_variables : bool, default True
116
116
When true, renames columns of the Dataframe to pvlib variable names
117
117
where applicable. See variable :const:`VARIABLE_MAP`.
118
118
url : str, optional
@@ -219,7 +219,7 @@ def get_psm3(latitude, longitude, api_key, email, names='tmy', interval=60,
219
219
return parse_psm3 (fbuf , map_variables )
220
220
221
221
222
- def parse_psm3 (fbuf , map_variables = None ):
222
+ def parse_psm3 (fbuf , map_variables = True ):
223
223
"""
224
224
Parse an NSRDB PSM3 weather file (formatted as SAM CSV). The NSRDB
225
225
is described in [1]_ and the SAM CSV format is described in [2]_.
@@ -233,9 +233,9 @@ def parse_psm3(fbuf, map_variables=None):
233
233
----------
234
234
fbuf: file-like object
235
235
File-like object containing data to read.
236
- map_variables: bool
236
+ map_variables: bool, default True
237
237
When true, renames columns of the Dataframe to pvlib variable names
238
- where applicable. See variable VARIABLE_MAP.
238
+ where applicable. See variable :const:` VARIABLE_MAP` .
239
239
240
240
Returns
241
241
-------
@@ -348,13 +348,6 @@ def parse_psm3(fbuf, map_variables=None):
348
348
tz = 'Etc/GMT%+d' % - metadata ['Time Zone' ]
349
349
data .index = pd .DatetimeIndex (dtidx ).tz_localize (tz )
350
350
351
- if map_variables is None :
352
- warnings .warn (
353
- 'PSM3 variable names will be renamed to pvlib conventions by '
354
- 'default starting in pvlib 0.11.0. Specify map_variables=True '
355
- 'to enable that behavior now, or specify map_variables=False '
356
- 'to hide this warning.' , pvlibDeprecationWarning )
357
- map_variables = False
358
351
if map_variables :
359
352
data = data .rename (columns = VARIABLE_MAP )
360
353
metadata ['latitude' ] = metadata .pop ('Latitude' )
@@ -364,7 +357,7 @@ def parse_psm3(fbuf, map_variables=None):
364
357
return data , metadata
365
358
366
359
367
- def read_psm3 (filename , map_variables = None ):
360
+ def read_psm3 (filename , map_variables = True ):
368
361
"""
369
362
Read an NSRDB PSM3 weather file (formatted as SAM CSV). The NSRDB
370
363
is described in [1]_ and the SAM CSV format is described in [2]_.
@@ -378,9 +371,9 @@ def read_psm3(filename, map_variables=None):
378
371
----------
379
372
filename: str
380
373
Filename of a file containing data to read.
381
- map_variables: bool
374
+ map_variables: bool, default True
382
375
When true, renames columns of the Dataframe to pvlib variable names
383
- where applicable. See variable VARIABLE_MAP.
376
+ where applicable. See variable :const:` VARIABLE_MAP` .
384
377
385
378
Returns
386
379
-------
0 commit comments