subroutine test3(rc)
integer, intent(out) :: rc
integer :: localrc
type(ESMF_Mesh) :: meshA, meshB, mesh
rc = ESMF_SUCCESS
localrc = ESMF_SUCCESS
meshA = make_mesh_sph(40,20,1.,1.,30.,-5.,rc=localrc)
if (ESMF_LogFoundError(localrc, &
ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
meshB = make_mesh_sph(20,10,0.5,1.,50.,0.,rc=localrc)
if (ESMF_LogFoundError(localrc, &
ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
mesh = ESMF_MeshCreate(meshA, meshB, ESMF_MESHOP_DIFFERENCE, &
areaThreshold=1.e-7_ESMF_KIND_R8, rc=localrc)
if (ESMF_LogFoundError(localrc, &
ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
!call ESMF_MeshWrite(mesh, "meshdiff", rc=localrc)
!if (ESMF_LogFoundError(localrc, &
! ESMF_ERR_PASSTHRU, &
! ESMF_CONTEXT, rcToReturn=rc)) return
call ESMF_MeshDestroy(mesh, rc=localrc)
if (ESMF_LogFoundError(localrc, &
ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
end subroutine test3