ESMF_RouteHandleWrite Subroutine

public subroutine ESMF_RouteHandleWrite(routehandle, fileName, keywordEnforcer, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_RouteHandle), intent(inout) :: routehandle
character(len=*), intent(in) :: fileName
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(out), optional :: rc

Source Code

  subroutine ESMF_RouteHandleWrite(routehandle, fileName, keywordEnforcer, rc)
!
! !ARGUMENTS:
    type(ESMF_RouteHandle), intent(inout)         :: routehandle
    character(*),           intent(in)            :: fileName
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
    integer,                intent(out), optional :: rc
!
! !DESCRIPTION:
!   Write the RouteHandle to file. The generated file can then be used to
!   re-create the same RouteHandle, on the same number of PETs, using the
!   {\tt ESMF\_RouteHandleCreate(fileName=...)} method.
!
!   The arguments are:
!   \begin{description}
!   \item[routehandle]
!     The {\tt ESMF\_RouteHandle} to be written.
!   \item[fileName]
!     The name of the output file to which the RouteHandle is written.
!   \item[{[rc]}]
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOP
!------------------------------------------------------------------------------
    integer                 :: localrc      ! local return code

    ! initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    ESMF_INIT_CHECK_DEEP(ESMF_RouteHandleGetInit,routehandle,rc)

    call c_ESMC_RouteHandleWrite(routehandle, fileName, localrc)
    if (ESMF_LogFoundError(localrc, &
      ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! Set return values
    if (present(rc)) rc = ESMF_SUCCESS

  end subroutine ESMF_RouteHandleWrite