Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
CAM-SIMA holds information about all constituents. However, MPAS dynamical core only knows about the advected ones.
Inquire the index mapping for constituents advected by MPAS dynamical core. Save it as the advected_constituent_index
lookup table, which serves as the authoritative source for mapping an index within the set of advected constituents to
an index within the set of all constituents.
(KCW, 2026-03-25)
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
subroutine dyn_inquire_advected_constituent_index()! Module(s) from CAM-SIMA.use cam_abortutils,only:check_allocateuse cam_constituents,only:const_is_advected,&num_constituents,num_advecteduse cam_logfile,only:debugout_debuguse string_utils,only:stringify! Module(s) from CESM Share.use shr_kind_mod,only:len_cx=>shr_kind_cxcharacter(*),parameter::subname='dyn_comp::dyn_inquire_advected_constituent_index'character(len_cx)::cerrinteger::i,jinteger::ierrcall dyn_debug_print(debugout_debug,subname//' entered')! This is a protected module variable.allocate(advected_constituent_index(num_advected),errmsg=cerr,stat=ierr)call check_allocate(ierr,subname,'advected_constituent_index(num_advected)',&file='dyn_comp',line=__LINE__,errmsg=trim(adjustl(cerr)))j=1do i=1,num_constituents! Skip non-advected constituents.if(const_is_advected(i))thenadvected_constituent_index(j)=ij=j+1end if end do call dyn_debug_print(debugout_debug,'advected_constituent_index = ['//&stringify(advected_constituent_index)//']')call dyn_debug_print(debugout_debug,subname//' completed')end subroutine dyn_inquire_advected_constituent_index