6363
6464def get_psm3 (latitude , longitude , api_key , email , names = 'tmy' , interval = 60 ,
6565 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 ,
6767 timeout = 30 ):
6868 """
6969 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,
105105 for lists of available fields. Alternatively, pvlib names may also be
106106 used (e.g. 'ghi' rather than 'GHI'); see :const:`REQUEST_VARIABLE_MAP`.
107107 To retrieve all available fields, set ``attributes=[]``.
108- leap_day : boolean , default : True
108+ leap_day : bool , default : True
109109 include leap day in the results. Only used for single-year requests
110110 (i.e., it is ignored for tmy/tgy/tdy requests).
111111 full_name : str, default 'pvlib python'
112112 optional
113113 affiliation : str, default 'pvlib python'
114114 optional
115- map_variables : boolean, optional
115+ map_variables : bool, default True
116116 When true, renames columns of the Dataframe to pvlib variable names
117117 where applicable. See variable :const:`VARIABLE_MAP`.
118118 url : str, optional
@@ -219,7 +219,7 @@ def get_psm3(latitude, longitude, api_key, email, names='tmy', interval=60,
219219 return parse_psm3 (fbuf , map_variables )
220220
221221
222- def parse_psm3 (fbuf , map_variables = None ):
222+ def parse_psm3 (fbuf , map_variables = True ):
223223 """
224224 Parse an NSRDB PSM3 weather file (formatted as SAM CSV). The NSRDB
225225 is described in [1]_ and the SAM CSV format is described in [2]_.
@@ -233,9 +233,9 @@ def parse_psm3(fbuf, map_variables=None):
233233 ----------
234234 fbuf: file-like object
235235 File-like object containing data to read.
236- map_variables: bool
236+ map_variables: bool, default True
237237 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` .
239239
240240 Returns
241241 -------
@@ -348,13 +348,6 @@ def parse_psm3(fbuf, map_variables=None):
348348 tz = 'Etc/GMT%+d' % - metadata ['Time Zone' ]
349349 data .index = pd .DatetimeIndex (dtidx ).tz_localize (tz )
350350
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
358351 if map_variables :
359352 data = data .rename (columns = VARIABLE_MAP )
360353 metadata ['latitude' ] = metadata .pop ('Latitude' )
@@ -364,7 +357,7 @@ def parse_psm3(fbuf, map_variables=None):
364357 return data , metadata
365358
366359
367- def read_psm3 (filename , map_variables = None ):
360+ def read_psm3 (filename , map_variables = True ):
368361 """
369362 Read an NSRDB PSM3 weather file (formatted as SAM CSV). The NSRDB
370363 is described in [1]_ and the SAM CSV format is described in [2]_.
@@ -378,9 +371,9 @@ def read_psm3(filename, map_variables=None):
378371 ----------
379372 filename: str
380373 Filename of a file containing data to read.
381- map_variables: bool
374+ map_variables: bool, default True
382375 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` .
384377
385378 Returns
386379 -------
0 commit comments