ESMF_GridPrint Subroutine

public subroutine ESMF_GridPrint(grid, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Grid), intent(in) :: grid
integer, intent(out), optional :: rc

Source Code

    subroutine ESMF_GridPrint (grid, rc)

!
! !ARGUMENTS:
      type(ESMF_Grid), intent(in)            :: grid
      integer,         intent(out), optional :: rc
!
! !DESCRIPTION:
!  Print interesting values in a Grid.
!
! The arguments are:
! \begin{description}
! \item[{grid}]
!     Grid to print.
! \item[{[rc]}]
!      Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
! \end{description}
!
!EOPI
      integer :: localrc ! local error status

      ! Initialize return code; assume failure until success is certain
      localrc = ESMF_RC_NOT_IMPL
      if (present(rc)) rc = ESMF_RC_NOT_IMPL

      ! check input variables
      call ESMF_InitPrint (ESMF_INIT_GET(grid))
      ESMF_INIT_CHECK_DEEP(ESMF_GridGetInit, grid, rc)

      call ESMF_UtilIOUnitFlush (unit=ESMF_UtilIOstdout, rc=localrc)
      if (ESMF_LogFoundError(localrc, &
          ESMF_ERR_PASSTHRU, &
          ESMF_CONTEXT, rcToReturn=rc)) return

      ! Just print its base for now
      call c_ESMC_BasePrint(grid, 0, "debug", ESMF_FALSE, "", ESMF_FALSE, localrc)
      if (ESMF_LogFoundError(localrc, &
          ESMF_ERR_PASSTHRU, &
          ESMF_CONTEXT, rcToReturn=rc)) return

      if (present (rc)) rc = ESMF_SUCCESS

    end subroutine ESMF_GridPrint