unifhy-org / unifhy

A Unified Framework for Hydrology
https://unifhy-org.github.io/unifhy
BSD 3-Clause "New" or "Revised" License
11 stars 5 forks source link

Revise transfers between components #76

Closed ThibHlln closed 2 years ago

ThibHlln commented 2 years ago

Since the dictionaries defining the transfers between components have been populated, the conceptual framework blueprint has evolued, and with lessons learnt from implementating actual components, these standard interfaces have been revised and refined.

This PR updates the _inwards_info and _outwards_info dictionaries for the three framework components SurfaceLayerComponent, SubSurfaceComponent, and OpenWaterComponent. The transfers names are also made closer to CF standard names (resolve #30), although almost none already exist in their standard name list. The documentation is also updated accordingly.

Moreover, this PR introduces new class attributes offered to component contributors in their component definition, i.e. _inwards and _outwards. These are expected to be assigned sequences (set ideally to guarantee no duplicates) of the standardised transfers that the component actually uses and produces, respectively (resolve #66). In turn, components are now allowed to use/produce only a subset of the standardised transfers (e.g. if they are on the simpler end of the modelling complexity spectrum). However, they are not allowed to use/produce transfers that are not in the standard interfaces. The documentation (contributor guide) is updated to mention these new attributes. Note that using only parts of the standardised transfers was already implictly permitted before this PR.

The dummy components used in the testing suite are updated to make use of the newly added class attributes. However, they feature the whole set of dummy standardised transfers, not subsets, to represent the ideal scenario of 3 components all fully compliant with the standard interfaces.