Skip to content

port MATLAB PVLIB's Boyle/Coello soiling model to python #739

Closed

Description

@wholmgren

Activity

  1. added this to the Someday milestone on Jun 24, 2019
  2. alexandermorgan commented on Jul 19, 2019

    @alexandermorgan
    Contributor

    I would like to participate in this issue. Is there a preference as to which model to implement first, i.e. Kimber Dynamic or Boyle/Coello? I could start by doing a pandas rewrite of the code @mikofski shared in issue #669. Mark's code was very clear and in Python, so maybe it's easiest to start with the Kimber Dynamic method.

  3. nappaillav commented on Jan 8, 2020

    @nappaillav
    Contributor

    Hello
    As per the suggestion of @cwhanse, I have started working on, porting of the code from Matlab to python. I have taken reference from pvl_soiling_hsu.m code.
    I have few doubts like should I reproduce the whole Matlab code (both pvl_soiling_hsu and depo_velocity or just the depo_velocity).

  4. DanRiley commented on Jan 8, 2020

    @DanRiley

    @nappaillav If you have questions when porting any part of the Humboldt State University (HSU) code, feel free to contact me. I worked on developing that code from the code that was sent to me by the paper authors.

    I recommend reproducing the entirety of the MATLAB code. The internal function depo_velocity is used by the variable deposition form of the model, but requires everything in pvl_soiling_hsu.m in order to correctly model the soil impact.

  5. cwhanse commented on Jan 8, 2020

    @cwhanse
    Member

    I think the expected behavior should be soiling_ratio = f(inputs), as pvl_soiling_hsu.m does. The MATLAB input ModelType selects the soiling deposition model from 3 options (option 1 uses delo_velocity helper function), I'd default to ModelType=2.

    FYI: the paper authors requested us to name the function with HSU rather than a last name. It would be nice that this function become known as the Humboldt State University soiling model to honor their request.

  6. nappaillav commented on Jan 8, 2020

    @nappaillav
    Contributor

    Thanks for the reply @cwhanse @DanRiley
    I'm trying to handle the argparse in python similar to matlab.
    Else I have a complete code ported in python. Apart from that I'm yet to test the functions.
    Hence It would be great if you can provide me with some test data which I can use to see if the python code reproduces the same values as the Matlab HSU code.

  7. cwhanse commented on Jan 8, 2020

    @cwhanse
    Member

    I wouldn't work too hard to imitate the MATLAB argument parsing. You can take defaults from the MATLAB function's Optional inputs. I wouldn't port the validation rules; rather, describe the value restrictions in the docstring.

    @DanRiley do you have a few sets of test data?

  8. modified the milestones: Someday, 0.7.1 on May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions