From af6e8ae6202e3dcc97d7c8eb96775ce43d0245ee Mon Sep 17 00:00:00 2001 From: ayushjariyal Date: Fri, 7 Feb 2025 19:52:55 +0530 Subject: [PATCH 1/3] solve issue 2377 --- pvlib/iotools/psm3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/iotools/psm3.py b/pvlib/iotools/psm3.py index 34199b4c34..92ebbeb734 100644 --- a/pvlib/iotools/psm3.py +++ b/pvlib/iotools/psm3.py @@ -49,7 +49,7 @@ 'ghi_clear': 'clearsky_ghi', 'dhi_clear': 'clearsky_dhi', 'dni_clear': 'clearsky_dni', - 'zenith': 'solar_zenith_angle', + 'solar_zenith': 'solar_zenith_angle', 'temp_air': 'air_temperature', 'temp_dew': 'dew_point', 'relative_humidity': 'relative_humidity', From bc82aa59681213989b3a8f076fc645a362a6bc29 Mon Sep 17 00:00:00 2001 From: ayushjariyal Date: Thu, 13 Feb 2025 15:19:42 +0530 Subject: [PATCH 2/3] add checks for all mapped variables --- pvlib/tests/iotools/test_psm3.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pvlib/tests/iotools/test_psm3.py b/pvlib/tests/iotools/test_psm3.py index b68671696b..cac6f98880 100644 --- a/pvlib/tests/iotools/test_psm3.py +++ b/pvlib/tests/iotools/test_psm3.py @@ -171,11 +171,11 @@ def test_read_psm3_map_variables(): """test read_psm3 map_variables=True""" data, metadata = psm3.read_psm3(MANUAL_TEST_DATA, map_variables=True) columns_mapped = ['Year', 'Month', 'Day', 'Hour', 'Minute', 'dhi', 'ghi', - 'dni', 'ghi_clear', 'dhi_clear', 'dni_clear', - 'Cloud Type', 'temp_dew', 'solar_zenith', - 'Fill Flag', 'albedo', 'wind_speed', - 'wind_direction', 'precipitable_water', - 'relative_humidity', 'temp_air', 'pressure'] + 'dni', 'ghi_clear', 'dhi_clear', 'dni_clear', + 'Cloud Type', 'temp_dew', 'solar_zenith', + 'Fill Flag', 'albedo', 'wind_speed', + 'wind_direction', 'precipitable_water', + 'relative_humidity', 'temp_air', 'pressure'] data, metadata = psm3.read_psm3(MANUAL_TEST_DATA, map_variables=True) assert_index_equal(data.columns, pd.Index(columns_mapped)) From f1ef836c9e27e06f3e2932d17c37580f0f3666cb Mon Sep 17 00:00:00 2001 From: ayushjariyal Date: Thu, 13 Feb 2025 15:26:00 +0530 Subject: [PATCH 3/3] fix code to pass all checks --- pvlib/tests/iotools/test_psm3.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pvlib/tests/iotools/test_psm3.py b/pvlib/tests/iotools/test_psm3.py index cac6f98880..b68671696b 100644 --- a/pvlib/tests/iotools/test_psm3.py +++ b/pvlib/tests/iotools/test_psm3.py @@ -171,11 +171,11 @@ def test_read_psm3_map_variables(): """test read_psm3 map_variables=True""" data, metadata = psm3.read_psm3(MANUAL_TEST_DATA, map_variables=True) columns_mapped = ['Year', 'Month', 'Day', 'Hour', 'Minute', 'dhi', 'ghi', - 'dni', 'ghi_clear', 'dhi_clear', 'dni_clear', - 'Cloud Type', 'temp_dew', 'solar_zenith', - 'Fill Flag', 'albedo', 'wind_speed', - 'wind_direction', 'precipitable_water', - 'relative_humidity', 'temp_air', 'pressure'] + 'dni', 'ghi_clear', 'dhi_clear', 'dni_clear', + 'Cloud Type', 'temp_dew', 'solar_zenith', + 'Fill Flag', 'albedo', 'wind_speed', + 'wind_direction', 'precipitable_water', + 'relative_humidity', 'temp_air', 'pressure'] data, metadata = psm3.read_psm3(MANUAL_TEST_DATA, map_variables=True) assert_index_equal(data.columns, pd.Index(columns_mapped))