/[MITgcm]/MITgcm/pkg/grdchk/grdchk_init.F
ViewVC logotype

Contents of /MITgcm/pkg/grdchk/grdchk_init.F

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


Revision 1.7 - (show annotations) (download)
Mon Oct 27 22:32:55 2003 UTC (20 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint57g_pre, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint52d_pre, checkpoint57g_post, checkpoint56b_post, checkpoint57y_post, checkpoint52j_pre, checkpoint54d_post, checkpoint54e_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint52l_post, checkpoint52k_post, checkpoint58, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint53, checkpoint52, checkpoint52f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint57z_post, checkpoint54f_post, checkpoint51t_post, checkpoint55i_post, checkpoint57l_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint57t_post, checkpoint55c_post, checkpoint52e_pre, checkpoint57v_post, checkpoint57f_post, checkpoint52e_post, checkpoint53d_post, checkpoint57a_post, checkpoint57h_pre, checkpoint52b_pre, checkpoint54b_post, checkpoint57h_post, checkpoint52m_post, checkpoint57y_pre, checkpoint55g_post, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint57c_post, checkpoint52f_pre, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint57c_pre, checkpoint55j_post, checkpoint54a_post, checkpoint55h_post, checkpoint51r_post, checkpoint57e_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint52d_post, checkpoint53g_post, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint52a_pre, checkpoint52i_post, checkpoint52h_pre, checkpoint56a_post, checkpoint53f_post, checkpoint57h_done, checkpoint52j_post, checkpoint57j_post, checkpoint57f_pre, branch-netcdf, checkpoint52n_post, checkpoint53b_pre, checkpoint56c_post, checkpoint57a_pre, checkpoint55a_post, checkpoint57o_post, checkpoint51o_post, checkpoint57k_post, checkpoint53b_post, checkpoint52a_post, checkpoint57w_post, ecco_c52_e35, checkpoint57x_post, checkpoint58c_post, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-nonh, netcdf-sm0
Changes since 1.6: +3 -3 lines
o cleaning ALLOW_GRADIENT_CHECK -> ALLOW_GRDCHK
o cleaning some ALLOW_TANGENTLINEAR_RUN -> ALLOW_AUTODIFF
o bug fix in find_alpha.F for MDJWF:
  - modif. to alpha = 1/D*( dN/dT - rho*dD/Dt) to account for
    change rho -> rho-rhoConst
  - replace call find_rho to find_rhonum

1 C $Header: /u/gcmpack/MITgcm/pkg/grdchk/grdchk_init.F,v 1.6 2003/06/24 16:08:45 heimbach Exp $
2
3 #include "CTRL_CPPOPTIONS.h"
4
5
6 subroutine grdchk_init( mythid )
7
8 c ==================================================================
9 c SUBROUTINE grdchk_init
10 c ==================================================================
11 c
12 c o Get the location of a given component of the control vector for
13 c the current process.
14 c
15 c started: Christian Eckert eckert@mit.edu 04-Apr-2000
16 c continued: heimbach@mit.edu: 13-Jun-2001
17 c
18 c ==================================================================
19 c SUBROUTINE grdchk_init
20 c ==================================================================
21
22 implicit none
23
24 c == global variables ==
25
26 #include "EEPARAMS.h"
27 #include "SIZE.h"
28 #include "GRID.h"
29 #include "ctrl.h"
30 #include "grdchk.h"
31
32 c == routine arguments ==
33
34 integer mythid
35
36 #ifdef ALLOW_GRDCHK
37 c == local variables ==
38
39 integer bi,bj
40 integer i,j,k
41 integer irec
42 integer itlo,ithi
43 integer jtlo,jthi
44 integer jmin,jmax
45 integer imin,imax
46
47 integer itest,iobcs
48 integer icomptest
49
50 c == end of interface ==
51
52 jtlo = 1
53 jthi = nsy
54 itlo = 1
55 ithi = nsx
56 jmin = 1
57 jmax = sny
58 imin = 1
59 imax = snx
60
61 _BEGIN_MASTER( mythid )
62
63 c-- initialise
64 do bj = jtlo,jthi
65 do bi = itlo,ithi
66 do k = 1,ncvarnrmax(grdchkvarindex)
67 do iobcs = 1, nobcs
68 nwettile(bi,bj,k,iobcs) = 0
69 enddo
70 enddo
71 enddo
72 enddo
73
74 c-- Determine the number of components of the given
75 c-- control variable on the current tile.
76 if ( ncvargrd(grdchkvarindex) .eq. 'c' ) then
77 do bj = jtlo,jthi
78 do bi = itlo,ithi
79 do k = 1,ncvarnrmax(grdchkvarindex)
80 nwettile(bi,bj,k,1) = nwetctile(bi,bj,k)
81 enddo
82 enddo
83 enddo
84 else if ( ncvargrd(grdchkvarindex) .eq. 's' ) then
85 do bj = jtlo,jthi
86 do bi = itlo,ithi
87 do k = 1,ncvarnrmax(grdchkvarindex)
88 nwettile(bi,bj,k,1) = nwetstile(bi,bj,k)
89 enddo
90 enddo
91 enddo
92 else if ( ncvargrd(grdchkvarindex) .eq. 'w' ) then
93 do bj = jtlo,jthi
94 do bi = itlo,ithi
95 do k = 1,ncvarnrmax(grdchkvarindex)
96 nwettile(bi,bj,k,1) = nwetwtile(bi,bj,k)
97 enddo
98 enddo
99 enddo
100 else if ( ncvargrd(grdchkvarindex) .eq. 'v' ) then
101 do bj = jtlo,jthi
102 do bi = itlo,ithi
103 do k = 1,ncvarnrmax(grdchkvarindex)
104 nwettile(bi,bj,k,1) = nwetvtile(bi,bj,k)
105 enddo
106 enddo
107 enddo
108 else if ( ncvargrd(grdchkvarindex) .eq. 'm' ) then
109 do bj = jtlo,jthi
110 do bi = itlo,ithi
111 do k = 1,ncvarnrmax(grdchkvarindex)
112 do iobcs = 1, nobcs
113 if ( grdchkvarindex .eq. 11 ) then
114 #ifdef ALLOW_OBCSN_CONTROL
115 nwettile(bi,bj,k,iobcs) =
116 & nwetobcsn(bi,bj,k,iobcs)
117 #endif
118 else if ( grdchkvarindex .eq. 12 ) then
119 #ifdef ALLOW_OBCSS_CONTROL
120 nwettile(bi,bj,k,iobcs) =
121 & nwetobcss(bi,bj,k,iobcs)
122 #endif
123 else if ( grdchkvarindex .eq. 13 ) then
124 #ifdef ALLOW_OBCSW_CONTROL
125 nwettile(bi,bj,k,iobcs) =
126 & nwetobcsw(bi,bj,k,iobcs)
127 #endif
128 else if ( grdchkvarindex .eq. 14 ) then
129 #ifdef ALLOW_OBCSE_CONTROL
130 nwettile(bi,bj,k,iobcs) =
131 & nwetobcse(bi,bj,k,iobcs)
132 #endif
133 endif
134 enddo
135 enddo
136 enddo
137 enddo
138 else
139 ce --> wrong grid specification for the control variable.
140 endif
141
142 c-- get mask file for obcs
143 #ifdef ALLOW_OBCS_CONTROL
144 call grdchk_get_obcs_mask ( mythid )
145 #endif
146
147 c ----------------------------------------------------------------
148
149 c-- Determine the actual and the maximum possible number of
150 c-- components of the given control variable.
151 ncvarcomp = 0
152 maxncvarcomps = 0
153 do bj = jtlo,jthi
154 do bi = itlo,ithi
155 do k = 1,ncvarnrmax(grdchkvarindex)
156 do iobcs = 1, nobcs
157 ncvarcomp = ncvarcomp + nwettile(bi,bj,k,iobcs)
158 maxncvarcomps = maxncvarcomps +
159 & ncvarxmax(grdchkvarindex)*
160 & ncvarymax(grdchkvarindex)
161 enddo
162 enddo
163 enddo
164 enddo
165 ncvarcomp = ncvarcomp*ncvarrecs(grdchkvarindex)
166 maxncvarcomps = maxncvarcomps*ncvarrecs(grdchkvarindex)
167
168 _END_MASTER( mythid )
169
170 _BARRIER
171
172 #endif /* ALLOW_GRDCHK */
173
174 end
175

  ViewVC Help
Powered by ViewVC 1.1.22