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

Annotation of /MITgcm/pkg/ctrl/ctrl_mask_set_xz.F

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


Revision 1.11 - (hide annotations) (download)
Mon Mar 23 21:07:37 2015 UTC (9 years, 2 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65k, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65o, HEAD
Changes since 1.10: +3 -2 lines
- if autodiff is not compiled then use
  READ_REC_XY_RL/READ_REC_XYZ_RL instead
  of active read/write

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

  ViewVC Help
Powered by ViewVC 1.1.22