The diffuse IAM functions currently have inconsistent return types:
marion_diffuse returns a dictionary containing values for the different diffuse components.
martin_ruiz_diffuse and schlick_diffuse return two values corresponding to the sky and ground components.
It would be beneficial for these functions to have a consistent API, making them easier to use interchangeably throughout pvlib (and in users' own workflows). I propose that all three functions ultimately return dictionaries with named diffuse components, matching the behavior of marion_diffuse.
Since this would be a breaking change, it would require a deprecation period, and I'm not sure what the preferred deprecation strategy is for outputs.
In the shorter term, this inconsistency is blocking work for my GSoC project (see #2750 and #2812). As a temporary compatibility measure, one possible approach would be to add an optional keyword argument (defaulting to False) that enables the new dictionary return format. This would allow downstream code to adopt the new interface before the default behavior changes.
The diffuse IAM functions currently have inconsistent return types:
marion_diffusereturns a dictionary containing values for the different diffuse components.martin_ruiz_diffuseandschlick_diffusereturn two values corresponding to the sky and ground components.It would be beneficial for these functions to have a consistent API, making them easier to use interchangeably throughout pvlib (and in users' own workflows). I propose that all three functions ultimately return dictionaries with named diffuse components, matching the behavior of
marion_diffuse.Since this would be a breaking change, it would require a deprecation period, and I'm not sure what the preferred deprecation strategy is for outputs.
In the shorter term, this inconsistency is blocking work for my GSoC project (see #2750 and #2812). As a temporary compatibility measure, one possible approach would be to add an optional keyword argument (defaulting to False) that enables the new dictionary return format. This would allow downstream code to adopt the new interface before the default behavior changes.