Skip to content

Commit 07b3917

Browse files
committed
Apply review feedback: update PSM3→PSM4 references and add contributor
- Update narrative comments from 'NSRDB PSM3' to 'NSRDB PSM4' to match the actual function called (get_nsrdb_psm4_conus) - Rename psm3/psm3_metadata variables to psm4/psm4_metadata for consistency with the PSM4 data source - Add Karl Hill to Contributors in v0.15.3 whatsnew Addresses Copilot suggestions (+1 from @cwhanse) on PR #2793.
1 parent dea155f commit 07b3917

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

docs/examples/system-models/oedi_9068.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"""
88
# %%
99
# 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
1111
# and in retrospective analyses where the system’s own irradiance
1212
# measurements are not present or unreliable.
1313
#
@@ -135,15 +135,15 @@
135135
#
136136
# The system does have measured plane-of-array irradiance data, but the
137137
# measurements suffer from row-to-row shading and tracker stalls. In this
138-
# example, we will use weather data taken from the NSRDB PSM3 for the year
138+
# example, we will use weather data taken from the NSRDB PSM4 for the year
139139
# 2019.
140140

141141
api_key = 'DEMO_KEY'
142142
email = 'your_email@domain.com'
143143

144144
keys = ['ghi', 'dni', 'dhi', 'temp_air', 'wind_speed',
145145
'albedo', 'precipitable_water']
146-
psm3, psm3_metadata = pvlib.iotools.get_nsrdb_psm4_conus(latitude, longitude,
146+
psm4, psm4_metadata = pvlib.iotools.get_nsrdb_psm4_conus(latitude, longitude,
147147
api_key, email,
148148
year=2019,
149149
time_step=5,
@@ -168,20 +168,20 @@
168168
# module fraction and returns the average irradiance over the total module
169169
# surface.
170170

171-
solar_position = location.get_solarposition(psm3.index)
171+
solar_position = location.get_solarposition(psm4.index)
172172
tracker_angles = mount.get_orientation(
173173
solar_position['apparent_zenith'],
174174
solar_position['azimuth']
175175
)
176-
dni_extra = pvlib.irradiance.get_extra_radiation(psm3.index)
176+
dni_extra = pvlib.irradiance.get_extra_radiation(psm4.index)
177177

178178
# note: this system is monofacial, so only calculate irradiance for the
179179
# front side:
180180
averaged_irradiance = pvlib.bifacial.infinite_sheds.get_irradiance_poa(
181181
tracker_angles['surface_tilt'], tracker_angles['surface_azimuth'],
182182
solar_position['apparent_zenith'], solar_position['azimuth'],
183183
gcr, axis_height, pitch,
184-
psm3['ghi'], psm3['dhi'], psm3['dni'], psm3['albedo'],
184+
psm4['ghi'], psm4['dhi'], psm4['dni'], psm4['albedo'],
185185
model='haydavies', dni_extra=dni_extra,
186186
)
187187

@@ -192,14 +192,14 @@
192192

193193
cell_temperature_steady_state = pvlib.temperature.faiman(
194194
poa_global=averaged_irradiance['poa_global'],
195-
temp_air=psm3['temp_air'],
196-
wind_speed=psm3['wind_speed'],
195+
temp_air=psm4['temp_air'],
196+
wind_speed=psm4['wind_speed'],
197197
**temperature_model_parameters,
198198
)
199199

200200
cell_temperature = pvlib.temperature.prilliman(
201201
cell_temperature_steady_state,
202-
psm3['wind_speed'],
202+
psm4['wind_speed'],
203203
unit_mass=module_unit_mass
204204
)
205205

@@ -216,7 +216,7 @@
216216
'poa_direct': averaged_irradiance['poa_direct'],
217217
'poa_diffuse': averaged_irradiance['poa_diffuse'],
218218
'cell_temperature': cell_temperature,
219-
'precipitable_water': psm3['precipitable_water'], # for the spectral model
219+
'precipitable_water': psm4['precipitable_water'], # for the spectral model
220220
})
221221
model.run_model_from_poa(weather_inputs)
222222

docs/sphinx/source/whatsnew/v0.15.3.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ Maintenance
4545

4646
Contributors
4747
~~~~~~~~~~~~
48+
* Karl Hill (:ghuser:`karlhillx`)
4849

0 commit comments

Comments
 (0)