Skip to content

irradiance.globalinplane appears redundant with total_irrad #422

Closed

Description

@cwhanse

Suggest removing globalinplane.

Activity

  1. wholmgren commented on Feb 12, 2018

    @wholmgren
    Member

    I think they're different, but I'm struggling to think of a good use case for globalinplane.

    globalinplane computes POA global from modeling intermediates (AOI, DNI, POA diffuse).

    total_irrad computes POA components from more basic information (system specs, solar position, DNI, GHI, DHI).

  2. jforbess commented on Feb 13, 2018

    @jforbess
    Contributor
  3. wholmgren commented on Feb 13, 2018

    @wholmgren
    Member

    total_irrad accepts scalar (fixed) or vector (tracking) surface azimuth and tilt. It does not automatically compute tracking angles, though.

    My post above was a bit misleading. I suggested that globalinplane returns only POA global, but it actually returns POA global, POA direct, and POA diffuse (total). We could probably come up with a better name for globalinplane. Something like poa_components.

    Thinking through this a little more... total_irrad does 3 things:

    First, total_irrad provides a unified interface to the various diffuse sky models. This aspect could be refactored into a separate function (get_diffuse?) and used within total_irrad.

    Second, total_irrad calls the grounddiffuse function.

    Third, total_irrad assembles the POA components into a data structure (DataFrame or OrderedDict). total_irrad could be refactored to use a renamed globalinplane internally. The renamed globalinplane would need to include the sky diffuse and ground diffuse to its output for API consistency.

    So, total_irrad would be reduced to a wrapper for the 3 steps described above. It would not do any calculations itself.

    While we're at it, I'd welcome suggestions for a better name than total_irrad.

  4. cwhanse commented on Feb 13, 2018

    @cwhanse
    MemberAuthor

    I think those ideas are good, reduce total_irrad to a wrapper, and refactor the wrapped functions. My instinctive reaction to 'total_irrad' is 'get_irradiance_components'

    I like function names that start with verbs.

  5. added this to the 0.5.2 milestone on Feb 13, 2018
  6. cwhanse commented on May 7, 2018

    @cwhanse
    MemberAuthor

    Closed via #427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions