@@ -94,21 +94,32 @@ def test_eff_gap():
94
94
# assert expected_result_l2 == pytest.approx(result_l2, abs=1e-5)
95
95
96
96
97
- def test_T98 ():
98
- weather_db = 'PVGIS' #This pulls data for most of the world.
99
- weather_id = (24.7136 , 46.6753 ) #Riyadh, Saudi Arabia
100
- #weather_id = (35.6754, 139.65) #Tokyo, Japan
101
- weather_arg = {'map_variables' : True }
102
- WEATHER_df , META = pvdeg .weather .get (weather_db , weather_id )
103
- df , meta_data = pvdeg .weather .read (
97
+ def test_T98_Xmin ():
98
+
99
+ WEATHER_df , META = pvdeg .weather .read (
104
100
os .path .join (TEST_DATA_DIR , "psm3_pytest.csv" ),"csv"
105
101
)
106
102
standoff = pvdeg .standards .standoff (weather_df = WEATHER_df , meta = META )
107
103
standoff_1 = pvdeg .standards .standoff (weather_df = WEATHER_df , meta = META ,
108
104
T98 = 70 , tilt = META ['latitude' ], azimuth = None ,
109
105
sky_model = 'isotropic' , temp_model = 'sapm' , conf_0 = 'insulated_back_glass_polymer' , conf_inf = 'open_rack_glass_polymer' ,
110
106
x_0 = 6.5 , wind_factor = 0.33 )
111
- assert standoff .x [0 ]== pytest .approx (9.261615 )
112
- assert standoff .T98_0 [0 ]== pytest .approx (89.5806502251565 )
113
- assert standoff .T98_inf [0 ]== pytest .approx (63.79827740597881 )
107
+ assert standoff .x [0 ]== pytest .approx (2.008636 )
108
+ assert standoff .T98_0 [0 ]== pytest .approx (77.038644 )
109
+ assert standoff .T98_inf [0 ]== pytest .approx (50.561112 )
110
+ kwarg_x = dict ( sky_model = "isotropic" ,
111
+ temp_model = "sapm" ,
112
+ conf_0 = "insulated_back_glass_polymer" ,
113
+ conf_inf = "open_rack_glass_polymer" ,
114
+ T98 = 70 ,
115
+ x_0 = 6.5 ,
116
+ wind_factor = 0.33 )
117
+ x_azimuth_step = 45
118
+ x_tilt_step = 45
119
+ standoff_series = pvdeg .utilities .tilt_azimuth_scan (weather_df = WEATHER_df , meta = META ,
120
+ tilt_step = x_tilt_step , azimuth_step = x_azimuth_step , func = pvdeg .standards .standoff_x , ** kwarg_x )
121
+ print (standoff_series )
122
+ print (WEATHER_df )
123
+ print (META )
124
+ assert standoff_series [13 ,2 ]== pytest .approx (1.92868166 )
114
125
0 commit comments