Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_CplComp) | :: | comp | ||||
type(ESMF_State) | :: | importState | ||||
type(ESMF_State) | :: | exportState | ||||
type(ESMF_Clock) | :: | clock | ||||
integer, | intent(out) | :: | rc |
subroutine user_run(comp, importState, exportState, clock, rc) type(ESMF_CplComp) :: comp type(ESMF_State) :: importState, exportState type(ESMF_Clock) :: clock integer, intent(out) :: rc ! Local variables type(ESMF_Array) :: srcArray, dstArray ! Initialize return code rc = ESMF_SUCCESS print *, "User Coupler Run starting" ! Get source Array out of import state call ESMF_StateGet(importState, "array data", srcArray, rc=rc) if (rc/=ESMF_SUCCESS) return ! bail out ! Get destination Array out of export state call ESMF_StateGet(exportState, "array data", dstArray, rc=rc) if (rc/=ESMF_SUCCESS) return ! bail out ! Use ArraySMM() to take data from srcArray to dstArray call ESMF_ArraySMM(srcArray=srcArray, dstArray=dstArray, & routehandle=routehandle, rc=rc) if (rc/=ESMF_SUCCESS) return ! bail out print *, "User Coupler Run returning" end subroutine user_run