Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Developer documentation #96

Open
mattjbr123 opened this issue Jan 26, 2024 · 4 comments
Open

Developer documentation #96

mattjbr123 opened this issue Jan 26, 2024 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@mattjbr123
Copy link
Member

The developers section of the documentation needs to be filled in.
This should contain information on how a developer goes about adding a new component(s) to UNIFHY. I'll probably use my experience to write this.

@mattjbr123 mattjbr123 self-assigned this Jan 26, 2024
@mattjbr123 mattjbr123 added the documentation Improvements or additions to documentation label Jan 26, 2024
@mattjbr123
Copy link
Member Author

mattjbr123 commented Jun 10, 2024

This documentation should cover

  • The basics of adding new transfers to the framework
  • How this impacts (or not) other components
  • How to fully adapt the rest of the framework to account for the new transfers (I think only necessary when new components are added)
  • How to add new components
  • How to fully adapt the rest of the framework (including the tests) to account for the extra components - this could just be a link to the github issue where I document everything I did for now
  • Instructions for testing out your changes locally

@mattjbr123
Copy link
Member Author

mattjbr123 commented Jun 10, 2024

@ThibHlln
In the framework the Components have _inwards_info and _outwards_info attributes, with each specified transfer looking like this:

    _inwards_info = {
        "water_evaporation_flux_from_open_water": {
            "units": "kg m-2 s-1",
            "from": "surfacelayer",
            "method": "mean",
        },
    ...

I'm wondering what the "method" key-value pair is about, given all the transfers have a value of "mean".
I'm writing up some documentation for developers who want to add transfers to the framework, or add completely new components to the framework and I realised I hadn't ever questioned this particular thing!
Thanks as always!

@ThibHlln
Copy link
Member

Hi Matt,

If I remember well, this was me trying to future proof the framework.

In the Exchanger, the method is read and the array being transferred is processed accordingly (see here https://github.com/unifhy-org/unifhy/blob/main/unifhy/_utils/exchanger.py#L303-L322).

So yes, they are all set to method "mean" now, but they could be set to any other option accepted by the Exchanger in the future.

Thibault

@mattjbr123
Copy link
Member Author

Got it, ta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants