NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 63 forks source link

Capgen constituents object needs public interface for minimum value array #472

Open nusbaume opened 1 year ago

nusbaume commented 1 year ago

Description

In CAM-SIMA the dynamics-physics coupling layer uses a ccpp physics scheme directly (qneg) to ensure that all constituent or tracer values are at or above their minimum value, which is defined in the constituents object.

However, there currently doesn't appear to be an interface that would allow the host model to easily access this minimum value information. Thus it would be very beneficial if an interface was generated in the cap similar to the actual constituents array and constituents properties array.

Along with all of this, it would be good to make sure that the host model can set the minimum value for constituents it's providing if need be.

Solution

Implement a public minimum value array interface subroutine that is accessible outside of the CCPP cap itself.

Alternatives (optional)

Alternatively we could just have the host model re-construct this array using the constituent properties, but that feels sort of wasteful as it would likely require the host model to allocate a new array instead of just pointing to the array that already exists in the constituents object.