@@ -392,7 +392,7 @@ def read_pvgis_hourly(filename, pvgis_format=None, map_variables=True):
392
392
393
393
def get_pvgis_tmy (latitude , longitude , outputformat = 'json' , usehorizon = True ,
394
394
userhorizon = None , startyear = None , endyear = None , url = URL ,
395
- map_variables = None , timeout = 30 ):
395
+ map_variables = True , timeout = 30 ):
396
396
"""
397
397
Get TMY data from PVGIS.
398
398
@@ -420,9 +420,9 @@ def get_pvgis_tmy(latitude, longitude, outputformat='json', usehorizon=True,
420
420
last year to calculate TMY, must be at least 10 years from first year
421
421
url : str, default: :const:`pvlib.iotools.pvgis.URL`
422
422
base url of PVGIS API, append ``tmy`` to get TMY endpoint
423
- map_variables: bool
423
+ map_variables: bool, default True
424
424
When true, renames columns of the Dataframe to pvlib variable names
425
- where applicable. See variable const:`VARIABLE_MAP`.
425
+ where applicable. See variable : const:`VARIABLE_MAP`.
426
426
timeout : int, default 30
427
427
time in seconds to wait for server response before timeout
428
428
@@ -508,14 +508,6 @@ def get_pvgis_tmy(latitude, longitude, outputformat='json', usehorizon=True,
508
508
# the response is HTTP/1.1 400 BAD REQUEST which is handled earlier
509
509
pass
510
510
511
- if map_variables is None :
512
- warnings .warn (
513
- 'PVGIS variable names will be renamed to pvlib conventions by '
514
- 'default starting in pvlib 0.10.0. Specify map_variables=True '
515
- 'to enable that behavior now, or specify map_variables=False '
516
- 'to hide this warning.' , pvlibDeprecationWarning
517
- )
518
- map_variables = False
519
511
if map_variables :
520
512
data = data .rename (columns = VARIABLE_MAP )
521
513
@@ -573,7 +565,7 @@ def _parse_pvgis_tmy_basic(src):
573
565
return data , None , None , None
574
566
575
567
576
- def read_pvgis_tmy (filename , pvgis_format = None , map_variables = None ):
568
+ def read_pvgis_tmy (filename , pvgis_format = None , map_variables = True ):
577
569
"""
578
570
Read a file downloaded from PVGIS.
579
571
@@ -589,7 +581,7 @@ def read_pvgis_tmy(filename, pvgis_format=None, map_variables=None):
589
581
``outputformat='basic'``, please set ``pvgis_format`` to ``'basic'``.
590
582
If ``filename`` is a buffer, then ``pvgis_format`` is required and must
591
583
be in ``['csv', 'epw', 'json', 'basic']``.
592
- map_variables: bool
584
+ map_variables: bool, default True
593
585
When true, renames columns of the Dataframe to pvlib variable names
594
586
where applicable. See variable :const:`VARIABLE_MAP`.
595
587
@@ -671,14 +663,6 @@ def read_pvgis_tmy(filename, pvgis_format=None, map_variables=None):
671
663
"'csv', or 'basic'" ).format (outputformat )
672
664
raise ValueError (err_msg )
673
665
674
- if map_variables is None :
675
- warnings .warn (
676
- 'PVGIS variable names will be renamed to pvlib conventions by '
677
- 'default starting in pvlib 0.10.0. Specify map_variables=True '
678
- 'to enable that behavior now, or specify map_variables=False '
679
- 'to hide this warning.' , pvlibDeprecationWarning
680
- )
681
- map_variables = False
682
666
if map_variables :
683
667
data = data .rename (columns = VARIABLE_MAP )
684
668
0 commit comments