NOAA-OWP / ngen

Next Generation Water Modeling Engine and Framework Prototype
Other
84 stars 63 forks source link

Mediators and Couplers #297

Open mattw-nws opened 3 years ago

mattw-nws commented 3 years ago

Implement API for mediators and couplers, to include a unit conversion capability and maybe a basic coupler for soil moisture.

mattw-nws commented 3 years ago

Starting in a perhaps odd place, but looking at UDUNITS-2. A few notes already:

mattw-nws commented 3 years ago

On a different topic, looking at the various places that data values are moved between components, and there's an oddity:

Formulations currently implemented directly in the framework (Tshirt and Simple_Lumped) are getting ET data via the Et_Aware and Et_Accountable interfaces. But modules implemented outside the framework won't be able to use those interfaces and can only get ET parameters via forcing inputs, e.g. by having NoahMP higher up in a Multi-BMI formulation (which will feed NoahMP output ET values into the data stream as if they were forcing data via Bmi_Multi_Formulation and ForcingProvider).

One of the places that M&C has been requested is to provide soil moisture calculation between NoahMP and other models... so the ET data interface is a place where M&C has to be inserted.

Given that only in-framework formulations/realizations can use the Et_* mechanisms, it is probably best to deprecate those mechanisms and instead feed default/dummy ET params into the top of the Forcing stack (if deemed necessary) for models that will need them but not be stacked with something like NoahMP.

This change will probably not be made in this issue, but as a flow-down, no consideration will be given to inserting M&C functions into the Et_* interface mechanisms. Suggest these methods be marked [[deprecated]].