/[MITgcm]/MITgcm/model/src/calc_gw.F
ViewVC logotype

Diff of /MITgcm/model/src/calc_gw.F

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

revision 1.40 by jmc, Fri Feb 27 01:47:41 2009 UTC revision 1.45 by jmc, Tue May 3 19:26:03 2011 UTC
# Line 89  C     i,j,k         :: Loop counters Line 89  C     i,j,k         :: Loop counters
89        _RL    gwAdd (1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL    gwAdd (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
90        _RL    del2w (1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL    del2w (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
91        _RL    wFld  (1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL    wFld  (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
92        INTEGER i,j,k, kp1        INTEGER i,j,k, km1, kp1
93        _RL  wOverride        _RL  mskM1, mskP1
94        _RL  tmp_WbarZ        _RL  tmp_WbarZ
95        _RL  uTrans, vTrans, rTrans        _RL  uTrans, vTrans, rTrans
96        _RL  viscLoc        _RL  viscLoc
97        _RL  halfRL        _RL  halfRL
98        _RS  halfRS, zeroRS        _RS  halfRS, zeroRS
99        PARAMETER( halfRL = 0.5D0 )        PARAMETER( halfRL = 0.5 _d 0 )
100        PARAMETER( halfRS = 0.5 , zeroRS = 0. )        PARAMETER( halfRS = 0.5 , zeroRS = 0. )
101        PARAMETER( iMin = 1 , iMax = sNx )        PARAMETER( iMin = 1 , iMax = sNx )
102        PARAMETER( jMin = 1 , jMax = sNy )        PARAMETER( jMin = 1 , jMax = sNy )
# Line 107  CEOP Line 107  CEOP
107        EXTERNAL DIAGNOSTICS_IS_ON        EXTERNAL DIAGNOSTICS_IS_ON
108  #endif /* ALLOW_DIAGNOSTICS */  #endif /* ALLOW_DIAGNOSTICS */
109    
110  C--   Catch barotropic mode  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
       IF ( Nr .LT. 2 ) RETURN  
111    
112  #ifdef ALLOW_DIAGNOSTICS  #ifdef ALLOW_DIAGNOSTICS
113        IF ( useDiagnostics ) THEN        IF ( useDiagnostics ) THEN
# Line 143  C-    Initialize del2w to zero: Line 142  C-    Initialize del2w to zero:
142          ENDDO          ENDDO
143        ENDIF        ENDIF
144    
145  C--   Boundaries condition at top  C--   Boundaries condition at top (vertical advection of vertical momentum):
146        DO j=1-OLy,sNy+OLy        DO j=1-OLy,sNy+OLy
147         DO i=1-OLx,sNx+OLx         DO i=1-OLx,sNx+OLx
148           flxAdvUp(i,j) = 0.           flxAdvUp(i,j) = 0.
149           flxDisUp(i,j) = 0.  c        flxDisUp(i,j) = 0.
150         ENDDO         ENDDO
151        ENDDO        ENDDO
152    
153    
154  C---  Sweep down column  C---  Sweep down column
155        DO k=2,Nr        DO k=1,Nr
156          kp1=k+1          km1 = MAX( k-1, 1 )
157          wOverRide=1.          kp1 = MIN( k+1,Nr )
158          IF (k.EQ.Nr) THEN          mskM1 = 1.
159            kp1=Nr          mskP1 = 1.
160            wOverRide=0.          IF ( k.EQ. 1 ) mskM1 = 0.
161          ENDIF          IF ( k.EQ.Nr ) mskP1 = 0.
162            IF ( k.GT.1 ) THEN
163  C--   Compute grid factor arround a W-point:  C--   Compute grid factor arround a W-point:
164  #ifdef CALC_GW_NEW_THICK  #ifdef CALC_GW_NEW_THICK
165          DO j=1-Oly,sNy+Oly           DO j=1-Oly,sNy+Oly
166           DO i=1-Olx,sNx+Olx            DO i=1-Olx,sNx+Olx
167             IF ( maskC(i,j,k-1,bi,bj).EQ.0. .OR.             IF ( maskC(i,j,k-1,bi,bj).EQ.0. .OR.
168       &          maskC(i,j, k ,bi,bj).EQ.0. ) THEN       &          maskC(i,j, k ,bi,bj).EQ.0. ) THEN
169               recip_rThickC(i,j) = 0.               recip_rThickC(i,j) = 0.
# Line 173  C-    valid in z & p coord.; also accura Line 174  C-    valid in z & p coord.; also accura
174       &         - MAX( R_low(i,j,bi,bj),  rC(k)   )       &         - MAX( R_low(i,j,bi,bj),  rC(k)   )
175       &        )       &        )
176             ENDIF             ENDIF
177              ENDDO
178           ENDDO           ENDDO
179          ENDDO           IF (momViscosity) THEN
         IF (momViscosity) THEN  
180           DO j=1-Oly,sNy+Oly           DO j=1-Oly,sNy+Oly
181            DO i=1-Olx,sNx+Olx            DO i=1-Olx,sNx+Olx
182             rThickC_C(i,j) = MAX( zeroRS,             rThickC_C(i,j) = MAX( zeroRS,
# Line 208  C deep-model: xA,yA is only used for vis Line 209  C deep-model: xA,yA is only used for vis
209  C this gives deepFacF*recip_deepFacF => cancel each other (and therefore omitted)  C this gives deepFacF*recip_deepFacF => cancel each other (and therefore omitted)
210            ENDDO            ENDDO
211           ENDDO           ENDDO
212          ENDIF           ENDIF
213  #else /* CALC_GW_NEW_THICK */  #else /* CALC_GW_NEW_THICK */
214          DO j=1-Oly,sNy+Oly           DO j=1-Oly,sNy+Oly
215           DO i=1-Olx,sNx+Olx            DO i=1-Olx,sNx+Olx
216  C-    note: assume fluid @ smaller k than bottom: does not work in p-coordinate !  C-    note: assume fluid @ smaller k than bottom: does not work in p-coordinate !
217             IF ( maskC(i,j,k,bi,bj).EQ.0. ) THEN             IF ( maskC(i,j,k,bi,bj).EQ.0. ) THEN
218               recip_rThickC(i,j) = 0.               recip_rThickC(i,j) = 0.
# Line 246  c    &                              *dee Line 247  c    &                              *dee
247  C deep-model: xA,yA is only used for viscous flux, in terms like: xA/dxC,yA/dyC.  C deep-model: xA,yA is only used for viscous flux, in terms like: xA/dxC,yA/dyC.
248  C this gives deepFacF*recip_deepFacF => cancel each other (and therefore omitted)  C this gives deepFacF*recip_deepFacF => cancel each other (and therefore omitted)
249  c          ENDIF  c          ENDIF
250              ENDDO
251           ENDDO           ENDDO
         ENDDO  
252  #endif /* CALC_GW_NEW_THICK */  #endif /* CALC_GW_NEW_THICK */
253            ELSEIF ( selectNHfreeSurf.GE.1 ) THEN
254             DO j=1-Oly,sNy+Oly
255              DO i=1-Olx,sNx+Olx
256               recip_rThickC(i,j) = recip_drC(k)
257    c          rThickC_C(i,j) = drC(k)
258    c          rThickC_W(i,j) = drC(k)
259    c          rThickC_S(i,j) = drC(k)
260    c          xA(i,j) = _dyG(i,j,bi,bj)*drC(k)
261    c          yA(i,j) = _dxG(i,j,bi,bj)*drC(k)
262              ENDDO
263             ENDDO
264            ENDIF
265    
266    C--   local copy of wVel:
267            DO j=1-Oly,sNy+Oly
268              DO i=1-Olx,sNx+Olx
269                wFld(i,j) = wVel(i,j,k,bi,bj)
270              ENDDO
271            ENDDO
272    
273  C--   horizontal bi-harmonic dissipation  C--   horizontal bi-harmonic dissipation
274          IF (momViscosity .AND. viscA4W.NE.0. ) THEN          IF ( momViscosity .AND. k.GT.1 .AND. viscA4W.NE.0. ) THEN
275    
 C-    local copy of wVel:  
           DO j=1-Oly,sNy+Oly  
            DO i=1-Olx,sNx+Olx  
              wFld(i,j) = wVel(i,j,k,bi,bj)  
            ENDDO  
           ENDDO  
276  C-    calculate the horizontal Laplacian of vertical flow  C-    calculate the horizontal Laplacian of vertical flow
277  C     Zonal flux d/dx W  C     Zonal flux d/dx W
278            IF ( useCubedSphereExchange ) THEN            IF ( useCubedSphereExchange ) THEN
# Line 275  C     to compute d/dx(W), fill corners w Line 289  C     to compute d/dx(W), fill corners w
289  #ifdef COSINEMETH_III  #ifdef COSINEMETH_III
290       &              *sqCosFacU(j,bi,bj)       &              *sqCosFacU(j,bi,bj)
291  #endif  #endif
292    #ifdef ALLOW_OBCS
293         &              *maskInW(i,j,bi,bj)
294    #endif
295             ENDDO             ENDDO
296            ENDDO            ENDDO
297    
# Line 297  C     to compute d/dy(W), fill corners w Line 314  C     to compute d/dy(W), fill corners w
314       &              *sqCosFacV(j,bi,bj)       &              *sqCosFacV(j,bi,bj)
315  #endif  #endif
316  #endif  #endif
317    #ifdef ALLOW_OBCS
318         &              *maskInS(i,j,bi,bj)
319    #endif
320             ENDDO             ENDDO
321            ENDDO            ENDDO
322    
# Line 313  C     Divergence of horizontal fluxes Line 333  C     Divergence of horizontal fluxes
333  C end if biharmonic viscosity  C end if biharmonic viscosity
334          ENDIF          ENDIF
335    
336          IF (momViscosity) THEN          IF ( momViscosity .AND. k.GT.1 ) THEN
337  C Viscous Flux on Western face  C Viscous Flux on Western face
338            DO j=jMin,jMax            DO j=jMin,jMax
339             DO i=iMin,iMax+1             DO i=iMin,iMax+1
# Line 364  C     Interpolate vert viscosity to cent Line 384  C     Interpolate vert viscosity to cent
384       &                  +KappaRV(i,j,kp1)+KappaRV(i,j+1,kp1)       &                  +KappaRV(i,j,kp1)+KappaRV(i,j+1,kp1)
385       &                 )*0.125 _d 0       &                 )*0.125 _d 0
386               flx_Dn(i,j) =               flx_Dn(i,j) =
387       &          - viscLoc*( wVel(i,j,kp1,bi,bj)*wOverRide       &          - viscLoc*( wVel(i,j,kp1,bi,bj)*mskP1
388       &                     -wVel(i,j, k ,bi,bj) )*rkSign       &                     -wVel(i,j, k ,bi,bj) )*rkSign
389       &                   *recip_drF(k)*rA(i,j,bi,bj)       &                   *recip_drF(k)*rA(i,j,bi,bj)
390       &                   *deepFac2C(k)*rhoFacC(k)       &                   *deepFac2C(k)*rhoFacC(k)
391             ENDDO             ENDDO
392            ENDDO            ENDDO
393              IF ( k.EQ.2 ) THEN
394    C Viscous Flux on Upper face of W-Cell (= at tracer-cell center, level k-1)
395               DO j=jMin,jMax
396                DO i=iMin,iMax
397    C     Interpolate horizontally (but not vertically) vert viscosity to center:
398    C     Although background visc. might be defined at k=1, this is not
399    C     generally true when using variable visc. (from vertical mixing scheme).
400    C     Therefore, no vert. interp. and only horizontal interpolation.
401                 viscLoc = ( KappaRU(i,j,k) + KappaRU(i+1,j,k)
402         &                  +KappaRV(i,j,k) + KappaRV(i,j+1,k)
403         &                 )*0.25 _d 0
404                 flxDisUp(i,j) =
405         &          - viscLoc*( wVel(i,j, k ,bi,bj)
406         &                     -wVel(i,j,k-1,bi,bj) )*rkSign
407         &                   *recip_drF(k-1)*rA(i,j,bi,bj)
408         &                   *deepFac2C(k-1)*rhoFacC(k-1)
409    C to recover old (before 2009/11/30) results (since flxDisUp(k=2) was zero)
410    c            flxDisUp(i,j) = 0.
411                ENDDO
412               ENDDO
413              ENDIF
414  C     Tendency is minus divergence of viscous fluxes:  C     Tendency is minus divergence of viscous fluxes:
415  C     anelastic: vert.visc.flx is scaled by rhoFac but hor.visc.fluxes are not  C     anelastic: vert.visc.flx is scaled by rhoFac but hor.visc.fluxes are not
416            DO j=jMin,jMax            DO j=jMin,jMax
# Line 387  C--        prepare for next level (k+1) Line 428  C--        prepare for next level (k+1)
428            ENDDO            ENDDO
429          ENDIF          ENDIF
430    
431          IF ( momViscosity .AND. no_slip_sides ) THEN          IF ( momViscosity .AND. k.GT.1 .AND. no_slip_sides ) THEN
432  C-     No-slip BCs impose a drag at walls...  C-     No-slip BCs impose a drag at walls...
433            CALL MOM_W_SIDEDRAG(            CALL MOM_W_SIDEDRAG(
434       I               bi,bj,k,       I               bi,bj,k,
# Line 406  C-     No-slip BCs impose a drag at wall Line 447  C-     No-slip BCs impose a drag at wall
447  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
448    
449          IF ( momAdvection ) THEN          IF ( momAdvection ) THEN
450    
451             IF ( k.GT.1 .OR. selectNHfreeSurf.GE.1 ) THEN
452  C Advective Flux on Western face  C Advective Flux on Western face
453            DO j=jMin,jMax            DO j=jMin,jMax
454             DO i=iMin,iMax+1             DO i=iMin,iMax+1
455  C     transport through Western face area:  C     transport through Western face area:
456               uTrans = (               uTrans = (
457       &          drF(k-1)*_hFacW(i,j,k-1,bi,bj)*uVel(i,j,k-1,bi,bj)       &          drF(km1)*_hFacW(i,j,km1,bi,bj)*uVel(i,j,km1,bi,bj)
458       &                  *rhoFacC(k-1)       &                  *rhoFacC(km1)*mskM1
459       &        + drF( k )*_hFacW(i,j, k ,bi,bj)*uVel(i,j, k ,bi,bj)       &        + drF( k )*_hFacW(i,j, k ,bi,bj)*uVel(i,j, k ,bi,bj)
460       &                  *rhoFacC(k)       &                  *rhoFacC(k)
461       &                )*halfRL*_dyG(i,j,bi,bj)*deepFacF(k)       &                )*halfRL*_dyG(i,j,bi,bj)*deepFacF(k)
462               flx_EW(i,j)=               flx_EW(i,j) = uTrans*(wFld(i,j)+wFld(i-1,j))*halfRL
463       &         uTrans*(wVel(i,j,k,bi,bj)+wVel(i-1,j,k,bi,bj))*halfRL  c            flx_EW(i,j)=
464    c    &         uTrans*(wVel(i,j,k,bi,bj)+wVel(i-1,j,k,bi,bj))*halfRL
465             ENDDO             ENDDO
466            ENDDO            ENDDO
467  C Advective Flux on Southern face  C Advective Flux on Southern face
# Line 425  C Advective Flux on Southern face Line 469  C Advective Flux on Southern face
469             DO i=iMin,iMax             DO i=iMin,iMax
470  C     transport through Southern face area:  C     transport through Southern face area:
471               vTrans = (               vTrans = (
472       &          drF(k-1)*_hFacS(i,j,k-1,bi,bj)*vVel(i,j,k-1,bi,bj)       &          drF(km1)*_hFacS(i,j,km1,bi,bj)*vVel(i,j,km1,bi,bj)
473       &                  *rhoFacC(k-1)       &                  *rhoFacC(km1)*mskM1
474       &         +drF( k )*_hFacS(i,j, k ,bi,bj)*vVel(i,j, k ,bi,bj)       &         +drF( k )*_hFacS(i,j, k ,bi,bj)*vVel(i,j, k ,bi,bj)
475       &                  *rhoFacC(k)       &                  *rhoFacC(k)
476       &                )*halfRL*_dxG(i,j,bi,bj)*deepFacF(k)       &                )*halfRL*_dxG(i,j,bi,bj)*deepFacF(k)
477               flx_NS(i,j)=               flx_NS(i,j) = vTrans*(wFld(i,j)+wFld(i,j-1))*halfRL
478       &         vTrans*(wVel(i,j,k,bi,bj)+wVel(i,j-1,k,bi,bj))*halfRL  c            flx_NS(i,j)=
479    c    &         vTrans*(wVel(i,j,k,bi,bj)+wVel(i,j-1,k,bi,bj))*halfRL
480             ENDDO             ENDDO
481            ENDDO            ENDDO
482             ENDIF
483  C Advective Flux on Lower face of W-Cell (= at tracer-cell center, level k)  C Advective Flux on Lower face of W-Cell (= at tracer-cell center, level k)
484    c        IF (.TRUE.) THEN
485            DO j=jMin,jMax            DO j=jMin,jMax
486             DO i=iMin,iMax             DO i=iMin,iMax
487  C     NH in p-coord.: advect wSpeed [m/s] with rTrans  C     NH in p-coord.: advect wSpeed [m/s] with rTrans
488               tmp_WbarZ = halfRL*               tmp_WbarZ = halfRL*
489       &              ( wVel(i,j, k ,bi,bj)*rVel2wUnit(k)       &              ( wVel(i,j, k ,bi,bj)*rVel2wUnit( k )
490       &               +wVel(i,j,kp1,bi,bj)*rVel2wUnit(kp1)*wOverRide )       &               +wVel(i,j,kp1,bi,bj)*rVel2wUnit(kp1)*mskP1 )
491  C     transport through Lower face area:  C     transport through Lower face area:
492               rTrans = halfRL*               rTrans = halfRL*
493       &              ( wVel(i,j, k ,bi,bj)*deepFac2F( k )*rhoFacF( k )       &              ( wVel(i,j, k ,bi,bj)*deepFac2F( k )*rhoFacF( k )
494       &               +wVel(i,j,kp1,bi,bj)*deepFac2F(kp1)*rhoFacF(kp1)       &               +wVel(i,j,kp1,bi,bj)*deepFac2F(kp1)*rhoFacF(kp1)
495       &                                   *wOverRide       &                                   *mskP1
496       &              )*rA(i,j,bi,bj)       &              )*rA(i,j,bi,bj)
497               flx_Dn(i,j) = rTrans*tmp_WbarZ               flx_Dn(i,j) = rTrans*tmp_WbarZ
498             ENDDO             ENDDO
499            ENDDO            ENDDO
500    c        ENDIF
501             IF ( k.EQ.1 .AND. selectNHfreeSurf.GE.1 ) THEN
502    C Advective Flux on Upper face of W-Cell (= at surface)
503               DO j=jMin,jMax
504                DO i=iMin,iMax
505                 tmp_WbarZ = wVel(i,j,k,bi,bj)*rVel2wUnit(k)
506                 rTrans = wVel(i,j,k,bi,bj)*deepFac2F(k)*rhoFacF(k)
507         &               *rA(i,j,bi,bj)
508                 flxAdvUp(i,j) = rTrans*tmp_WbarZ
509    c            flxAdvUp(i,j) = 0.
510                ENDDO
511               ENDDO
512             ENDIF
513             IF ( k.GT.1 .OR. selectNHfreeSurf.GE.1 ) THEN
514  C     Tendency is minus divergence of advective fluxes:  C     Tendency is minus divergence of advective fluxes:
515  C     anelastic: all transports & advect. fluxes are scaled by rhoFac  C     anelastic: all transports & advect. fluxes are scaled by rhoFac
516            DO j=jMin,jMax            DO j=jMin,jMax
517             DO i=iMin,iMax             DO i=iMin,iMax
518    C to recover old (before 2009/11/30) results (since flxAdvUp(k=2) was zero)
519    c            IF (k.EQ.2) flxAdvUp(i,j) = 0.
520               gW(i,j,k,bi,bj) =               gW(i,j,k,bi,bj) =
521       &        -(   ( flx_EW(i+1,j)-flx_EW(i,j) )       &        -(   ( flx_EW(i+1,j)-flx_EW(i,j) )
522       &           + ( flx_NS(i,j+1)-flx_NS(i,j) )       &           + ( flx_NS(i,j+1)-flx_NS(i,j) )
523       &           + ( flx_Dn(i,j)-flxAdvUp(i,j) )*rkSign*wUnit2rVel(k)       &           + ( flx_Dn(i,j)-flxAdvUp(i,j) )*rkSign*wUnit2rVel(k)
524       &         )*recip_rA(i,j,bi,bj)*recip_rThickC(i,j)       &         )*recip_rA(i,j,bi,bj)*recip_rThickC(i,j)
525       &          *recip_deepFac2F(k)*recip_rhoFacF(k)       &          *recip_deepFac2F(k)*recip_rhoFacF(k)
526               ENDDO
527              ENDDO
528             ENDIF
529    
530             DO j=jMin,jMax
531               DO i=iMin,iMax
532  C--          prepare for next level (k+1)  C--          prepare for next level (k+1)
533               flxAdvUp(i,j)=flx_Dn(i,j)               flxAdvUp(i,j)=flx_Dn(i,j)
534             ENDDO             ENDDO
535            ENDDO           ENDDO
536    
537    c       ELSE
538    C-    if momAdvection / else
539    c         DO j=1-OLy,sNy+OLy
540    c          DO i=1-OLx,sNx+OLx
541    c            gW(i,j,k,bi,bj) = 0. _d 0
542    c          ENDDO
543    c         ENDDO
544    
545    C-    endif momAdvection.
546          ENDIF          ENDIF
547    
548          IF ( useNHMTerms ) THEN  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
549    
550            IF ( useNHMTerms .AND. k.GT.1 ) THEN
551            CALL MOM_W_METRIC_NH(            CALL MOM_W_METRIC_NH(
552       I               bi,bj,k,       I               bi,bj,k,
553       I               uVel, vVel,       I               uVel, vVel,
# Line 478  C--          prepare for next level (k+1 Line 559  C--          prepare for next level (k+1
559             ENDDO             ENDDO
560            ENDDO            ENDDO
561          ENDIF          ENDIF
562          IF ( use3dCoriolis ) THEN          IF ( use3dCoriolis .AND. k.GT.1 ) THEN
563            CALL MOM_W_CORIOLIS_NH(            CALL MOM_W_CORIOLIS_NH(
564       I               bi,bj,k,       I               bi,bj,k,
565       I               uVel, vVel,       I               uVel, vVel,
# Line 499  C---+----1----+----2----+----3----+----4 Line 580  C---+----1----+----2----+----3----+----4
580       &                           k, 1, 2, bi,bj, myThid )       &                           k, 1, 2, bi,bj, myThid )
581  C- note: needs to explicitly increment the counter since DIAGNOSTICS_FILL  C- note: needs to explicitly increment the counter since DIAGNOSTICS_FILL
582  C        does it only if k=1 (never the case here)  C        does it only if k=1 (never the case here)
583            IF ( k.EQ.2 ) CALL DIAGNOSTICS_COUNT('Wm_Diss ',bi,bj,myThid)  c         IF ( k.EQ.2 ) CALL DIAGNOSTICS_COUNT('Wm_Diss ',bi,bj,myThid)
584          ENDIF          ENDIF
585          IF ( diagAdvec ) THEN          IF ( diagAdvec ) THEN
586            CALL DIAGNOSTICS_FILL( gW, 'Wm_Advec',            CALL DIAGNOSTICS_FILL( gW, 'Wm_Advec',
587       &                           k,Nr, 1, bi,bj, myThid )       &                           k,Nr, 1, bi,bj, myThid )
588            IF ( k.EQ.2 ) CALL DIAGNOSTICS_COUNT('Wm_Advec',bi,bj,myThid)  c         IF ( k.EQ.2 ) CALL DIAGNOSTICS_COUNT('Wm_Advec',bi,bj,myThid)
589          ENDIF          ENDIF
590  #endif /* ALLOW_DIAGNOSTICS */  #endif /* ALLOW_DIAGNOSTICS */
591    
# Line 519  C--   Dissipation term inside the Adams- Line 600  C--   Dissipation term inside the Adams-
600    
601  C-    Compute effective gW_[n+1/2] terms (including Adams-Bashforth weights)  C-    Compute effective gW_[n+1/2] terms (including Adams-Bashforth weights)
602  C     and save gW_[n] into gwNm1 for the next time step.  C     and save gW_[n] into gwNm1 for the next time step.
603  c#ifdef ALLOW_ADAMSBASHFORTH_3  #ifdef ALLOW_ADAMSBASHFORTH_3
604  c       CALL ADAMS_BASHFORTH3(          CALL ADAMS_BASHFORTH3(
605  c    I                         bi, bj, k,       I                         bi, bj, k,
606  c    U                         gW, gwNm,       U                         gW, gwNm,
607  c    I                         nHydStartAB, myIter, myThid )       I                         nHydStartAB, myIter, myThid )
608  c#else /* ALLOW_ADAMSBASHFORTH_3 */  #else /* ALLOW_ADAMSBASHFORTH_3 */
609          CALL ADAMS_BASHFORTH2(          CALL ADAMS_BASHFORTH2(
610       I                         bi, bj, k,       I                         bi, bj, k,
611       U                         gW, gwNm1,       U                         gW, gwNm1,
612       I                         nHydStartAB, myIter, myThid )       I                         nHydStartAB, myIter, myThid )
613  c#endif /* ALLOW_ADAMSBASHFORTH_3 */  #endif /* ALLOW_ADAMSBASHFORTH_3 */
614    
615  C--   Dissipation term outside the Adams-Bashforth:  C--   Dissipation term outside the Adams-Bashforth:
616          IF ( momViscosity .AND. .NOT.momDissip_In_AB ) THEN          IF ( momViscosity .AND. .NOT.momDissip_In_AB ) THEN

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.45

  ViewVC Help
Powered by ViewVC 1.1.22