# Calculating DNI, DHI and GHI given POA

• matan
• Topic Author
01 Jul 2020 21:30 #8376 by matan
Hello,

I am hoping to figure out a way to convert POA to DNI, DHI and GHI. Looking at the irradproc pySAM module  nrel-pysam.readthedocs.io/en/2.0.2/modules/Irradproc.html , it seems like you can convert between the three following irradiance scenarios: [Beam+Diff,Global+Beam, Global+Diff].

Based off the functionality of the "detailed pv" model, the cmod_pvsamv1.cpp and  cmod_irradproc.cpp source code, I feel like irradproc should support another scenario, POA only? Is the python wrapped built around a different version of irradproc then is used by pvsamv1?

Best,

Matan Guttmann

Please Log in or Create an account to join the conversation.

• pgilman
02 Jul 2020 20:54 #8382 by pgilman
Replied by pgilman on topic Calculating DNI, DHI and GHI given POA
Hi Matan,

The irrad_mode input of the pvsamv1 module determines the irradiance components that the model uses as input:

1 = beam and diffuse
2 = total and beam
3 = poa from reference cell
4 = poa from pyranometer

If you set irrad_mode = 3 (or 4) and provide a poa column either in the weather file or in the solar_resource_data table, pvsamv1 will calculate DNI and DHI values from the POA data.

The source code for the POA decomposition model is in lib_irradproc.cpp file, which is confusingly named similarly to the source code for the irradproc module, cmod_irradproc.cpp.

You can use SAM's code generator to generate inputs pvsamv1, set irrad_mode = 3 or irrad_mode = 4 and provide POA data as input. When you run the module, the outputs dn_calc and df_calc should be the calculated DNI and DHI, respectively in W/m2.

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

• matan
• Topic Author
02 Jul 2020 21:05 #8383 by matan
Replied by matan on topic Calculating DNI, DHI and GHI given POA
Hello Paul,

Thank you for your reply. Is there a python wrapper for lib_irradproc.cpp ? Ideally I would like to be able to only access the functionality of being able to calculate other irradiance values from any of:

1 = beam and diffuse
2 = total and beam
3 = poa from reference cell
4 = poa from pyranometer

Thank you,

Matan

Please Log in or Create an account to join the conversation.

• pgilman
02 Jul 2020 22:16 #8387 by pgilman
Replied by pgilman on topic Calculating DNI, DHI and GHI given POA
Hi Matan,

For now, the only way to decompose POA irradiance into its DNI and DHI components is by running the pvsamv1 module. Unfortunately, there is not a separate "irradproc" module.

If you would like to request one as a new feature, please do so in the SSC GitHub repository:

github.com/NREL/ssc/issues/new/choose

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

Moderators: pgilman