-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprojectLS.F90
68 lines (48 loc) · 2 KB
/
projectLS.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
module projectLS
use ESMF
use wav_shr_mod, only : chkerr
implicit none
public :: findmapped
! Module data
character(len=*), parameter :: u_FILE_u = & !< a character string for an ESMF log message
__FILE__
contains
subroutine findmapped(EMeshIn, LS, xx, yy, ipt, iaproc, ecnt, ismapped, rc)
! input/output variables
type(ESMF_Mesh) , intent(in) :: EMeshIn
type(ESMF_LocStream) , intent(in) :: LS
integer, intent(in) :: ipt, iaproc, ecnt
real(kind=8) , pointer , intent(in) :: xx(:), yy(:)
logical , intent(inout) :: ismapped
integer , intent(out) :: rc
type(ESMF_LocStream) :: ptsLS, LS2
integer :: localrc,elb,eub
character(len=100) :: msg
rc = ESMF_SUCCESS
ismapped = .true.
!if (ecnt == 0) return
ptsLS = ESMF_LocstreamCreate(LS, background=EmeshIn, rc=localrc)
if (localrc /= ESMF_SUCCESS) ismapped = .false.
if (ESMF_LocStreamIsCreated(ptsLS))call ESMF_LocStreamDestroy(ptsLS, noGarbage = .true., rc=rc)
!end if
!if (chkerr(localrc,__LINE__,u_FILE_u)) ismapped = .false.
!print *,'X1 ',ipt,ismapped
! write(msg,'(a,i6)')'here 0 ',ipt
! call ESMF_LogWrite(trim(msg), ESMF_LOGMSG_INFO)
! if (chkerr(localrc,__LINE__,u_FILE_u)) return
! write(msg,'(a,i6)')'here 1 ',ipt
! call ESMF_LogWrite(trim(msg), ESMF_LOGMSG_INFO)
! write(msg,'(a,i6)')'here 2 ',ipt
! if (localrc /= ESMF_SUCCESS) ismapped = .false.
! write(msg,'(a,i6)')'here 3 ',ipt
! call ESMF_LogWrite(trim(msg), ESMF_LOGMSG_INFO)
! if (ESMF_LocStreamIsCreated(ptsLS))call ESMF_LocStreamDestroy(ptsLS, noGarbage = .true., rc=rc)
! write(msg,'(a,i6)')'here 4 ',ipt
! call ESMF_LogWrite(trim(msg), ESMF_LOGMSG_INFO)
! write(msg,'(a,i6)')'here 5 ',ipt
! if (chkerr(rc,__LINE__,u_FILE_u)) return
! write(msg,'(a,i6)')'here 6 ',ipt
! call ESMF_LogWrite(trim(msg), ESMF_LOGMSG_INFO)
! rc = ESMF_SUCCESS
end subroutine findmapped
end module projectLS