GenericCplSetServices
— SetServices for generic couplers.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CplComp) | :: | CC | ||||
integer, | intent(out) | :: | RC |
subroutine GenericCplSetServices ( CC, RC ) ! !ARGUMENTS: type (ESMF_CplComp ) :: CC integer, intent( OUT) :: RC !EOPI ! ErrLog Variables character(len=ESMF_MAXSTR) :: IAm character(len=ESMF_MAXSTR) :: COMP_NAME integer :: STATUS ! Locals type (MAPL_GenericCplState), pointer :: STATE type (MAPL_GenericCplWrap ) :: CCWRAP ! 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) // "GenericCplSetServices" ! Allocate this instance of the internal state and put it in wrapper. ! ------------------------------------------------------------------- allocate(STATE, STAT=STATUS) _VERIFY(STATUS) CCWRAP%INTERNAL_STATE => STATE ! Have ESMF save pointer to the wrapped internal state in the C.C. ! ---------------------------------------------------------------- call ESMF_CplCompSetInternalState(CC, CCWRAP, STATUS) _VERIFY(STATUS) ! Register services for this component ! ------------------------------------ call ESMF_CplCompSetEntryPoint ( CC, ESMF_METHOD_INITIALIZE, Initialize, & rc=STATUS ) _VERIFY(STATUS) call ESMF_CplCompSetEntryPoint ( CC, ESMF_METHOD_RUN, Run, & rc=STATUS ) _VERIFY(STATUS) call ESMF_CplCompSetEntryPoint ( CC, ESMF_METHOD_FINALIZE, Finalize, & rc=STATUS ) _VERIFY(STATUS) !ALT: Add these 2 IO methods to facilitate transparent checkpointing ! to support monthly averages call ESMF_CplCompSetEntryPoint ( CC, ESMF_METHOD_READRESTART, ReadRestart, & rc=STATUS ) _VERIFY(STATUS) call ESMF_CplCompSetEntryPoint ( CC, ESMF_METHOD_WRITERESTART, WriteRestart, & rc=STATUS ) _VERIFY(STATUS) ! Put the inherited configuration in the internal state ! ----------------------------------------------------- !ALT not_used call ESMF_CplCompGet( CC, CONFIG=STATE%CF, RC=STATUS ) !ALT not_used _VERIFY(STATUS) _RETURN(ESMF_SUCCESS) end subroutine GenericCplSetServices