You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once we have exposed the full constituent (ccpp_model_constituents_t) object via metadata (NCAR/ccpp-framework#597), we should update the following schemes to use the const_index method to grab a constituent index by its standard name (instead of what we're doing now, which is looping over all the constituents to get the index):
sima_diagnostics/sima_state_diagnostics.F90
remove const_std_names and const_diag_names
grab the index using the newly exposed interface
if the constituent is present, call history_out_field/history_add_field
any scheme that uses ccpp_const_get_idx
possible candidates: check_energy_chng, zm_diagnostics
const_index routine in the constituents object (in the CCPP framework):
subroutine ccp_model_const_index(this, index, standard_name, errcode, errmsg)
! Return index of metadata matching <standard_name>.
! <this> must be locked to execute this function
! Dummy arguments
class(ccpp_model_constituents_t), intent(in) :: this
character(len=*), intent(in) :: standard_name
integer, intent(out) :: index
integer, optional, intent(out) :: errcode
character(len=*), optional, intent(out) :: errmsg
! Local variables
type(ccpp_constituent_properties_t), pointer :: cprop => NULL()
character(len=*), parameter :: subname = "ccp_model_const_index"
if (this%const_props_locked(errcode=errcode, errmsg=errmsg, warn_func=subname)) then
cprop => this%find_const(standard_name)
if (associated(cprop)) then
index = cprop%const_index()
else
index = int_unassigned
end if
else
index = int_unassigned
end if
end subroutine ccp_model_const_index
The text was updated successfully, but these errors were encountered:
peverwhee
changed the title
Utilize constituent object get_index routine
Utilize constituent object const_index routine
Oct 17, 2024
Once we have exposed the full constituent (
ccpp_model_constituents_t
) object via metadata (NCAR/ccpp-framework#597), we should update the following schemes to use theconst_index
method to grab a constituent index by its standard name (instead of what we're doing now, which is looping over all the constituents to get the index):const_std_names
andconst_diag_names
ccpp_const_get_idx
const_index routine in the constituents object (in the CCPP framework):
The text was updated successfully, but these errors were encountered: