|
248 | 248 | "source": [
|
249 | 249 | "The two values needed here are the solar zenith (how close the sun is to overhead) and azimuth (what direction along the horizon the sun is, like panel azimuth). The difference between `apparent_zenith` and `zenith` is that `apparent_zenith` includes the effect of atmospheric refraction.\n",
|
250 | 250 | "\n",
|
251 |
| - "Now that we have a time series of solar position that matches our irradiance data, let's run a transposition model. The more complex transposition models like Perez and Hay Davies require additional weather inputs, so for simplicity we'll just use the basic `isotropic` model here. As an example, we'll model a fixed array tilted South at 20 degrees." |
| 251 | + "Now that we have a time series of solar position that matches our irradiance data, let's run a transposition model using the convenient wrapper function [`pvlib.irradiance.get_total_irradiance`](https://pvlib-python.readthedocs.io/en/latest/generated/pvlib.irradiance.get_total_irradiance.html). The more complex transposition models like Perez and Hay Davies require additional weather inputs, so for simplicity we'll just use the basic `isotropic` model here, which is the default if nothing is passed for `model` keyword argument. As an example, we'll model a fixed array tilted south at 20 degrees." |
252 | 252 | ]
|
253 | 253 | },
|
254 | 254 | {
|
|
264 | 264 | "metadata": {},
|
265 | 265 | "outputs": [],
|
266 | 266 | "source": [
|
267 |
| - "df_poa = pvlib.irradiance.get_total_irradiance(surface_tilt=20, # tilted 20 degrees from horizontal\n", |
268 |
| - " surface_azimuth=180, # facing South\n", |
269 |
| - " dni=df_tmy['DNI'],\n", |
270 |
| - " ghi=df_tmy['GHI'],\n", |
271 |
| - " dhi=df_tmy['DHI'],\n", |
272 |
| - " solar_zenith=solar_position['apparent_zenith'],\n", |
273 |
| - " solar_azimuth=solar_position['azimuth'])" |
| 267 | + "df_poa = pvlib.irradiance.get_total_irradiance(\n", |
| 268 | + " surface_tilt=20, # tilted 20 degrees from horizontal\n", |
| 269 | + " surface_azimuth=180, # facing South\n", |
| 270 | + " dni=df_tmy['DNI'],\n", |
| 271 | + " ghi=df_tmy['GHI'],\n", |
| 272 | + " dhi=df_tmy['DHI'],\n", |
| 273 | + " solar_zenith=solar_position['apparent_zenith'],\n", |
| 274 | + " solar_azimuth=solar_position['azimuth'],\n", |
| 275 | + " model='isotropic')" |
274 | 276 | ]
|
275 | 277 | },
|
276 | 278 | {
|
|
434 | 436 | }
|
435 | 437 | ],
|
436 | 438 | "source": [
|
437 |
| - "tracker_data = pvlib.tracking.singleaxis(solar_position['apparent_zenith'],\n", |
438 |
| - " solar_position['azimuth'],\n", |
439 |
| - " axis_azimuth=180, # axis is aligned N-S\n", |
440 |
| - " # leave the rest of the singleaxis parameters as default\n", |
441 |
| - " )\n", |
| 439 | + "tracker_data = pvlib.tracking.singleaxis(\n", |
| 440 | + " solar_position['apparent_zenith'],\n", |
| 441 | + " solar_position['azimuth'],\n", |
| 442 | + " axis_azimuth=180, # axis is aligned N-S\n", |
| 443 | + " ) # leave the rest of the singleaxis parameters like backtrack and gcr at their defaults\n", |
442 | 444 | "tilt = tracker_data['surface_tilt'].fillna(0)\n",
|
443 | 445 | "azimuth = tracker_data['surface_azimuth'].fillna(0)\n",
|
444 | 446 | "\n",
|
|
462 | 464 | "metadata": {},
|
463 | 465 | "outputs": [],
|
464 | 466 | "source": [
|
465 |
| - "df_poa_tracker = pvlib.irradiance.get_total_irradiance(surface_tilt=tilt, # time series for tracking array\n", |
466 |
| - " surface_azimuth=azimuth, # time series for tracking array\n", |
467 |
| - " dni=df_tmy['DNI'],\n", |
468 |
| - " ghi=df_tmy['GHI'],\n", |
469 |
| - " dhi=df_tmy['DHI'],\n", |
470 |
| - " solar_zenith=solar_position['apparent_zenith'],\n", |
471 |
| - " solar_azimuth=solar_position['azimuth'])\n", |
| 467 | + "df_poa_tracker = pvlib.irradiance.get_total_irradiance(\n", |
| 468 | + " surface_tilt=tilt, # time series for tracking array\n", |
| 469 | + " surface_azimuth=azimuth, # time series for tracking array\n", |
| 470 | + " dni=df_tmy['DNI'],\n", |
| 471 | + " ghi=df_tmy['GHI'],\n", |
| 472 | + " dhi=df_tmy['DHI'],\n", |
| 473 | + " solar_zenith=solar_position['apparent_zenith'],\n", |
| 474 | + " solar_azimuth=solar_position['azimuth'])\n", |
472 | 475 | "tracker_poa = df_poa_tracker['poa_global']"
|
473 | 476 | ]
|
474 | 477 | },
|
|
0 commit comments