pvsystem.sapm expected effective_irradiance in units of suns (1 sun = 1000 W/m2). pvsystem.calcparams_desoto expects effective_irradiance in W/m2. I want to change to consistent units for effective irradiance.
Preferences for suns or W/m2?
It seems like the Desoto quantity is an actual broadband total irradiance, possibly normalized but not "effective"---poa_global with irrad_ref in pvlib or S or S/Sref here, while the unitless SAPM quantity seems more properly called an "effective" irradiance as a ratio of currents.
Also, calling this "effective irradiance" might be confused with the G_{eff} appearing in the DeSoto's master's thesis, which appears to have a different definition.
It appears above that I misunderstood the definition of the parameter S (it is "absorbed", and thus includes some losses). My underlying concern stands though, as it seems that we are struggling with making a consistent function API out of different models that construct "analogous" parameters somewhat differently. Because I am not an everyday user of some/all of DeSoto vs. CEC vs. PVsyst, I don't think I should comment on what is better: consistent API or fidelity to the original model formulation.
I will also point out that my difficulties wrapping my head around these various irradiance definitions is what lead me to yet another formulation of "effective irradiance". This formulation does not eliminate all the various issues either, but in some measurement setups it is significantly easier to reason about.
I would prefer things called "irradiance" to have units of W/m2.
@thunderfish24 we are resolving the conflict about the irradiance input to calcparams_desoto as part of #462 - see my comment on this topic late in the discussion.
As it is now, calcparams_desoto accepts irradiance in W/m2, sapm expects irradiance in suns. If we agree, the change will be to sapm to accept irradiance in W/m2. The suns unit in sapm is likely a holdover from transcribing PVLib for matlab to python.
The original sapm report uses suns too. Maybe there is a role for an effective_irradiance_factor to link the two.
That's an idea. If we want to retain the units published for each model, I could see implementing a private helper function to convert units based on model. Not sure where it would plug into the model chain workflow, though.
I prefer effective_irradiance in units of W/m^2. I prefer prepending or appending "normalized" for unitless quantities.
Here another thought out of the left corner. Perhaps these functions should have just irradiance as a parameter, without further details. There is a similar situation with inverters, where it is clear there are some losses between the array and the power electronics, but the input to the inverter is just called p_dc, not p_dc_after_wiring_loss.
@adriesse I think that would be a step back for pvlib in terms of our objective to clarify the component models and their usage. For the inverter example you cite, I'd be inclined to add clarity to the p_dc input.
I admit I didn't have that objective foremost in mind.
For this issue, my plan is to implement effective_irradiance in units of W/m2 for SAPM. I believe these changes will make the use of effective irradiance consistent throughout pvlib:
pvsystem.sapm to expect effective_irradiance in units of W/m2pvsystem.sapm_celltemppvsystem.samp_effective_irradiance to add units to input parameter descriptions.