/[MITgcm]/MITgcm/pkg/exch2/exch2_get_recv_bounds.F
ViewVC logotype

Contents of /MITgcm/pkg/exch2/exch2_get_recv_bounds.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download)
Wed Jul 23 21:06:06 2008 UTC (15 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint61l, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i
Changes since 1.3: +3 -4 lines
cosmetic changes (similarity with get_send_bounds even more obvious)

1 C $Header: /u/gcmpack/MITgcm/pkg/exch2/exch2_get_recv_bounds.F,v 1.3 2007/10/09 00:03:33 jmc Exp $
2 C $Name: $
3
4 SUBROUTINE EXCH2_GET_RECV_BOUNDS(
5 I fCode, eWdth,
6 O tiStride, tjStride,
7 U tIlo, tIhi, tJlo, tJhi )
8 C
9 IMPLICIT NONE
10 C
11 CHARACTER*2 fCode
12 INTEGER eWdth
13 INTEGER tiStride, tjStride
14 INTEGER tIlo, tIhi, tJlo, tJhi
15 C
16 IF ( tIlo .EQ. tIhi .AND. tIlo .EQ. 0 ) THEN
17 C Receiving to a west edge
18 tIlo=1-eWdth
19 tIhi=0
20 tistride=1
21 IF ( tJlo .LE. tJhi ) THEN
22 tJlo=tJlo-eWdth+1
23 tJhi=tJhi+eWdth-1
24 tjstride=1
25 ELSE
26 tJlo=tJlo+eWdth-1
27 tJhi=tJhi-eWdth+1
28 tjstride=-1
29 ENDIF
30 ENDIF
31 IF ( tIlo .EQ. tIhi .AND. tIlo .GT. 1 ) THEN
32 C Receiving to an east edge
33 tIhi=tIhi+eWdth-1
34 tistride=1
35 IF ( tJlo .LE. tJhi ) THEN
36 tJlo=tJlo-eWdth+1
37 tJhi=tJhi+eWdth-1
38 tjstride=1
39 ELSE
40 tJlo=tJlo+eWdth-1
41 tJhi=tJhi-eWdth+1
42 tjstride=-1
43 ENDIF
44 ENDIF
45 IF ( tJlo .EQ. tJhi .AND. tJlo .EQ. 0 ) THEN
46 C Receiving to a south edge
47 tJlo=1-eWdth
48 tJhi=0
49 tjstride=1
50 IF ( tIlo .LE. tIhi ) THEN
51 tIlo=tIlo-eWdth+1
52 tIhi=tIhi+eWdth-1
53 tistride=1
54 ELSE
55 tIlo=tIlo+eWdth-1
56 tIhi=tIhi-eWdth+1
57 tistride=-1
58 ENDIF
59 ENDIF
60 IF ( tJlo .EQ. tJhi .AND. tJlo .GT. 1 ) THEN
61 C Receiving to an north edge
62 tJhi=tJhi+eWdth-1
63 tjstride=1
64 IF ( tIlo .LE. tIhi ) THEN
65 tIlo=tIlo-eWdth+1
66 tIhi=tIhi+eWdth-1
67 tistride=1
68 ELSE
69 tIlo=tIlo+eWdth-1
70 tIhi=tIhi-eWdth+1
71 tistride=-1
72 ENDIF
73 ENDIF
74
75 RETURN
76 END

  ViewVC Help
Powered by ViewVC 1.1.22