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_Field) :: srcField, dstField integer :: status rc = ESMF_SUCCESS print *, "User Coupler Run starting" ! Get input data call ESMF_StateGet(importState, "src", srcField, rc=rc) if(rc/=ESMF_SUCCESS) return ! Get location of output data call ESMF_StateGet(exportState, "dst", dstField, rc=rc) if(rc/=ESMF_SUCCESS) return ! These are fields on different Grids - call Regrid to rearrange ! the data. The communication pattern was computed at init, ! this simply has to execute the send and receive equivalents. call ESMF_FieldRegrid(srcField, dstField, routehandle, rc=status) if(rc/=ESMF_SUCCESS) return print *, "User Coupler Run returning" end subroutine user_run