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

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

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


Revision 1.2 - (hide annotations) (download)
Sat Jul 13 02:47:32 2002 UTC (21 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, checkpoint50c_post, c49_ctrl, checkpoint46f_post, checkpoint48e_post, checkpoint50c_pre, checkpoint46b_post, checkpoint48i_post, checkpoint46l_pre, checkpoint50, checkpoint50d_post, checkpoint50b_pre, checkpoint48b_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint47a_post, checkpoint48d_pre, checkpoint47i_post, checkpoint47d_post, checkpoint46d_pre, checkpoint48d_post, checkpoint48f_post, checkpoint46j_pre, checkpoint48h_post, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint46k_post, checkpoint48a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint47j_post, branch-exfmods-tag, checkpoint46e_pre, checkpoint48c_post, checkpoint46b_pre, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint50g_post, checkpoint46g_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint47f_post, checkpoint50e_post, checkpoint46i_post, checkpoint46c_post, checkpoint50d_pre, checkpoint46e_post, checkpoint47, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint48g_post, checkpoint47h_post, checkpoint46d_post, checkpoint50b_post
Branch point for: branch-exfmods-curt
Changes since 1.1: +148 -0 lines
Merging new ctrl package from release1_p5:
o new ctrl package
  - adopted from ECCO environment to enable optimization
  - added Eliassen Palm fluxes to controls

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