/[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.9 - (hide annotations) (download)
Sun Oct 26 01:01:23 2003 UTC (20 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51q_post, checkpoint51o_post, checkpoint51p_post
Changes since 1.8: +10 -8 lines
o Correcting initialisations for fVerU, fVerV.
o helping TAF to recognize dependency on kUp for
  fVerU, fVerV

1 heimbach 1.9 C $Header: /u/gcmpack/MITgcm/pkg/mom_vecinv/mom_vecinv.F,v 1.8 2003/10/10 23:00:01 heimbach 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     _RL wVelBottomOverride
119     LOGICAL bottomDragTerms
120     _RL KE(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
121     _RL omega3(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
122     _RL vort3(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
123     _RL hDiv(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
124    
125 heimbach 1.9 #ifdef ALLOW_AUTODIFF_TAMC
126     C-- only the kDown part of fverU/V is set in this subroutine
127     C-- the kUp is still required
128     C-- In the case of mom_fluxform Kup is set as well
129     C-- (at least in part)
130     fVerU(1,1,kUp) = fVerU(1,1,kUp)
131     fVerV(1,1,kUp) = fVerV(1,1,kUp)
132     #endif
133    
134 adcroft 1.1 rVelMaskOverride=1.
135     IF ( k .EQ. 1 ) rVelMaskOverride=freeSurfFac
136     wVelBottomOverride=1.
137     IF (k.EQ.Nr) wVelBottomOverride=0.
138    
139     C Initialise intermediate terms
140     DO J=1-OLy,sNy+OLy
141     DO I=1-OLx,sNx+OLx
142     aF(i,j) = 0.
143     vF(i,j) = 0.
144     vrF(i,j) = 0.
145     uCf(i,j) = 0.
146     vCf(i,j) = 0.
147     mT(i,j) = 0.
148     pF(i,j) = 0.
149     del2u(i,j) = 0.
150     del2v(i,j) = 0.
151     dStar(i,j) = 0.
152     zStar(i,j) = 0.
153     uDiss(i,j) = 0.
154     vDiss(i,j) = 0.
155     vort3(i,j) = 0.
156     omega3(i,j) = 0.
157     ke(i,j) = 0.
158 heimbach 1.8 #ifdef ALLOW_AUTODIFF_TAMC
159     strain(i,j) = 0. _d 0
160     tension(i,j) = 0. _d 0
161     #endif
162 adcroft 1.1 ENDDO
163     ENDDO
164    
165     C-- Term by term tracer parmeters
166     C o U momentum equation
167     uDudxFac = afFacMom*1.
168     AhDudxFac = vfFacMom*1.
169     A4DuxxdxFac = vfFacMom*1.
170     vDudyFac = afFacMom*1.
171     AhDudyFac = vfFacMom*1.
172     A4DuyydyFac = vfFacMom*1.
173     rVelDudrFac = afFacMom*1.
174     ArDudrFac = vfFacMom*1.
175     mTFacU = mtFacMom*1.
176     fuFac = cfFacMom*1.
177     phxFac = pfFacMom*1.
178     C o V momentum equation
179     uDvdxFac = afFacMom*1.
180     AhDvdxFac = vfFacMom*1.
181     A4DvxxdxFac = vfFacMom*1.
182     vDvdyFac = afFacMom*1.
183     AhDvdyFac = vfFacMom*1.
184     A4DvyydyFac = vfFacMom*1.
185     rVelDvdrFac = afFacMom*1.
186     ArDvdrFac = vfFacMom*1.
187     mTFacV = mtFacMom*1.
188     fvFac = cfFacMom*1.
189     phyFac = pfFacMom*1.
190     vForcFac = foFacMom*1.
191    
192     IF ( no_slip_bottom
193     & .OR. bottomDragQuadratic.NE.0.
194     & .OR. bottomDragLinear.NE.0.) THEN
195     bottomDragTerms=.TRUE.
196     ELSE
197     bottomDragTerms=.FALSE.
198     ENDIF
199    
200     C-- with stagger time stepping, grad Phi_Hyp is directly incoporated in TIMESTEP
201     IF (staggerTimeStep) THEN
202     phxFac = 0.
203     phyFac = 0.
204     ENDIF
205    
206     C-- Calculate open water fraction at vorticity points
207     CALL MOM_CALC_HFACZ(bi,bj,k,hFacZ,r_hFacZ,myThid)
208    
209     C---- Calculate common quantities used in both U and V equations
210     C Calculate tracer cell face open areas
211     DO j=1-OLy,sNy+OLy
212     DO i=1-OLx,sNx+OLx
213     xA(i,j) = _dyG(i,j,bi,bj)
214     & *drF(k)*_hFacW(i,j,k,bi,bj)
215     yA(i,j) = _dxG(i,j,bi,bj)
216     & *drF(k)*_hFacS(i,j,k,bi,bj)
217     ENDDO
218     ENDDO
219    
220     C Make local copies of horizontal flow field
221     DO j=1-OLy,sNy+OLy
222     DO i=1-OLx,sNx+OLx
223     uFld(i,j) = uVel(i,j,k,bi,bj)
224     vFld(i,j) = vVel(i,j,k,bi,bj)
225     ENDDO
226     ENDDO
227    
228 jmc 1.7 C note (jmc) : Dissipation and Vort3 advection do not necesary
229     C use the same maskZ (and hFacZ) => needs 2 call(s)
230     c CALL MOM_VI_HFACZ_DISS(bi,bj,k,hFacZ,r_hFacZ,myThid)
231    
232 adcroft 1.1 CALL MOM_VI_CALC_KE(bi,bj,k,uFld,vFld,KE,myThid)
233    
234     CALL MOM_VI_CALC_HDIV(bi,bj,k,uFld,vFld,hDiv,myThid)
235    
236     CALL MOM_VI_CALC_RELVORT3(bi,bj,k,uFld,vFld,hFacZ,vort3,myThid)
237    
238 jmc 1.5 c CALL MOM_VI_CALC_ABSVORT3(bi,bj,k,vort3,omega3,myThid)
239 adcroft 1.1
240     IF (momViscosity) THEN
241     C Calculate del^2 u and del^2 v for bi-harmonic term
242 adcroft 1.2 IF (viscA4.NE.0.) THEN
243     CALL MOM_VI_DEL2UV(bi,bj,k,hDiv,vort3,hFacZ,
244     O del2u,del2v,
245     & myThid)
246     CALL MOM_VI_CALC_HDIV(bi,bj,k,del2u,del2v,dStar,myThid)
247     CALL MOM_VI_CALC_RELVORT3(
248     & bi,bj,k,del2u,del2v,hFacZ,zStar,myThid)
249     ENDIF
250 adcroft 1.1 C Calculate dissipation terms for U and V equations
251 adcroft 1.2 C in terms of vorticity and divergence
252     IF (viscAh.NE.0. .OR. viscA4.NE.0.) THEN
253     CALL MOM_VI_HDISSIP(bi,bj,k,hDiv,vort3,hFacZ,dStar,zStar,
254     O uDiss,vDiss,
255     & myThid)
256     ENDIF
257 adcroft 1.3 C or in terms of tension and strain
258     IF (viscAstrain.NE.0. .OR. viscAtension.NE.0.) THEN
259     CALL MOM_CALC_TENSION(bi,bj,k,uFld,vFld,
260     O tension,
261     I myThid)
262     CALL MOM_CALC_STRAIN(bi,bj,k,uFld,vFld,hFacZ,
263     O strain,
264     I myThid)
265     CALL MOM_HDISSIP(bi,bj,k,
266     I tension,strain,hFacZ,viscAtension,viscAstrain,
267     O uDiss,vDiss,
268     I myThid)
269     ENDIF
270 adcroft 1.1 ENDIF
271    
272 jmc 1.7 C- Return to standard hfacZ (min-4) and mask vort3 accordingly:
273     c CALL MOM_VI_MASK_VORT3(bi,bj,k,hFacZ,r_hFacZ,vort3,myThid)
274    
275 adcroft 1.1 C---- Zonal momentum equation starts here
276    
277     C-- Vertical flux (fVer is at upper face of "u" cell)
278    
279     C Eddy component of vertical flux (interior component only) -> vrF
280     IF (momViscosity.AND..NOT.implicitViscosity)
281     & CALL MOM_U_RVISCFLUX(bi,bj,k,uVel,KappaRU,vrF,myThid)
282    
283     C Combine fluxes
284     DO j=jMin,jMax
285     DO i=iMin,iMax
286     fVerU(i,j,kDown) = ArDudrFac*vrF(i,j)
287     ENDDO
288     ENDDO
289    
290     C-- Tendency is minus divergence of the fluxes + coriolis + pressure term
291     DO j=2-Oly,sNy+Oly-1
292     DO i=2-Olx,sNx+Olx-1
293     gU(i,j,k,bi,bj) = uDiss(i,j)
294     & -_recip_hFacW(i,j,k,bi,bj)*recip_drF(k)
295     & *recip_rAw(i,j,bi,bj)
296     & *(
297     & +fVerU(i,j,kUp)*rkFac - fVerU(i,j,kDown)*rkFac
298     & )
299 jmc 1.4 & - phxFac*dPhiHydX(i,j)
300 adcroft 1.1 ENDDO
301     ENDDO
302    
303     C-- No-slip and drag BCs appear as body forces in cell abutting topography
304     IF (momViscosity.AND.no_slip_sides) THEN
305     C- No-slip BCs impose a drag at walls...
306     CALL MOM_U_SIDEDRAG(bi,bj,k,uFld,del2u,hFacZ,vF,myThid)
307     DO j=jMin,jMax
308     DO i=iMin,iMax
309     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+vF(i,j)
310     ENDDO
311     ENDDO
312     ENDIF
313 heimbach 1.8
314 adcroft 1.1 C- No-slip BCs impose a drag at bottom
315     IF (momViscosity.AND.bottomDragTerms) THEN
316     CALL MOM_U_BOTTOMDRAG(bi,bj,k,uFld,KE,KappaRU,vF,myThid)
317     DO j=jMin,jMax
318     DO i=iMin,iMax
319     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+vF(i,j)
320     ENDDO
321     ENDDO
322     ENDIF
323    
324     C-- Metric terms for curvilinear grid systems
325     c IF (usingSphericalPolarMTerms) THEN
326     C o Spherical polar grid metric terms
327     c CALL MOM_U_METRIC_NH(bi,bj,k,uFld,wVel,mT,myThid)
328     c DO j=jMin,jMax
329     c DO i=iMin,iMax
330     c gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mTFacU*mT(i,j)
331     c ENDDO
332     c ENDDO
333     c ENDIF
334    
335     C---- Meridional momentum equation starts here
336    
337     C-- Vertical flux (fVer is at upper face of "v" cell)
338    
339     C Eddy component of vertical flux (interior component only) -> vrF
340     IF (momViscosity.AND..NOT.implicitViscosity)
341     & CALL MOM_V_RVISCFLUX(bi,bj,k,vVel,KappaRV,vrf,myThid)
342    
343     C Combine fluxes -> fVerV
344     DO j=jMin,jMax
345     DO i=iMin,iMax
346     fVerV(i,j,kDown) = ArDvdrFac*vrF(i,j)
347     ENDDO
348     ENDDO
349    
350     C-- Tendency is minus divergence of the fluxes + coriolis + pressure term
351     DO j=jMin,jMax
352     DO i=iMin,iMax
353     gV(i,j,k,bi,bj) = vDiss(i,j)
354     & -_recip_hFacS(i,j,k,bi,bj)*recip_drF(k)
355     & *recip_rAs(i,j,bi,bj)
356     & *(
357     & +fVerV(i,j,kUp)*rkFac - fVerV(i,j,kDown)*rkFac
358     & )
359 jmc 1.4 & - phyFac*dPhiHydY(i,j)
360 adcroft 1.1 ENDDO
361     ENDDO
362    
363     C-- No-slip and drag BCs appear as body forces in cell abutting topography
364     IF (momViscosity.AND.no_slip_sides) THEN
365     C- No-slip BCs impose a drag at walls...
366     CALL MOM_V_SIDEDRAG(bi,bj,k,vFld,del2v,hFacZ,vF,myThid)
367     DO j=jMin,jMax
368     DO i=iMin,iMax
369     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vF(i,j)
370     ENDDO
371     ENDDO
372     ENDIF
373     C- No-slip BCs impose a drag at bottom
374     IF (momViscosity.AND.bottomDragTerms) THEN
375     CALL MOM_V_BOTTOMDRAG(bi,bj,k,vFld,KE,KappaRV,vF,myThid)
376     DO j=jMin,jMax
377     DO i=iMin,iMax
378     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vF(i,j)
379     ENDDO
380     ENDDO
381     ENDIF
382    
383     C-- Metric terms for curvilinear grid systems
384     c IF (usingSphericalPolarMTerms) THEN
385     C o Spherical polar grid metric terms
386     c CALL MOM_V_METRIC_NH(bi,bj,k,vFld,wVel,mT,myThid)
387     c DO j=jMin,jMax
388     c DO i=iMin,iMax
389     c gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+mTFacV*mT(i,j)
390     c ENDDO
391     c ENDDO
392     c ENDIF
393    
394 jmc 1.5 C-- Horizontal Coriolis terms
395 jmc 1.6 IF (useCoriolis .AND. .NOT.useCDscheme) THEN
396 jmc 1.7 CALL MOM_VI_CORIOLIS(bi,bj,k,uFld,vFld,omega3,hFacZ,r_hFacZ,
397 jmc 1.5 & uCf,vCf,myThid)
398     DO j=jMin,jMax
399     DO i=iMin,iMax
400     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+uCf(i,j)
401     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vCf(i,j)
402     ENDDO
403 adcroft 1.1 ENDDO
404 jmc 1.5 ENDIF
405 adcroft 1.1
406 jmc 1.5 IF (momAdvection) THEN
407     C-- Horizontal advection of relative vorticity
408     c CALL MOM_VI_U_CORIOLIS(bi,bj,K,vFld,omega3,r_hFacZ,uCf,myThid)
409 jmc 1.7 CALL MOM_VI_U_CORIOLIS(bi,bj,k,vFld,vort3,hFacZ,r_hFacZ,
410     & uCf,myThid)
411 jmc 1.5 c CALL MOM_VI_U_CORIOLIS_C4(bi,bj,K,vFld,vort3,r_hFacZ,uCf,myThid)
412     DO j=jMin,jMax
413     DO i=iMin,iMax
414     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+uCf(i,j)
415     ENDDO
416 adcroft 1.1 ENDDO
417 jmc 1.5 c CALL MOM_VI_V_CORIOLIS(bi,bj,K,uFld,omega3,r_hFacZ,vCf,myThid)
418 jmc 1.7 CALL MOM_VI_V_CORIOLIS(bi,bj,k,uFld,vort3,hFacZ,r_hFacZ,
419     & vCf,myThid)
420 jmc 1.5 c CALL MOM_VI_V_CORIOLIS_C4(bi,bj,K,uFld,vort3,r_hFacZ,vCf,myThid)
421     DO j=jMin,jMax
422     DO i=iMin,iMax
423     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vCf(i,j)
424     ENDDO
425 adcroft 1.1 ENDDO
426    
427 jmc 1.7 #ifdef ALLOW_TIMEAVE
428     IF (taveFreq.GT.0.) THEN
429     CALL TIMEAVE_CUMUL_1K1T(uZetatave,vCf,deltaTClock,
430     & Nr, k, bi, bj, myThid)
431     CALL TIMEAVE_CUMUL_1K1T(vZetatave,uCf,deltaTClock,
432     & Nr, k, bi, bj, myThid)
433     ENDIF
434     #endif
435    
436 jmc 1.5 C-- Vertical shear terms (-w*du/dr & -w*dv/dr)
437     CALL MOM_VI_U_VERTSHEAR(bi,bj,K,uVel,wVel,uCf,myThid)
438     DO j=jMin,jMax
439     DO i=iMin,iMax
440     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+uCf(i,j)
441     ENDDO
442 adcroft 1.1 ENDDO
443 jmc 1.5 CALL MOM_VI_V_VERTSHEAR(bi,bj,K,vVel,wVel,vCf,myThid)
444     DO j=jMin,jMax
445     DO i=iMin,iMax
446     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vCf(i,j)
447     ENDDO
448 adcroft 1.1 ENDDO
449    
450     C-- Bernoulli term
451 jmc 1.5 CALL MOM_VI_U_GRAD_KE(bi,bj,K,KE,uCf,myThid)
452     DO j=jMin,jMax
453     DO i=iMin,iMax
454     gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+uCf(i,j)
455     ENDDO
456     ENDDO
457     CALL MOM_VI_V_GRAD_KE(bi,bj,K,KE,vCf,myThid)
458     DO j=jMin,jMax
459     DO i=iMin,iMax
460     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+vCf(i,j)
461     ENDDO
462 adcroft 1.1 ENDDO
463 jmc 1.5 C-- end if momAdvection
464     ENDIF
465    
466     C-- Set du/dt & dv/dt on boundaries to zero
467 adcroft 1.1 DO j=jMin,jMax
468     DO i=iMin,iMax
469 jmc 1.5 gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)*_maskW(i,j,k,bi,bj)
470     gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)*_maskS(i,j,k,bi,bj)
471 adcroft 1.1 ENDDO
472     ENDDO
473 jmc 1.5
474 adcroft 1.2
475     IF (
476     & DIFFERENT_MULTIPLE(diagFreq,myCurrentTime,
477     & myCurrentTime-deltaTClock)
478     & ) THEN
479 adcroft 1.3 CALL WRITE_LOCAL_RL('Ds','I10',1,strain,bi,bj,k,myIter,myThid)
480     CALL WRITE_LOCAL_RL('Dt','I10',1,tension,bi,bj,k,myIter,myThid)
481 adcroft 1.2 CALL WRITE_LOCAL_RL('fV','I10',1,uCf,bi,bj,k,myIter,myThid)
482     CALL WRITE_LOCAL_RL('fU','I10',1,vCf,bi,bj,k,myIter,myThid)
483     CALL WRITE_LOCAL_RL('Du','I10',1,uDiss,bi,bj,k,myIter,myThid)
484     CALL WRITE_LOCAL_RL('Dv','I10',1,vDiss,bi,bj,k,myIter,myThid)
485 adcroft 1.3 CALL WRITE_LOCAL_RL('Z3','I10',1,vort3,bi,bj,k,myIter,myThid)
486 jmc 1.5 c CALL WRITE_LOCAL_RL('W3','I10',1,omega3,bi,bj,k,myIter,myThid)
487 adcroft 1.3 CALL WRITE_LOCAL_RL('KE','I10',1,KE,bi,bj,k,myIter,myThid)
488     CALL WRITE_LOCAL_RL('D','I10',1,hdiv,bi,bj,k,myIter,myThid)
489 adcroft 1.1 ENDIF
490 jmc 1.7
491     #endif /* DISABLE_MOM_VECINV */
492 adcroft 1.1
493     RETURN
494     END

  ViewVC Help
Powered by ViewVC 1.1.22