@@ -57,7 +57,7 @@ def test_get_nsrdb_psm4_tmy(nrel_api_key):
57
57
"""test get_nsrdb_psm4_tmy with a TMY"""
58
58
data , metadata = psm4 .get_nsrdb_psm4_tmy (LATITUDE , LONGITUDE ,
59
59
nrel_api_key , PVLIB_EMAIL ,
60
- names = 'tmy-2023' ,
60
+ year = 'tmy-2023' ,
61
61
leap_day = False ,
62
62
map_variables = False )
63
63
expected = pd .read_csv (TMY_TEST_DATA )
@@ -71,7 +71,7 @@ def test_get_nsrdb_psm4_conus_singleyear(nrel_api_key):
71
71
data , metadata = psm4 .get_nsrdb_psm4_aggregated (LATITUDE , LONGITUDE ,
72
72
nrel_api_key ,
73
73
PVLIB_EMAIL ,
74
- names = '2023' ,
74
+ year = '2023' ,
75
75
leap_day = False ,
76
76
map_variables = False ,
77
77
interval = 30 )
@@ -85,7 +85,7 @@ def test_get_nsrdb_psm4_conus_5min(nrel_api_key):
85
85
"""test get_nsrdb_psm4_conus for 5-minute data"""
86
86
data , metadata = psm4 .get_nsrdb_psm4_conus (LATITUDE , LONGITUDE ,
87
87
nrel_api_key , PVLIB_EMAIL ,
88
- names = '2023' , interval = 5 ,
88
+ year = '2023' , interval = 5 ,
89
89
leap_day = False ,
90
90
map_variables = False )
91
91
assert len (data ) == 525600 / 5
@@ -100,13 +100,13 @@ def test_get_nsrdb_psm4_aggregated_check_leap_day(nrel_api_key):
100
100
"""test get_nsrdb_psm4_aggregated for leap day"""
101
101
data_2012 , _ = psm4 .get_nsrdb_psm4_aggregated (LATITUDE , LONGITUDE ,
102
102
nrel_api_key , PVLIB_EMAIL ,
103
- names = "2012" , interval = 60 ,
103
+ year = "2012" , interval = 60 ,
104
104
leap_day = True ,
105
105
map_variables = False )
106
106
assert len (data_2012 ) == (8760 + 24 )
107
107
108
108
109
- @pytest .mark .parametrize ('latitude, longitude, api_key, names , interval' ,
109
+ @pytest .mark .parametrize ('latitude, longitude, api_key, year , interval' ,
110
110
[(LATITUDE , LONGITUDE , 'BAD' , '2023' , 60 ),
111
111
(51 , - 5 , nrel_api_key , '2023' , 60 ),
112
112
(LATITUDE , LONGITUDE , nrel_api_key , 'bad' , 60 ),
@@ -115,7 +115,7 @@ def test_get_nsrdb_psm4_aggregated_check_leap_day(nrel_api_key):
115
115
@pytest .mark .remote_data
116
116
@pytest .mark .flaky (reruns = RERUNS , reruns_delay = RERUNS_DELAY )
117
117
def test_get_nsrdb_psm4_aggregated_errors (
118
- latitude , longitude , api_key , names , interval
118
+ latitude , longitude , api_key , year , interval
119
119
):
120
120
"""Test get_nsrdb_psm4_aggregated() for multiple erroneous input scenarios.
121
121
@@ -127,7 +127,7 @@ def test_get_nsrdb_psm4_aggregated_errors(
127
127
"""
128
128
with pytest .raises (HTTPError ) as excinfo :
129
129
psm4 .get_nsrdb_psm4_aggregated (latitude , longitude , api_key ,
130
- PVLIB_EMAIL , names = names ,
130
+ PVLIB_EMAIL , year = year ,
131
131
interval = interval , leap_day = False ,
132
132
map_variables = False )
133
133
# ensure the HTTPError caught isn't due to overuse of the API key
@@ -162,12 +162,11 @@ def test_read_nsrdb_psm4_map_variables():
162
162
"""test read_nsrdb_psm4 map_variables=True"""
163
163
data , metadata = psm4 .read_nsrdb_psm4 (MANUAL_TEST_DATA , map_variables = True )
164
164
columns_mapped = ['Year' , 'Month' , 'Day' , 'Hour' , 'Minute' , 'temp_air' ,
165
- 'alpha' , 'aod' , 'asymmetry' , 'dhi_clear' , 'dni_clear' ,
166
- 'ghi_clear' , 'Cloud Fill Flag' , 'Cloud Type' ,
167
- 'temp_dew' , 'dhi' , 'dni' , 'Fill Flag' , 'ghi' , 'Ozone' ,
168
- 'relative_humidity' , 'solar_zenith' , 'SSA' , 'albedo' ,
169
- 'pressure' , 'precipitable_water' , 'wind_direction' ,
170
- 'wind_speed' ]
165
+ 'aod' , 'dhi_clear' , 'dni_clear' , 'ghi_clear' ,
166
+ 'Cloud Fill Flag' , 'Cloud Type' , 'temp_dew' , 'dhi' ,
167
+ 'dni' , 'Fill Flag' , 'ghi' , 'Ozone' , 'relative_humidity' ,
168
+ 'solar_zenith' , 'SSA' , 'albedo' , 'pressure' ,
169
+ 'precipitable_water' , 'wind_direction' , 'wind_speed' ]
171
170
assert_index_equal (data .columns , pd .Index (columns_mapped ))
172
171
173
172
@@ -177,7 +176,7 @@ def test_get_nsrdb_psm4_aggregated_attribute_mapping(nrel_api_key):
177
176
"""Test that pvlib names can be passed in as attributes and get correctly
178
177
reverse mapped to psm4 names"""
179
178
data , meta = psm4 .get_nsrdb_psm4_aggregated (
180
- LATITUDE , LONGITUDE , nrel_api_key , PVLIB_EMAIL , names = '2019' ,
179
+ LATITUDE , LONGITUDE , nrel_api_key , PVLIB_EMAIL , year = '2019' ,
181
180
interval = 60 , attributes = ['ghi' , 'wind_speed' ], leap_day = False ,
182
181
map_variables = True )
183
182
# Check that columns are in the correct order (GH1647)
0 commit comments