ESMF_XGridGeomBaseMatch Function

public function ESMF_XGridGeomBaseMatch(xgb1, xgb2, rc)

Arguments

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

Return Value logical


Calls

proc~~esmf_xgridgeombasematch~~CallsGraph proc~esmf_xgridgeombasematch ESMF_XGridGeomBaseMatch proc~esmf_gridmatch ESMF_GridMatch proc~esmf_xgridgeombasematch->proc~esmf_gridmatch proc~esmf_imerr ESMF_IMErr proc~esmf_xgridgeombasematch->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_xgridgeombasematch->proc~esmf_logfounderror proc~esmf_logseterror ESMF_LogSetError proc~esmf_xgridgeombasematch->proc~esmf_logseterror proc~esmf_meshmatch ESMF_MeshMatch proc~esmf_xgridgeombasematch->proc~esmf_meshmatch proc~esmf_xgridgeombasegetinit ESMF_XGridGeomBaseGetInit proc~esmf_xgridgeombasematch->proc~esmf_xgridgeombasegetinit proc~esmf_gridmatch->proc~esmf_imerr proc~esmf_gridmatch->proc~esmf_logfounderror c_esmc_gridmatch c_esmc_gridmatch proc~esmf_gridmatch->c_esmc_gridmatch interface~esmf_vmallreduce ESMF_VMAllReduce proc~esmf_gridmatch->interface~esmf_vmallreduce interface~esmf_vmget ESMF_VMGet proc~esmf_gridmatch->interface~esmf_vmget proc~esmf_gridgetinit ESMF_GridGetInit proc~esmf_gridmatch->proc~esmf_gridgetinit proc~esmf_vmgetcurrent ESMF_VMGetCurrent proc~esmf_gridmatch->proc~esmf_vmgetcurrent 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 proc~esmf_logseterror->esmf_breakpoint proc~esmf_logseterror->proc~esmf_logrc2msg proc~esmf_logseterror->proc~esmf_logwrite proc~esmf_meshmatch->proc~esmf_imerr proc~esmf_meshmatch->proc~esmf_logfounderror proc~esmf_meshmatch->proc~esmf_logseterror c_esmc_meshgetdimensions c_esmc_meshgetdimensions proc~esmf_meshmatch->c_esmc_meshgetdimensions c_esmc_meshgetelemdistgrid c_esmc_meshgetelemdistgrid proc~esmf_meshmatch->c_esmc_meshgetelemdistgrid c_esmc_meshgetnodedistgrid c_esmc_meshgetnodedistgrid proc~esmf_meshmatch->c_esmc_meshgetnodedistgrid c_esmc_meshgetownedelemcount c_esmc_meshgetownedelemcount proc~esmf_meshmatch->c_esmc_meshgetownedelemcount c_esmc_meshgetownednodecount c_esmc_meshgetownednodecount proc~esmf_meshmatch->c_esmc_meshgetownednodecount c_esmc_meshgetstatus c_esmc_meshgetstatus proc~esmf_meshmatch->c_esmc_meshgetstatus proc~esmf_distgridmatch ESMF_DistGridMatch proc~esmf_meshmatch->proc~esmf_distgridmatch proc~esmf_distgridsetinitcreated ESMF_DistGridSetInitCreated proc~esmf_meshmatch->proc~esmf_distgridsetinitcreated proc~esmf_logfoundallocerror ESMF_LogFoundAllocError proc~esmf_meshmatch->proc~esmf_logfoundallocerror proc~esmf_meshgetelemarea ESMF_MeshGetElemArea proc~esmf_meshmatch->proc~esmf_meshgetelemarea proc~esmf_meshgetinit ESMF_MeshGetInit proc~esmf_meshmatch->proc~esmf_meshgetinit

Called by

proc~~esmf_xgridgeombasematch~~CalledByGraph proc~esmf_xgridgeombasematch ESMF_XGridGeomBaseMatch proc~esmf_xgridmatch ESMF_XGridMatch proc~esmf_xgridmatch->proc~esmf_xgridgeombasematch proc~esmf_fieldregridstorex ESMF_FieldRegridStoreX proc~esmf_fieldregridstorex->proc~esmf_xgridmatch interface~esmf_fieldregridstore ESMF_FieldRegridStore interface~esmf_fieldregridstore->proc~esmf_fieldregridstorex

Source Code

      function ESMF_XGridGeomBaseMatch(xgb1, xgb2, rc)

      logical :: ESMF_XGridGeomBaseMatch
!
! !ARGUMENTS:
      type(ESMF_XGridGeomBase),   intent(in)       :: xgb1
      type(ESMF_XGridGeomBase),   intent(in)       :: xgb2
      integer,               intent(out), optional :: rc

!
! !DESCRIPTION:
!    Match geometric object
!
!The arguments are:
!\begin{description}
!\item[{xgb1}]
!   first xgrid geombase object
!\item[{xgb2}]
!   second xgrid geombase object
!\item[{[rc]}]
!          Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!\end{description}
!
!EOPI
    type(ESMF_XGridGeomBaseClass),pointer :: gbcp1, gbcp2
    integer                          :: localrc

    ! 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, xgb1, rc)
    ESMF_INIT_CHECK_DEEP_SHORT(ESMF_XGridGeomBaseGetInit, xgb2, rc)

    ! Get GeomBaseClass
    gbcp1=>xgb1%gbcp
    gbcp2=>xgb2%gbcp

    ESMF_XGridGeomBaseMatch = .false.

    if(gbcp1%type%type /= gbcp2%type%type) then
      call ESMF_LogSetError(rcToCheck=ESMF_RC_OBJ_BAD, &
         msg="xgrid geombase object type does not match", &
          ESMF_CONTEXT, rcToReturn=rc)
      return
    endif

    ! Get info depending on type
    select case(gbcp1%type%type)
       case (ESMF_XGRIDGEOMTYPE_GRID%type) ! Grid

         if(ESMF_GridMatch(gbcp1%grid, gbcp2%grid, rc=localrc) >= ESMF_GRIDMATCH_EXACT) &
          ESMF_XGridGeomBaseMatch = .true.
         if (ESMF_LogFoundError(ESMF_RC_ARG_VALUE, &
     msg=" Bad type value", &
     ESMF_CONTEXT, rcToReturn=rc)) return

       case (ESMF_XGRIDGEOMTYPE_MESH%type) ! Mesh
         ESMF_XGridGeomBaseMatch = ESMF_MeshMatch(gbcp1%mesh, gbcp2%mesh, rc=localrc)
         if (ESMF_LogFoundError(ESMF_RC_ARG_VALUE, &
     msg=" Bad type value", &
     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 function ESMF_XGridGeomBaseMatch