/[MITgcm]/MITgcm/pkg/ctrl/ctrl_mask_set_yz.F
ViewVC logotype

Contents of /MITgcm/pkg/ctrl/ctrl_mask_set_yz.F

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


Revision 1.6 - (show annotations) (download)
Tue Oct 9 00:00:00 2007 UTC (16 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62c, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62x, checkpoint60, checkpoint61, checkpoint62, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint62b, checkpoint61f, checkpoint61n, checkpoint59j, checkpoint61q, checkpoint61e, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.5: +4 -2 lines
add missing cvs $Header:$ or $Name:$

1 C $Header: $
2 C $Name: $
3
4 #include "CTRL_CPPOPTIONS.h"
5
6
7 subroutine ctrl_mask_set_yz(
8 & ip1, OB_I, nwetobcs, ymaskobcs, mythid )
9
10 c ==================================================================
11 c SUBROUTINE ctrl_mask_set_yz
12 c ==================================================================
13 c
14 c o count sliced (yz) wet points and set yz masks
15 c
16 c heimbach@mit.edu, 30-Aug-2001
17 c gebbie@mit.edu, corrected array bounds
18 c
19 c ==================================================================
20
21 implicit none
22
23 c == global variables ==
24
25 #include "EEPARAMS.h"
26 #include "SIZE.h"
27 #include "PARAMS.h"
28 #include "GRID.h"
29 #include "ctrl.h"
30 #ifdef ALLOW_OBCS_CONTROL
31 # include "OBCS.h"
32 #endif
33
34 c == routine arguments ==
35
36 integer ip1
37 integer OB_I (1-oly:sny+oly,nsx,nsy)
38 integer nwetobcs (nsx,nsy,nr,nobcs)
39 character*(80) ymaskobcs
40 integer mythid
41
42 c == local variables ==
43
44 integer bi,bj
45 integer i,j,k
46 integer itlo,ithi
47 integer jtlo,jthi
48 integer jmin,jmax
49 integer imin,imax
50 integer ntmp
51 integer ivarindex
52
53 integer iobcs
54 integer il
55 integer errio
56 integer startrec
57 integer endrec
58 integer difftime(4)
59 _RL diffsecs
60 _RL dummy
61 _RL maskyz (1-oly:sny+oly,nr,nsx,nsy,nobcs)
62 _RL gg (1-oly:sny+oly,nr,nsx,nsy)
63
64 character*( 80) fname
65
66 c == external ==
67
68 integer ilnblnk
69 external ilnblnk
70
71 c == end of interface ==
72
73 jtlo = mybylo(mythid)
74 jthi = mybyhi(mythid)
75 itlo = mybxlo(mythid)
76 ithi = mybxhi(mythid)
77 jmin = 1
78 jmax = sny
79 imin = 1
80 imax = snx
81
82 _BEGIN_MASTER( myThid )
83
84 c-- Count wet points at Northern boundary.
85 c-- mask conventions are adopted from obcs_apply_ts, obcs_apply_uv
86
87 do iobcs = 1,nobcs
88 do bj = jtlo,jthi
89 do bi = itlo,ithi
90 do k = 1,nr
91 do j = 1-oly,sny+oly
92 maskyz(j,k,bi,bj,iobcs) = 0. _d 0
93 enddo
94 enddo
95 enddo
96 enddo
97 enddo
98
99 do iobcs = 1,nobcs
100 do bj = jtlo,jthi
101 do bi = itlo,ithi
102 do k = 1,nr
103 do j = jmin,jmax
104 i = OB_I(J,bi,bj)
105 if ( i .NE. 0 ) then
106 c-- West mask for T, S, U on East/West boundaries.
107 if(iobcs .eq.1 .or. iobcs .eq.2 .or. iobcs .eq.3) then
108 if (maskW(i+ip1,j,k,bi,bj) .ne. 0.) then
109 nwetobcs(bi,bj,k,iobcs) =nwetobcs(bi,bj,k,iobcs)+1
110 maskyz(j,k,bi,bj,iobcs) = 1
111 endif
112 endif
113 c-- South mask for V
114 if (iobcs .eq. 4) then
115 if (maskS(i,j,k,bi,bj) .eq. 1.) then
116 nwetobcs(bi,bj,k,iobcs) =nwetobcs(bi,bj,k,iobcs)+1
117 maskyz(j,k,bi,bj,iobcs) = 1
118 endif
119 endif
120 endif
121 enddo
122 enddo
123 enddo
124 enddo
125 enddo
126
127 il=ilnblnk( ymaskobcs )
128 write(fname(1:80),'(80a)') ' '
129 write(fname(1:80),'(a)') ymaskobcs
130
131 do iobcs = 1,nobcs
132 do bj = jtlo,jthi
133 do bi = itlo,ithi
134 do k = 1,nr
135 do j = jmin,jmax
136 gg(j,k,bi,bj) = maskyz(j,k,bi,bj,iobcs)
137 enddo
138 enddo
139 enddo
140 enddo
141 call active_write_yz( fname, gg, iobcs, 0, mythid, dummy)
142 enddo
143
144 _END_MASTER( mythid )
145
146 return
147 end
148

  ViewVC Help
Powered by ViewVC 1.1.22