ESMF_XGridGeomBaseValidate Subroutine

public subroutine ESMF_XGridGeomBaseValidate(gridbase, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_XGridGeomBase), intent(in) :: gridbase
integer, intent(out), optional :: rc

Calls

proc~~esmf_xgridgeombasevalidate~~CallsGraph proc~esmf_xgridgeombasevalidate ESMF_XGridGeomBaseValidate proc~esmf_gridvalidate ESMF_GridValidate proc~esmf_xgridgeombasevalidate->proc~esmf_gridvalidate proc~esmf_imerr ESMF_IMErr proc~esmf_xgridgeombasevalidate->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_xgridgeombasevalidate->proc~esmf_logfounderror proc~esmf_xgridgeombasegetinit ESMF_XGridGeomBaseGetInit proc~esmf_xgridgeombasevalidate->proc~esmf_xgridgeombasegetinit proc~esmf_gridvalidate->proc~esmf_imerr proc~esmf_gridvalidate->proc~esmf_logfounderror c_esmc_gridvalidate c_esmc_gridvalidate proc~esmf_gridvalidate->c_esmc_gridvalidate proc~esmf_gridgetinit ESMF_GridGetInit proc~esmf_gridvalidate->proc~esmf_gridgetinit proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep esmf_breakpoint esmf_breakpoint proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounderror->proc~esmf_logwrite c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Source Code

  subroutine ESMF_XGridGeomBaseValidate(gridbase, rc)
!
! !ARGUMENTS:
    type(ESMF_XGridGeomBase), intent(in)         :: gridbase
    integer,             intent(out),  optional  :: rc
!
!
! !DESCRIPTION:
!      Validates that the {\tt GeomBase} is internally consistent.
!
!     The arguments are:
!     \begin{description}
!     \item[gridbase]
!          Specified {\tt ESMF\_XGridGeomBase} object.
!     \item[{[rc]}]
!          Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    integer :: localrc
    type(ESMF_XGridGeomBaseClass),pointer :: gbcp

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

    ! Check init status of arguments
    ESMF_INIT_CHECK_DEEP_SHORT(ESMF_XGridGeomBaseGetInit, gridbase, rc)

    ! Get GeomBaseClass
    gbcp=>gridbase%gbcp

    ! Get info depending on type
    select case(gbcp%type%type)

       case (ESMF_XGRIDGEOMTYPE_GRID%type) ! Grid
         call ESMF_GridValidate(grid=gbcp%grid, rc=localrc)
          if (ESMF_LogFoundError(localrc, &
     ESMF_ERR_PASSTHRU, &
     ESMF_CONTEXT, rcToReturn=rc)) return

       case (ESMF_XGRIDGEOMTYPE_MESH%type) ! Mesh
         !call ESMF_MeshValidate(mesh=gbcp%mesh, rc=localrc)
         ! if (ESMF_LogFoundError(localrc, &
         !                        ESMF_ERR_PASSTHRU, &
         !                        ESMF_CONTEXT, rcToReturn=rc)) return

       case default
         if (ESMF_LogFoundError(ESMF_RC_ARG_VALUE, &
     msg=" Bad type value", &
     ESMF_CONTEXT, rcToReturn=rc)) return
    end select


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

  end subroutine ESMF_XGridGeomBaseValidate