Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CplComp), | intent(inout) | :: | CC | |||
type(MAPL_VarSpec), | intent(in), | target | :: | SRC_SPEC(:) | ||
type(MAPL_VarSpec), | intent(in), | target | :: | DST_SPEC(:) | ||
integer, | intent(out), | optional | :: | RC |
subroutine MAPL_CplCompSetVarSpecs ( CC, SRC_SPEC, DST_SPEC, RC ) type (ESMF_CplComp ), intent(INOUT) :: CC type (MAPL_VarSpec ), target, intent(IN ) :: SRC_SPEC(:) type (MAPL_VarSpec ), target, intent(IN ) :: DST_SPEC(:) integer, optional, intent( OUT) :: RC ! ErrLog Variables character(len=ESMF_MAXSTR) :: IAm character(len=ESMF_MAXSTR) :: COMP_NAME integer :: STATUS ! Locals type (MAPL_GenericCplState), pointer :: STATE type (MAPL_GenericCplWrap ) :: WRAP character(len=ESMF_MAXSTR) :: SRC_NAME character(len=ESMF_MAXSTR) :: DST_NAME integer :: I ! Begin... ! Get this instance's name and set-up traceback handle. ! ----------------------------------------------------- call ESMF_CplCompGet( CC, name=COMP_NAME, RC=STATUS ) _VERIFY(STATUS) Iam = trim(COMP_NAME) // "MAPL_CplCompSetVarSpecs" ! Retrieve the pointer to the internal state. It comes in a wrapper. ! ------------------------------------------------------------------ call ESMF_CplCompGetInternalState ( CC, WRAP, STATUS ) _VERIFY(STATUS) STATE => WRAP%INTERNAL_STATE ! Make sure the specs match !-------------------------- _ASSERT(size(SRC_SPEC)==size(DST_SPEC),'needs informative message') do I=1,size(SRC_SPEC) call MAPL_VarSpecGet(SRC_SPEC(I),SHORT_NAME=SRC_NAME,RC=STATUS) _VERIFY(STATUS) call MAPL_VarSpecGet(DST_SPEC(I),SHORT_NAME=DST_NAME,RC=STATUS) _VERIFY(STATUS) !ALT _ASSERT(SRC_NAME==DST_NAME,'needs informative message') end do ! Put miscellaneous info in the internal state !--------------------------------------------- STATE%SRC_SPEC => SRC_SPEC STATE%DST_SPEC => DST_SPEC STATE%ACTIVE = .true. STATE%NAME = COMP_NAME _RETURN(ESMF_SUCCESS) end subroutine MAPL_CplCompSetVarSpecs