NOAA-EMC / CMEPS

NUOPC Community Mediator for Earth Prediction Systems
https://escomp.github.io/CMEPS/
0 stars 18 forks source link

Refactor Fields exchange module for UFS #95

Closed DeniseWorthen closed 10 months ago

DeniseWorthen commented 1 year ago

In UFS, fields exchanges are defined primarily by coupling_mode instead of by field. This is less extensible than to consider each field which goes to a component and allowing the coupling mode to be intrinsically set by defining source component.

For example, a given field to compocn comes from the mediator in the case of using the atm-ocean flux calculation (either on a-grid, o-grid or x-grid) or from an ATM (either active or data).

This will make UFS coupling easier to extend and maintain, especially as we move to extend both X-grid and diagnostic capabilities within UFS.

This work is related to #93, since it will depend on minimizing the custom merges that need to be done.

DeniseWorthen commented 1 year ago

Prototyping for this refactoring has shown that a few aliases will need to be changed to clearly indicate the difference between an AO flux calculated by the ATM vs an AO flux calculated by the mediator.

The naming convention for the prefixes of the flux fields should follow this format:

Fxyz = Flux exchanged between components X and Y, calculated by component Z

Since in UFS, the AO fluxes are calculated by the ATM, the fluxes should be denoted as Faoa, for example, Faoa_sen. They are currently denoted as Faox_sen. This conflicts with the use of this name for the cases when the mediator calculates these fluxes. Renaming the field calculated by the ATM will allow the removal of the various "coupling mode" conditional blocks in the fieldsExchange module. Note that the content of the field is not changing, only the naming.

The Faoa fluxes exported by the ATM are valid only over the ocean. There are other fluxes (for example SW components, rain, LWnet) that are valid everywhere. In these cases, the current names used (Faxa) indicates that the field is calculated by the ATM and is passed between the ATM and the mediator (x), to be used by multiple components.

DeniseWorthen commented 11 months ago

After extensive testing, I found it was more straightforward to allow a single logical control within the Fields Exchange to control whether the aofluxes from the mediator or the atm were sent to the ocean. No other changes are required in other components.