|
7 | 7 | """ |
8 | 8 | # %% |
9 | 9 | # This example model uses satellite-based solar resource data from the |
10 | | -# NSRDB PSM3. This approach is useful for pre-construction energy modeling |
| 10 | +# NSRDB PSM4. This approach is useful for pre-construction energy modeling |
11 | 11 | # and in retrospective analyses where the system’s own irradiance |
12 | 12 | # measurements are not present or unreliable. |
13 | 13 | # |
|
142 | 142 | # |
143 | 143 | # The system does have measured plane-of-array irradiance data, but the |
144 | 144 | # measurements suffer from row-to-row shading and tracker stalls. In this |
145 | | -# example, we will use weather data taken from the NSRDB PSM3 for the year |
| 145 | +# example, we will use weather data taken from the NSRDB PSM4 for the year |
146 | 146 | # 2019. |
147 | 147 |
|
148 | 148 | api_key = 'DEMO_KEY' |
149 | 149 | email = 'your_email@domain.com' |
150 | 150 |
|
151 | 151 | keys = ['ghi', 'dni', 'dhi', 'temp_air', 'wind_speed', |
152 | 152 | 'albedo', 'precipitable_water'] |
153 | | -psm3, psm3_metadata = pvlib.iotools.get_nsrdb_psm4_conus(latitude, longitude, |
| 153 | +psm4, psm4_metadata = pvlib.iotools.get_nsrdb_psm4_conus(latitude, longitude, |
154 | 154 | api_key, email, |
155 | | - year=2019, interval=5, |
| 155 | + year=2019, |
| 156 | + time_step=5, |
156 | 157 | parameters=keys, |
157 | 158 | map_variables=True, |
158 | 159 | leap_day=True) |
|
174 | 175 | # module fraction and returns the average irradiance over the total module |
175 | 176 | # surface. |
176 | 177 |
|
177 | | -solar_position = location.get_solarposition(psm3.index) |
| 178 | +solar_position = location.get_solarposition(psm4.index) |
178 | 179 | tracker_angles = mount.get_orientation( |
179 | 180 | solar_position['apparent_zenith'], |
180 | 181 | solar_position['azimuth'] |
181 | 182 | ) |
182 | | -dni_extra = pvlib.irradiance.get_extra_radiation(psm3.index) |
| 183 | +dni_extra = pvlib.irradiance.get_extra_radiation(psm4.index) |
183 | 184 |
|
184 | 185 | # note: this system is monofacial, so only calculate irradiance for the |
185 | 186 | # front side: |
186 | 187 | averaged_irradiance = pvlib.bifacial.infinite_sheds.get_irradiance_poa( |
187 | 188 | tracker_angles['surface_tilt'], tracker_angles['surface_azimuth'], |
188 | 189 | solar_position['apparent_zenith'], solar_position['azimuth'], |
189 | 190 | gcr, axis_height, pitch, |
190 | | - psm3['ghi'], psm3['dhi'], psm3['dni'], psm3['albedo'], |
| 191 | + psm4['ghi'], psm4['dhi'], psm4['dni'], psm4['albedo'], |
191 | 192 | model='haydavies', dni_extra=dni_extra, |
192 | 193 | ) |
193 | 194 |
|
|
198 | 199 |
|
199 | 200 | cell_temperature_steady_state = pvlib.temperature.faiman( |
200 | 201 | poa_global=averaged_irradiance['poa_global'], |
201 | | - temp_air=psm3['temp_air'], |
202 | | - wind_speed=psm3['wind_speed'], |
| 202 | + temp_air=psm4['temp_air'], |
| 203 | + wind_speed=psm4['wind_speed'], |
203 | 204 | **temperature_model_parameters, |
204 | 205 | ) |
205 | 206 |
|
206 | 207 | cell_temperature = pvlib.temperature.prilliman( |
207 | 208 | cell_temperature_steady_state, |
208 | | - psm3['wind_speed'], |
| 209 | + psm4['wind_speed'], |
209 | 210 | unit_mass=module_unit_mass |
210 | 211 | ) |
211 | 212 |
|
|
222 | 223 | 'poa_direct': averaged_irradiance['poa_direct'], |
223 | 224 | 'poa_diffuse': averaged_irradiance['poa_diffuse'], |
224 | 225 | 'cell_temperature': cell_temperature, |
225 | | - 'precipitable_water': psm3['precipitable_water'], # for the spectral model |
| 226 | + 'precipitable_water': psm4['precipitable_water'], # for the spectral model |
226 | 227 | }) |
227 | 228 | model.run_model_from_poa(weather_inputs) |
228 | 229 |
|
|
0 commit comments