@@ -105,13 +105,8 @@ def test_eff_gap():
105
105
# assert expected_result_l2 == pytest.approx(result_l2, abs=1e-5)
106
106
107
107
108
- def test_T98 ():
109
- weather_db = "PVGIS" # This pulls data for most of the world.
110
- weather_id = (24.7136 , 46.6753 ) # Riyadh, Saudi Arabia
111
- # weather_id = (35.6754, 139.65) #Tokyo, Japan
112
- weather_arg = {"map_variables" : True }
113
- WEATHER_df , META = pvdeg .weather .get (weather_db , weather_id )
114
- df , meta_data = pvdeg .weather .read (
108
+ def test_T98_Xmin ():
109
+ WEATHER_df , META = pvdeg .weather .read (
115
110
os .path .join (TEST_DATA_DIR , "psm3_pytest.csv" ), "csv"
116
111
)
117
112
standoff = pvdeg .standards .standoff (weather_df = WEATHER_df , meta = META )
@@ -128,6 +123,29 @@ def test_T98():
128
123
x_0 = 6.5 ,
129
124
wind_factor = 0.33 ,
130
125
)
131
- assert standoff .x [0 ] == pytest .approx (9.261615 )
132
- assert standoff .T98_0 [0 ] == pytest .approx (89.5806502251565 )
133
- assert standoff .T98_inf [0 ] == pytest .approx (63.79827740597881 )
126
+ assert standoff .x [0 ] == pytest .approx (2.008636 )
127
+ assert standoff .T98_0 [0 ] == pytest .approx (77.038644 )
128
+ assert standoff .T98_inf [0 ] == pytest .approx (50.561112 )
129
+ kwarg_x = dict (
130
+ sky_model = "isotropic" ,
131
+ temp_model = "sapm" ,
132
+ conf_0 = "insulated_back_glass_polymer" ,
133
+ conf_inf = "open_rack_glass_polymer" ,
134
+ T98 = 70 ,
135
+ x_0 = 6.5 ,
136
+ wind_factor = 0.33 ,
137
+ )
138
+ x_azimuth_step = 45
139
+ x_tilt_step = 45
140
+ standoff_series = pvdeg .utilities .tilt_azimuth_scan (
141
+ weather_df = WEATHER_df ,
142
+ meta = META ,
143
+ tilt_step = x_tilt_step ,
144
+ azimuth_step = x_azimuth_step ,
145
+ func = pvdeg .standards .standoff_x ,
146
+ ** kwarg_x ,
147
+ )
148
+ print (standoff_series )
149
+ print (WEATHER_df )
150
+ print (META )
151
+ assert standoff_series [13 , 2 ] == pytest .approx (1.92868166 )
0 commit comments