SetServices Subroutine

public subroutine SetServices(GC, RC)

SetServices — Sets IRF services for the RUT

Sets Initialize, Run and Finalize services.

History

  • 29Sep2011 Anton Darmenov Cloned from the ExtData GC code

Arguments

Type IntentOptional Attributes Name
type(ESMF_GridComp), intent(inout) :: GC

gridded component

integer, optional :: RC

return code


Calls

proc~~setservices~5~~CallsGraph proc~setservices~5 SetServices ESMF_GridCompGet ESMF_GridCompGet proc~setservices~5->ESMF_GridCompGet interface~mapl_am_i_root MAPL_Am_I_Root proc~setservices~5->interface~mapl_am_i_root mapl_addchild mapl_addchild proc~setservices~5->mapl_addchild mapl_genericsetservices mapl_genericsetservices proc~setservices~5->mapl_genericsetservices mapl_gridcompsetentrypoint mapl_gridcompsetentrypoint proc~setservices~5->mapl_gridcompsetentrypoint proc~mapl_return MAPL_Return proc~setservices~5->proc~mapl_return proc~mapl_verify MAPL_Verify proc~setservices~5->proc~mapl_verify at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   SUBROUTINE SetServices ( GC, RC )

! !ARGUMENTS:

    type(ESMF_GridComp), intent(INOUT) :: GC  !! gridded component
    integer, optional                  :: RC  !! return code

!
!-------------------------------------------------------------------------

                            __Iam__('SetServices')

!   Local derived type aliases
    type(ESMF_Config)          :: CF
    character(len=ESMF_MAXSTR) :: comp_name

!                              ------------

!   Get my name and set-up traceback handle
!   ---------------------------------------
    call ESMF_GridCompGet( GC, name=comp_name, _RC )
    Iam = trim(comp_name) // '::' // trim(Iam)

!   Greetings
!   ---------
    if (MAPL_am_I_root()) then
         print *, trim(Iam)//': ACTIVE'
         print *
    end if

!   Set the Initialize, Run, Finalize entry points
!   ----------------------------------------------
    call MAPL_GridCompSetEntryPoint ( GC, ESMF_SETINIT,  Initialize_, _RC )
    call MAPL_GridCompSetEntryPoint ( GC, ESMF_SETRUN,   Run_,        _RC )
    call MAPL_GridCompSetEntryPoint ( GC, ESMF_SETFINAL, Finalize_,   _RC )

!   Add the ExtData as a child
!   --------------------------
    ExtData = MAPL_AddChild ( GC, NAME='ExtData', SS=ExtData_SetServices, _RC )

!   Generic Set Services
!   --------------------
    call MAPL_GenericSetServices ( GC, _RC )

!   All done
!   --------

    _RETURN(ESMF_SUCCESS)

  END SUBROUTINE SetServices