subroutine SetServices(model, rc)
type(ESMF_GridComp) :: model
integer, intent(out) :: rc
! the NUOPC model component will register the generic methods
call NUOPC_CompDerive(model, model_routine_SS, rc=rc)
VERIFY_NUOPC_(rc)
call ESMF_GridCompSetEntryPoint(model, ESMF_METHOD_INITIALIZE, &
userRoutine=initialize_p0, phase=0, rc=rc)
VERIFY_NUOPC_(rc)
! set entry point for methods that require specific implementation
call NUOPC_CompSetEntryPoint(model, ESMF_METHOD_INITIALIZE, &
phaseLabelList=["IPDv05p1"], userRoutine=advertise_fields, rc=rc)
VERIFY_NUOPC_(rc)
call NUOPC_CompSetEntryPoint(model, ESMF_METHOD_INITIALIZE, &
phaseLabelList=["IPDv05p4"], userRoutine=realize_fields, rc=rc)
VERIFY_NUOPC_(rc)
! attach specializing method(s)
call NUOPC_CompSpecialize(model, specLabel=model_label_DataInitialize, &
specRoutine=initialize_data, rc=rc)
VERIFY_NUOPC_(rc)
call NUOPC_CompSpecialize(model, specLabel=model_label_Advance, &
specRoutine=model_advance, rc=rc)
VERIFY_NUOPC_(rc)
call ESMF_MethodRemove(model, label=model_label_CheckImport, rc=rc)
VERIFY_NUOPC_(rc)
call NUOPC_CompSpecialize(model, specLabel=model_label_CheckImport, &
specRoutine=CheckImport, rc=rc)
VERIFY_NUOPC_(rc)
call NUOPC_CompSpecialize(model, specLabel=model_label_SetClock, &
specRoutine=set_clock, rc=rc)
VERIFY_NUOPC_(rc)
! call NUOPC_CompSpecialize(model, specLabel=model_label_CheckImport, &
! specRoutine=CheckImport, rc=rc)
! if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
! line=__LINE__, &
! file=__FILE__)) &
! return ! bail out
call NUOPC_CompSpecialize(model, specLabel=label_Finalize, &
specRoutine=model_finalize, rc=rc)
VERIFY_NUOPC_(rc)
print*,"Wrapper finish SetServices"
_RETURN(_SUCCESS)
end subroutine SetServices