/[MITgcm]/MITgcm/pkg/mom_vecinv/mom_vecinv.F
ViewVC logotype

Annotation of /MITgcm/pkg/mom_vecinv/mom_vecinv.F

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


Revision 1.8 - (hide annotations) (download)
Fri Oct 10 23:00:01 2003 UTC (20 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51o_pre, checkpoint51l_post, checkpoint51n_post, checkpoint51j_post, checkpoint51n_pre, checkpoint51l_pre, checkpoint51m_post
Branch point for: tg2-branch, checkpoint51n_branch
Changes since 1.7: +10 -11 lines
Added some AD-related initialisations in mom_vecinv/ mom_fluxform/

1 heimbach 1.8 C $Header: /u/gcmpack/MITgcm/pkg/mom_vecinv/mom_vecinv.F,v 1.7 2003/08/03 02:49:35 jmc Exp $
2 adcroft 1.2 C $Name: $
3 adcroft 1.1
4     #include "CPP_OPTIONS.h"
5    
6     SUBROUTINE MOM_VECINV(
7     I bi,bj,iMin,iMax,jMin,jMax,k,kUp,kDown,
8 jmc 1.4 I dPhiHydX,dPhiHydY,KappaRU,KappaRV,
9 adcroft 1.1 U fVerU, fVerV,
10 adcroft 1.2 I myCurrentTime, myIter, myThid)
11 adcroft 1.1 C /==========================================================\
12     C | S/R MOM_VECINV |
13     C | o Form the right hand-side of the momentum equation. |
14     C |==========================================================|
15     C | Terms are evaluated one layer at a time working from |
16     C | the bottom to the top. The vertically integrated |
17     C | barotropic flow tendency term is evluated by summing the |
18     C | tendencies. |
19     C | Notes: |
20     C | We have not sorted out an entirely satisfactory formula |
21     C | for the diffusion equation bc with lopping. The present |
22     C | form produces a diffusive flux that does not scale with |
23     C | open-area. Need to do something to solidfy this and to |
24     C | deal "properly" with thin walls. |
25     C \==========================================================/
26     IMPLICIT NONE
27    
28     C == Global variables ==
29     #include "SIZE.h"
30     #include "DYNVARS.h"
31     #include "EEPARAMS.h"
32     #include "PARAMS.h"
33     #include "GRID.h"
34 jmc 1.7 #ifdef ALLOW_TIMEAVE
35     #include "TIMEAVE_STATV.h"
36     #endif
37 adcroft 1.1
38     C == Routine arguments ==
39     C fVerU - Flux of momentum in the vertical
40     C fVerV direction out of the upper face of a cell K
41     C ( flux into the cell above ).
42 jmc 1.4 C dPhiHydX,Y :: Gradient (X & Y dir.) of Hydrostatic Potential
43 adcroft 1.1 C bi, bj, iMin, iMax, jMin, jMax - Range of points for which calculation
44     C results will be set.
45     C kUp, kDown - Index for upper and lower layers.
46     C myThid - Instance number for this innvocation of CALC_MOM_RHS
47 jmc 1.4 _RL dPhiHydX(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
48     _RL dPhiHydY(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
49 adcroft 1.1 _RL KappaRU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
50     _RL KappaRV(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
51     _RL fVerU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)
52     _RL fVerV(1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)
53     INTEGER kUp,kDown
54 adcroft 1.2 _RL myCurrentTime
55     INTEGER myIter
56 adcroft 1.1 INTEGER myThid
57     INTEGER bi,bj,iMin,iMax,jMin,jMax
58    
59 jmc 1.7 #ifndef DISABLE_MOM_VECINV
60    
61 adcroft 1.2 C == Functions ==
62     LOGICAL DIFFERENT_MULTIPLE
63     EXTERNAL DIFFERENT_MULTIPLE
64    
65 adcroft 1.1 C == Local variables ==
66     _RL aF (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
67     _RL vF (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
68     _RL vrF (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
69     _RL uCf (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
70     _RL vCf (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
71     _RL mT (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
72     _RL pF (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
73     _RL del2u(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
74     _RL del2v(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
75 adcroft 1.3 _RL tension(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
76     _RL strain(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
77 adcroft 1.1 _RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
78     _RS r_hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
79     _RS xA(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
80     _RS yA(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
81     _RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
82     _RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
83     _RL dStar(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
84     _RL zStar(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
85     _RL uDiss(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
86     _RL vDiss(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
87     C I,J,K - Loop counters
88     INTEGER i,j,k
89     C rVelMaskOverride - Factor for imposing special surface boundary conditions
90     C ( set according to free-surface condition ).
91     C hFacROpen - Lopped cell factos used tohold fraction of open
92     C hFacRClosed and closed cell wall.
93     _RL rVelMaskOverride
94     C xxxFac - On-off tracer parameters used for switching terms off.
95     _RL uDudxFac
96     _RL AhDudxFac
97     _RL A4DuxxdxFac
98     _RL vDudyFac
99     _RL AhDudyFac
100     _RL A4DuyydyFac
101     _RL rVelDudrFac
102     _RL ArDudrFac
103     _RL fuFac
104     _RL phxFac
105     _RL mtFacU
106     _RL uDvdxFac
107     _RL AhDvdxFac
108     _RL A4DvxxdxFac
109     _RL vDvdyFac
110     _RL AhDvdyFac
111     _RL A4DvyydyFac
112     _RL rVelDvdrFac
113     _RL ArDvdrFac
114     _RL fvFac
115     _RL phyFac
116     _RL vForcFac
117     _RL mtFacV
118     INTEGER km1,kp1
119     _RL wVelBottomOverride
120     LOGICAL bottomDragTerms
121     _RL KE(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
122     _RL omega3(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
123     _RL vort3(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
124     _RL hDiv(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
125    
126     km1=MAX(1,k-1)
127     kp1=MIN(Nr,k+1)
128     rVelMaskOverride=1.
129     IF ( k .EQ. 1 ) rVelMaskOverride=freeSurfFac
130     wVelBottomOverride=1.
131     IF (k.EQ.Nr) wVelBottomOverride=0.
132    
133     C Initialise intermediate terms
134     DO J=1-OLy,sNy+OLy
135     DO I=1-OLx,sNx+OLx
136     aF(i,j) = 0.
137     vF(i,j) = 0.
138     vrF(i,j) = 0.
139     uCf(i,j) = 0.
140     vCf(i,j) = 0.
141     mT(i,j) = 0.
142     pF(i,j) = 0.
143     del2u(i,j) = 0.
144     del2v(i,j) = 0.
145     dStar(i,j) = 0.
146     zStar(i,j) = 0.
147     uDiss(i,j) = 0.
148     vDiss(i,j) = 0.
149     vort3(i,j) = 0.
150     omega3(i,j) = 0.
151     ke(i,j) = 0.
152 heimbach 1.8 #ifdef ALLOW_AUTODIFF_TAMC
153     strain(i,j) = 0. _d 0
154     tension(i,j) = 0. _d 0
155     fVerU(i,j,1) = 0. _d 0
156     fVerU(i,j,2) = 0. _d 0
157     fVerV(i,j,1) = 0. _d 0
158     fVerV(i,j,2) = 0. _d 0
159     #endif
160 adcroft 1.1 ENDDO
161     ENDDO
162    
163     C-- Term by term tracer parmeters
164     C o U momentum equation
165     uDudxFac = afFacMom*1.
166     AhDudxFac = vfFacMom*1.
167     A4DuxxdxFac = vfFacMom*1.
168     vDudyFac = afFacMom*1.
169     AhDudyFac = vfFacMom*1.
170     A4DuyydyFac = vfFacMom*1.
171     rVelDudrFac = afFacMom*1.
172     ArDudrFac = vfFacMom*1.
173     mTFacU = mtFacMom*1.
174     fuFac = cfFacMom*1.
175     phxFac = pfFacMom*1.
176     C o V momentum equation
177     uDvdxFac = afFacMom*1.
178     AhDvdxFac = vfFacMom*1.
179     A4DvxxdxFac = vfFacMom*1.
180     vDvdyFac = afFacMom*1.
181     AhDvdyFac = vfFacMom*1.
182     A4DvyydyFac = vfFacMom*1.
183     rVelDvdrFac = afFacMom*1.
184     ArDvdrFac = vfFacMom*1.
185     mTFacV = mtFacMom*1.
186     fvFac = cfFacMom*1.
187     phyFac = pfFacMom*1.
188     vForcFac = foFacMom*1.
189    
190     IF ( no_slip_bottom
191     & .OR. bottomDragQuadratic.NE.0.
192     & .OR. bottomDragLinear.NE.0.) THEN
193     bottomDragTerms=.TRUE.
194     ELSE
195     bottomDragTerms=.FALSE.
196     ENDIF
197    
198     C-- with stagger time stepping, grad Phi_Hyp is directly incoporated in TIMESTEP
199     IF (staggerTimeStep) THEN
200     phxFac = 0.
201     phyFac = 0.
202     ENDIF
203    
204     C-- Calculate open water fraction at vorticity points
205     CALL MOM_CALC_HFACZ(bi,bj,k,hFacZ,r_hFacZ,myThid)
206    
207     C---- Calculate common quantities used in both U and V equations
208     C Calculate tracer cell face open areas
209     DO j=1-OLy,sNy+OLy
210     DO i=1-OLx,sNx+OLx
211     xA(i,j) = _dyG(i,j,bi,bj)
212     & *drF(k)*_hFacW(i,j,k,bi,bj)
213     yA(i,j) = _dxG(i,j,bi,bj)
214     & *drF(k)*_hFacS(i,j,k,bi,bj)
215     ENDDO
216     ENDDO
217    
218     C Make local copies of horizontal flow field
219     DO j=1-OLy,sNy+OLy
220     DO i=1-OLx,sNx+OLx
221     uFld(i,j) = uVel(i,j,k,bi,bj)
222     vFld(i,j) = vVel(i,j,k,bi,bj)
223     ENDDO
224     ENDDO
225    
226 jmc 1.7 C note (jmc) : Dissipation and Vort3 advection do not necesary
227     C use the same maskZ (and hFacZ) => needs 2 call(s)
228     c CALL MOM_VI_HFACZ_DISS(bi,bj,k,hFacZ,r_hFacZ,myThid)
229    
230 adcroft 1.1 CALL MOM_VI_CALC_KE(bi,bj,k,uFld,vFld,KE,myThid)
231    
232     CALL MOM_VI_CALC_HDIV(bi,bj,k,uFld,vFld,hDiv,myThid)
233    
234     CALL MOM_VI_CALC_RELVORT3(bi,bj,k,uFld,vFld,hFacZ,vort3,myThid)
235    
236 jmc 1.5 c CALL MOM_VI_CALC_ABSVORT3(bi,bj,k,vort3,omega3,myThid)
237 adcroft 1.1
238     IF (momViscosity) THEN
239     C Calculate del^2 u and del^2 v for bi-harmonic term
240 adcroft 1.2 IF (viscA4.NE.0.) THEN
241     CALL MOM_VI_DEL2UV(bi,bj,k,hDiv,vort3,hFacZ,
242     O del2u,del2v,
243     & myThid)
244     CALL MOM_VI_CALC_HDIV(bi,bj,k,del2u,del2v,dStar,myThid)
245     CALL MOM_VI_CALC_RELVORT3(
246     & bi,bj,k,del2u,del2v,hFacZ,zStar,myThid)
247     ENDIF
248 adcroft 1.1 C Calculate dissipation terms for U and V equations
249 adcroft 1.2 C in terms of vorticity and divergence
250     IF (viscAh.NE.0. .OR. viscA4.NE.0.) THEN
251     CALL MOM_VI_HDISSIP(bi,bj,k,hDiv,vort3,hFacZ,dStar,zStar,
252     O uDiss,vDiss,
253     & myThid)
254     ENDIF
255 adcroft 1.3 C or in terms of tension and strain
256     IF (viscAstrain.NE.0. .OR. viscAtension.NE.0.) THEN
257     CALL MOM_CALC_TENSION(bi,bj,k,uFld,vFld,
258     O tension,
259     I myThid)
260     CALL MOM_CALC_STRAIN(bi,bj,k,uFld,vFld,hFacZ,
261     O strain,
262     I myThid)
263     CALL MOM_HDISSIP(bi,bj,k,
264     I tension,strain,hFacZ,viscAtension,viscAstrain,
265     O uDiss,vDiss,
266     I myThid)
267     ENDIF
268 adcroft 1.1 ENDIF
269    
270 jmc 1.7 C- Return to standard hfacZ (min-4) and mask vort3 accordingly:
271     c CALL MOM_VI_MASK_VORT3(bi,bj,k,hFacZ,r_hFacZ,vort3,myThid)
272    
273 adcroft 1.1 C---- Zonal momentum equation starts here
274    
275     C-- Vertical flux (fVer is at upper face of "u" cell)
276    
277     C Eddy component of vertical flux (interior component only) -> vrF
278     IF (momViscosity.AND..NOT.implicitViscosity)
279     & CALL MOM_U_RVISCFLUX(bi,bj,k,uVel,KappaRU,vrF,myThid)
280    
281     C Combine fluxes
282     DO j=jMin,jMax
283     DO i=iMin,iMax
284     fVerU(i,j,kDown) = ArDudrFac*vrF(i,j)
285     ENDDO
286     ENDDO
287    
288     C-- Tendency is minus divergence of the fluxes + coriolis + pressure term
289     DO j=2-Oly,sNy+Oly-1
290     DO i=2-Olx,sNx+Olx-1
291     gU(i,j,k,bi,bj) = uDiss(i,j)
292     & -_recip_hFacW(i,j,k,bi,bj)*recip_drF(k)
293     & *recip_rAw(i,j,bi,bj)
294     & *(
295     & +fVerU(i,j,kUp)*rkFac - fVerU(i,j,kDown)*rkFac
296     & )
297 jmc 1.4 & - phxFac*dPhiHydX(i,j)
298 adcroft 1.1 ENDDO
299     ENDDO
300    
301     C-- No-slip and drag BCs appear as body forces in cell abutting topography
302     IF (momViscosity.AND.no_slip_sides) THEN
303     C- No-slip BCs impose a drag at walls...
304     CALL MOM_U_SIDEDRAG(bi,bj,k,uFld,del2u,hFacZ,vF,myThid)
305     DO j=jMin,jMax
306     DO i=iMin,iMax
307     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+vF(i,j)
308     ENDDO
309     ENDDO
310     ENDIF
311 heimbach 1.8
312 adcroft 1.1 C- No-slip BCs impose a drag at bottom
313     IF (momViscosity.AND.bottomDragTerms) THEN
314     CALL MOM_U_BOTTOMDRAG(bi,bj,k,uFld,KE,KappaRU,vF,myThid)
315     DO j=jMin,jMax
316     DO i=iMin,iMax
317     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+vF(i,j)
318     ENDDO
319     ENDDO
320     ENDIF
321    
322     C-- Metric terms for curvilinear grid systems
323     c IF (usingSphericalPolarMTerms) THEN
324     C o Spherical polar grid metric terms
325     c CALL MOM_U_METRIC_NH(bi,bj,k,uFld,wVel,mT,myThid)
326     c DO j=jMin,jMax
327     c DO i=iMin,iMax
328     c gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mTFacU*mT(i,j)
329     c ENDDO
330     c ENDDO
331     c ENDIF
332    
333     C---- Meridional momentum equation starts here
334    
335     C-- Vertical flux (fVer is at upper face of "v" cell)
336    
337     C Eddy component of vertical flux (interior component only) -> vrF
338     IF (momViscosity.AND..NOT.implicitViscosity)
339     & CALL MOM_V_RVISCFLUX(bi,bj,k,vVel,KappaRV,vrf,myThid)
340    
341     C Combine fluxes -> fVerV
342     DO j=jMin,jMax
343     DO i=iMin,iMax
344     fVerV(i,j,kDown) = ArDvdrFac*vrF(i,j)
345     ENDDO
346     ENDDO
347    
348     C-- Tendency is minus divergence of the fluxes + coriolis + pressure term
349     DO j=jMin,jMax
350     DO i=iMin,iMax
351     gV(i,j,k,bi,bj) = vDiss(i,j)
352     & -_recip_hFacS(i,j,k,bi,bj)*recip_drF(k)
353     & *recip_rAs(i,j,bi,bj)
354     & *(
355     & +fVerV(i,j,kUp)*rkFac - fVerV(i,j,kDown)*rkFac
356     & )
357 jmc 1.4 & - phyFac*dPhiHydY(i,j)
358 adcroft 1.1 ENDDO
359     ENDDO
360    
361     C-- No-slip and drag BCs appear as body forces in cell abutting topography
362     IF (momViscosity.AND.no_slip_sides) THEN
363     C- No-slip BCs impose a drag at walls...
364     CALL MOM_V_SIDEDRAG(bi,bj,k,vFld,del2v,hFacZ,vF,myThid)
365     DO j=jMin,jMax
366     DO i=iMin,iMax
367     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vF(i,j)
368     ENDDO
369     ENDDO
370     ENDIF
371     C- No-slip BCs impose a drag at bottom
372     IF (momViscosity.AND.bottomDragTerms) THEN
373     CALL MOM_V_BOTTOMDRAG(bi,bj,k,vFld,KE,KappaRV,vF,myThid)
374     DO j=jMin,jMax
375     DO i=iMin,iMax
376     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vF(i,j)
377     ENDDO
378     ENDDO
379     ENDIF
380    
381     C-- Metric terms for curvilinear grid systems
382     c IF (usingSphericalPolarMTerms) THEN
383     C o Spherical polar grid metric terms
384     c CALL MOM_V_METRIC_NH(bi,bj,k,vFld,wVel,mT,myThid)
385     c DO j=jMin,jMax
386     c DO i=iMin,iMax
387     c gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+mTFacV*mT(i,j)
388     c ENDDO
389     c ENDDO
390     c ENDIF
391    
392 jmc 1.5 C-- Horizontal Coriolis terms
393 jmc 1.6 IF (useCoriolis .AND. .NOT.useCDscheme) THEN
394 jmc 1.7 CALL MOM_VI_CORIOLIS(bi,bj,k,uFld,vFld,omega3,hFacZ,r_hFacZ,
395 jmc 1.5 & uCf,vCf,myThid)
396     DO j=jMin,jMax
397     DO i=iMin,iMax
398     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+uCf(i,j)
399     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vCf(i,j)
400     ENDDO
401 adcroft 1.1 ENDDO
402 jmc 1.5 ENDIF
403 adcroft 1.1
404 jmc 1.5 IF (momAdvection) THEN
405     C-- Horizontal advection of relative vorticity
406     c CALL MOM_VI_U_CORIOLIS(bi,bj,K,vFld,omega3,r_hFacZ,uCf,myThid)
407 jmc 1.7 CALL MOM_VI_U_CORIOLIS(bi,bj,k,vFld,vort3,hFacZ,r_hFacZ,
408     & uCf,myThid)
409 jmc 1.5 c CALL MOM_VI_U_CORIOLIS_C4(bi,bj,K,vFld,vort3,r_hFacZ,uCf,myThid)
410     DO j=jMin,jMax
411     DO i=iMin,iMax
412     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+uCf(i,j)
413     ENDDO
414 adcroft 1.1 ENDDO
415 jmc 1.5 c CALL MOM_VI_V_CORIOLIS(bi,bj,K,uFld,omega3,r_hFacZ,vCf,myThid)
416 jmc 1.7 CALL MOM_VI_V_CORIOLIS(bi,bj,k,uFld,vort3,hFacZ,r_hFacZ,
417     & vCf,myThid)
418 jmc 1.5 c CALL MOM_VI_V_CORIOLIS_C4(bi,bj,K,uFld,vort3,r_hFacZ,vCf,myThid)
419     DO j=jMin,jMax
420     DO i=iMin,iMax
421     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vCf(i,j)
422     ENDDO
423 adcroft 1.1 ENDDO
424    
425 jmc 1.7 #ifdef ALLOW_TIMEAVE
426     IF (taveFreq.GT.0.) THEN
427     CALL TIMEAVE_CUMUL_1K1T(uZetatave,vCf,deltaTClock,
428     & Nr, k, bi, bj, myThid)
429     CALL TIMEAVE_CUMUL_1K1T(vZetatave,uCf,deltaTClock,
430     & Nr, k, bi, bj, myThid)
431     ENDIF
432     #endif
433    
434 jmc 1.5 C-- Vertical shear terms (-w*du/dr & -w*dv/dr)
435     CALL MOM_VI_U_VERTSHEAR(bi,bj,K,uVel,wVel,uCf,myThid)
436     DO j=jMin,jMax
437     DO i=iMin,iMax
438     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+uCf(i,j)
439     ENDDO
440 adcroft 1.1 ENDDO
441 jmc 1.5 CALL MOM_VI_V_VERTSHEAR(bi,bj,K,vVel,wVel,vCf,myThid)
442     DO j=jMin,jMax
443     DO i=iMin,iMax
444     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vCf(i,j)
445     ENDDO
446 adcroft 1.1 ENDDO
447    
448     C-- Bernoulli term
449 jmc 1.5 CALL MOM_VI_U_GRAD_KE(bi,bj,K,KE,uCf,myThid)
450     DO j=jMin,jMax
451     DO i=iMin,iMax
452     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+uCf(i,j)
453     ENDDO
454     ENDDO
455     CALL MOM_VI_V_GRAD_KE(bi,bj,K,KE,vCf,myThid)
456     DO j=jMin,jMax
457     DO i=iMin,iMax
458     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vCf(i,j)
459     ENDDO
460 adcroft 1.1 ENDDO
461 jmc 1.5 C-- end if momAdvection
462     ENDIF
463    
464     C-- Set du/dt & dv/dt on boundaries to zero
465 adcroft 1.1 DO j=jMin,jMax
466     DO i=iMin,iMax
467 jmc 1.5 gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)*_maskW(i,j,k,bi,bj)
468     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)*_maskS(i,j,k,bi,bj)
469 adcroft 1.1 ENDDO
470     ENDDO
471 jmc 1.5
472 adcroft 1.2
473     IF (
474     & DIFFERENT_MULTIPLE(diagFreq,myCurrentTime,
475     & myCurrentTime-deltaTClock)
476     & ) THEN
477 adcroft 1.3 CALL WRITE_LOCAL_RL('Ds','I10',1,strain,bi,bj,k,myIter,myThid)
478     CALL WRITE_LOCAL_RL('Dt','I10',1,tension,bi,bj,k,myIter,myThid)
479 adcroft 1.2 CALL WRITE_LOCAL_RL('fV','I10',1,uCf,bi,bj,k,myIter,myThid)
480     CALL WRITE_LOCAL_RL('fU','I10',1,vCf,bi,bj,k,myIter,myThid)
481     CALL WRITE_LOCAL_RL('Du','I10',1,uDiss,bi,bj,k,myIter,myThid)
482     CALL WRITE_LOCAL_RL('Dv','I10',1,vDiss,bi,bj,k,myIter,myThid)
483 adcroft 1.3 CALL WRITE_LOCAL_RL('Z3','I10',1,vort3,bi,bj,k,myIter,myThid)
484 jmc 1.5 c CALL WRITE_LOCAL_RL('W3','I10',1,omega3,bi,bj,k,myIter,myThid)
485 adcroft 1.3 CALL WRITE_LOCAL_RL('KE','I10',1,KE,bi,bj,k,myIter,myThid)
486     CALL WRITE_LOCAL_RL('D','I10',1,hdiv,bi,bj,k,myIter,myThid)
487 adcroft 1.1 ENDIF
488 jmc 1.7
489     #endif /* DISABLE_MOM_VECINV */
490 adcroft 1.1
491     RETURN
492     END

  ViewVC Help
Powered by ViewVC 1.1.22