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

Diff of /MITgcm/pkg/mom_fluxform/mom_fluxform.F

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

revision 1.27 by baylor, Mon Sep 26 15:27:11 2005 UTC revision 1.38 by jmc, Thu Nov 23 00:45:18 2006 UTC
# Line 31  CBOP Line 31  CBOP
31  C !ROUTINE: MOM_FLUXFORM  C !ROUTINE: MOM_FLUXFORM
32    
33  C !INTERFACE: ==========================================================  C !INTERFACE: ==========================================================
34        SUBROUTINE MOM_FLUXFORM(        SUBROUTINE MOM_FLUXFORM(
35       I        bi,bj,iMin,iMax,jMin,jMax,k,kUp,kDown,       I        bi,bj,iMin,iMax,jMin,jMax,k,kUp,kDown,
36       I        KappaRU, KappaRV,       I        KappaRU, KappaRV,
37       U        fVerU, fVerV,       U        fVerU, fVerV,
# Line 52  C     == Global variables == Line 52  C     == Global variables ==
52  #include "PARAMS.h"  #include "PARAMS.h"
53  #include "GRID.h"  #include "GRID.h"
54  #include "SURFACE.h"  #include "SURFACE.h"
55    #ifdef ALLOW_AUTODIFF_TAMC
56    # include "tamc.h"
57    # include "tamc_keys.h"
58    # include "MOM_FLUXFORM.h"
59    #endif
60    
61  C !INPUT PARAMETERS: ===================================================  C !INPUT PARAMETERS: ===================================================
62  C  bi,bj                :: tile indices  C  bi,bj                :: tile indices
# Line 93  C  fZon                 :: zonal fluxes Line 98  C  fZon                 :: zonal fluxes
98  C  fMer                 :: meridional fluxes  C  fMer                 :: meridional fluxes
99  C  fVrUp,fVrDw          :: vertical viscous fluxes at interface k-1 & k  C  fVrUp,fVrDw          :: vertical viscous fluxes at interface k-1 & k
100        INTEGER i,j        INTEGER i,j
101    #ifdef ALLOW_AUTODIFF_TAMC
102          INTEGER imomkey
103    #endif
104        _RL vF(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL vF(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
105        _RL v4F(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL v4F(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
106        _RL cF(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL cF(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
# Line 101  C  fVrUp,fVrDw          :: vertical visc Line 109  C  fVrUp,fVrDw          :: vertical visc
109        _RL fMer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL fMer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
110        _RL fVrUp(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL fVrUp(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
111        _RL fVrDw(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL fVrDw(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
112  C     afFacMom      - Tracer parameters for turning terms  C     afFacMom     :: Tracer parameters for turning terms on and off.
113  C     vfFacMom        on and off.  C     vfFacMom
114  C     pfFacMom        afFacMom - Advective terms  C     pfFacMom        afFacMom - Advective terms
115  C     cfFacMom        vfFacMom - Eddy viscosity terms  C     cfFacMom        vfFacMom - Eddy viscosity terms
116  C     mTFacMom        pfFacMom - Pressure terms  C     mtFacMom        pfFacMom - Pressure terms
117  C                     cfFacMom - Coriolis terms  C                     cfFacMom - Coriolis terms
118  C                     foFacMom - Forcing  C                     foFacMom - Forcing
119  C                     mTFacMom - Metric term  C                     mtFacMom - Metric term
120  C     uDudxFac, AhDudxFac, etc ... individual term parameters for switching terms off  C     uDudxFac, AhDudxFac, etc ... individual term parameters for switching terms off
121        _RS    hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RS    hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
122        _RS  r_hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RS  r_hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
# Line 137  C     uDudxFac, AhDudxFac, etc ... indiv Line 145  C     uDudxFac, AhDudxFac, etc ... indiv
145        _RL  ArDudrFac        _RL  ArDudrFac
146        _RL  fuFac        _RL  fuFac
147        _RL  mtFacU        _RL  mtFacU
148          _RL  mtNHFacU
149        _RL  uDvdxFac        _RL  uDvdxFac
150        _RL  AhDvdxFac        _RL  AhDvdxFac
151        _RL  vDvdyFac        _RL  vDvdyFac
# Line 145  C     uDudxFac, AhDudxFac, etc ... indiv Line 154  C     uDudxFac, AhDudxFac, etc ... indiv
154        _RL  ArDvdrFac        _RL  ArDvdrFac
155        _RL  fvFac        _RL  fvFac
156        _RL  mtFacV        _RL  mtFacV
157          _RL  mtNHFacV
158          _RL  sideMaskFac
159        LOGICAL bottomDragTerms,harmonic,biharmonic,useVariableViscosity        LOGICAL bottomDragTerms,harmonic,biharmonic,useVariableViscosity
160  CEOP  CEOP
161    
162    #ifdef ALLOW_AUTODIFF_TAMC
163              act0 = k - 1
164              max0 = Nr
165              act1 = bi - myBxLo(myThid)
166              max1 = myBxHi(myThid) - myBxLo(myThid) + 1
167              act2 = bj - myByLo(myThid)
168              max2 = myByHi(myThid) - myByLo(myThid) + 1
169              act3 = myThid - 1
170              max3 = nTx*nTy
171              act4 = ikey_dynamics - 1
172              imomkey = (act0 + 1)
173         &                    + act1*max0
174         &                    + act2*max0*max1
175         &                    + act3*max0*max1*max2
176         &                    + act4*max0*max1*max2*max3
177    #endif /* ALLOW_AUTODIFF_TAMC */
178    
179  C     Initialise intermediate terms  C     Initialise intermediate terms
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
# Line 161  C     Initialise intermediate terms Line 189  C     Initialise intermediate terms
189          fVrDw(i,j)= 0.          fVrDw(i,j)= 0.
190          rTransU(i,j)= 0.          rTransU(i,j)= 0.
191          rTransV(i,j)= 0.          rTransV(i,j)= 0.
192    c       KE(i,j)     = 0.
193    c       hDiv(i,j)   = 0.
194            vort3(i,j)  = 0.
195          strain(i,j) = 0.          strain(i,j) = 0.
196          tension(i,j)= 0.          tension(i,j)= 0.
197          guDiss(i,j) = 0.          guDiss(i,j) = 0.
# Line 176  C     o U momentum equation Line 207  C     o U momentum equation
207        AhDudyFac    = vfFacMom*1.        AhDudyFac    = vfFacMom*1.
208        rVelDudrFac  = afFacMom*1.        rVelDudrFac  = afFacMom*1.
209        ArDudrFac    = vfFacMom*1.        ArDudrFac    = vfFacMom*1.
210        mTFacU       = mtFacMom*1.        mtFacU       = mtFacMom*1.
211          mtNHFacU     = 1.
212        fuFac        = cfFacMom*1.        fuFac        = cfFacMom*1.
213  C     o V momentum equation  C     o V momentum equation
214        uDvdxFac     = afFacMom*1.        uDvdxFac     = afFacMom*1.
# Line 185  C     o V momentum equation Line 217  C     o V momentum equation
217        AhDvdyFac    = vfFacMom*1.        AhDvdyFac    = vfFacMom*1.
218        rVelDvdrFac  = afFacMom*1.        rVelDvdrFac  = afFacMom*1.
219        ArDvdrFac    = vfFacMom*1.        ArDvdrFac    = vfFacMom*1.
220        mTFacV       = mtFacMom*1.        mtFacV       = mtFacMom*1.
221          mtNHFacV     = 1.
222        fvFac        = cfFacMom*1.        fvFac        = cfFacMom*1.
223    
224        IF (implicitViscosity) THEN        IF (implicitViscosity) THEN
# Line 193  C     o V momentum equation Line 226  C     o V momentum equation
226          ArDvdrFac  = 0.          ArDvdrFac  = 0.
227        ENDIF        ENDIF
228    
229    C note: using standard stencil (no mask) results in under-estimating
230    C       vorticity at a no-slip boundary by a factor of 2 = sideDragFactor
231          IF ( no_slip_sides ) THEN
232            sideMaskFac = sideDragFactor
233          ELSE
234            sideMaskFac = 0. _d 0
235          ENDIF
236    
237        IF (     no_slip_bottom        IF (     no_slip_bottom
238       &    .OR. bottomDragQuadratic.NE.0.       &    .OR. bottomDragQuadratic.NE.0.
239       &    .OR. bottomDragLinear.NE.0.) THEN       &    .OR. bottomDragLinear.NE.0.) THEN
# Line 232  C     Calculate velocity field "volume t Line 273  C     Calculate velocity field "volume t
273        ENDDO        ENDDO
274    
275        CALL MOM_CALC_KE(bi,bj,k,2,uFld,vFld,KE,myThid)        CALL MOM_CALC_KE(bi,bj,k,2,uFld,vFld,KE,myThid)
276        CALL MOM_CALC_HDIV(bi,bj,k,2,uFld,vFld,hDiv,myThid)        IF ( momViscosity) THEN
277        CALL MOM_CALC_RELVORT3(bi,bj,k,uFld,vFld,hFacZ,vort3,myThid)          CALL MOM_CALC_HDIV(bi,bj,k,2,uFld,vFld,hDiv,myThid)
278        CALL MOM_CALC_TENSION(bi,bj,k,uFld,vFld,tension,myThid)          CALL MOM_CALC_RELVORT3(bi,bj,k,uFld,vFld,hFacZ,vort3,myThid)
279        CALL MOM_CALC_STRAIN(bi,bj,k,uFld,vFld,hFacZ,strain,myThid)          CALL MOM_CALC_TENSION(bi,bj,k,uFld,vFld,tension,myThid)
280            CALL MOM_CALC_STRAIN(bi,bj,k,uFld,vFld,hFacZ,strain,myThid)
281            DO j=1-Oly,sNy+Oly
282             DO i=1-Olx,sNx+Olx
283               IF ( hFacZ(i,j).EQ.0. ) THEN
284                 vort3(i,j)  = sideMaskFac*vort3(i,j)
285                 strain(i,j) = sideMaskFac*strain(i,j)
286               ENDIF
287             ENDDO
288            ENDDO
289    #ifdef ALLOW_DIAGNOSTICS
290            IF ( useDiagnostics ) THEN
291              CALL DIAGNOSTICS_FILL(hDiv,   'momHDiv ',k,1,2,bi,bj,myThid)
292              CALL DIAGNOSTICS_FILL(vort3,  'momVort3',k,1,2,bi,bj,myThid)
293              CALL DIAGNOSTICS_FILL(tension,'Tension ',k,1,2,bi,bj,myThid)
294              CALL DIAGNOSTICS_FILL(strain, 'Strain  ',k,1,2,bi,bj,myThid)
295            ENDIF
296    #endif
297          ENDIF
298    
299  C---  First call (k=1): compute vertical adv. flux fVerU(kUp) & fVerV(kUp)  C---  First call (k=1): compute vertical adv. flux fVerU(kUp) & fVerV(kUp)
300        IF (momAdvection.AND.k.EQ.1) THEN        IF (momAdvection.AND.k.EQ.1) THEN
301    
302  C-    Calculate vertical transports above U & V points (West & South face):  C-    Calculate vertical transports above U & V points (West & South face):
303    
304    #ifdef ALLOW_AUTODIFF_TAMC
305    # ifdef NONLIN_FRSURF
306    #  ifndef DISABLE_RSTAR_CODE
307    CADJ STORE dwtransc(:,:,bi,bj) =
308    CADJ &     comlev1_bibj_k, key = imomkey, byte = isbyte
309    CADJ STORE dwtransu(:,:,bi,bj) =
310    CADJ &     comlev1_bibj_k, key = imomkey, byte = isbyte
311    CADJ STORE dwtransv(:,:,bi,bj) =
312    CADJ &     comlev1_bibj_k, key = imomkey, byte = isbyte
313    #  endif
314    # endif /* NONLIN_FRSURF */
315    #endif /* ALLOW_AUTODIFF_TAMC */
316          CALL MOM_CALC_RTRANS( k, bi, bj,          CALL MOM_CALC_RTRANS( k, bi, bj,
317       O                        rTransU, rTransV,       O                        rTransU, rTransV,
318       I                        myTime, myIter, myThid)       I                        myTime, myIter, myThid)
# Line 322  C--   Tendency is minus divergence of th Line 394  C--   Tendency is minus divergence of th
394    
395  #ifdef NONLIN_FRSURF  #ifdef NONLIN_FRSURF
396  C-- account for 3.D divergence of the flow in rStar coordinate:  C-- account for 3.D divergence of the flow in rStar coordinate:
397    # ifndef DISABLE_RSTAR_CODE
398          IF ( select_rStar.GT.0 ) THEN          IF ( select_rStar.GT.0 ) THEN
399           DO j=jMin,jMax           DO j=jMin,jMax
400            DO i=iMin,iMax            DO i=iMin,iMax
# Line 339  C-- account for 3.D divergence of the fl Line 412  C-- account for 3.D divergence of the fl
412            ENDDO            ENDDO
413           ENDDO           ENDDO
414          ENDIF          ENDIF
415    # endif /* DISABLE_RSTAR_CODE */
416  #endif /* NONLIN_FRSURF */  #endif /* NONLIN_FRSURF */
417    
418        ELSE        ELSE
# Line 356  C-    endif momAdvection. Line 430  C-    endif momAdvection.
430  C---  Calculate eddy fluxes (dissipation) between cells for zonal flow.  C---  Calculate eddy fluxes (dissipation) between cells for zonal flow.
431    
432  C     Bi-harmonic term del^2 U -> v4F  C     Bi-harmonic term del^2 U -> v4F
433          IF (biharmonic)          IF (biharmonic)
434       &  CALL MOM_U_DEL2U(bi,bj,k,uFld,hFacZ,v4f,myThid)       &  CALL MOM_U_DEL2U(bi,bj,k,uFld,hFacZ,v4f,myThid)
435    
436  C     Laplacian and bi-harmonic terms, Zonal  Fluxes -> fZon  C     Laplacian and bi-harmonic terms, Zonal  Fluxes -> fZon
# Line 400  C--   Tendency is minus divergence of th Line 474  C--   Tendency is minus divergence of th
474          ENDIF          ENDIF
475  #endif  #endif
476    
477  C-- No-slip and drag BCs appear as body forces in cell abutting topography  C-- No-slip and drag BCs appear as body forces in cell abutting topography
478          IF (no_slip_sides) THEN          IF (no_slip_sides) THEN
479  C-     No-slip BCs impose a drag at walls...  C-     No-slip BCs impose a drag at walls...
480           CALL MOM_U_SIDEDRAG(           CALL MOM_U_SIDEDRAG(
# Line 426  C-    No-slip BCs impose a drag at botto Line 500  C-    No-slip BCs impose a drag at botto
500           ENDDO           ENDDO
501          ENDIF          ENDIF
502    
503    #ifdef ALLOW_SHELFICE
504            IF (useShelfIce) THEN
505             CALL SHELFICE_U_DRAG(bi,bj,k,uFld,KE,KappaRU,vF,myThid)
506             DO j=jMin,jMax
507              DO i=iMin,iMax
508               gUdiss(i,j) = gUdiss(i,j) + vF(i,j)
509              ENDDO
510             ENDDO
511            ENDIF
512    #endif /* ALLOW_SHELFICE */
513    
514  C-    endif momViscosity  C-    endif momViscosity
515        ENDIF        ENDIF
516    
# Line 437  c    I     myTime,myThid) Line 522  c    I     myTime,myThid)
522    
523  C--   Metric terms for curvilinear grid systems  C--   Metric terms for curvilinear grid systems
524        IF (useNHMTerms) THEN        IF (useNHMTerms) THEN
525  C      o Non-hydrosatic metric terms  C      o Non-Hydrostatic (spherical) metric terms
526         CALL MOM_U_METRIC_NH(bi,bj,k,uFld,wVel,mT,myThid)         CALL MOM_U_METRIC_NH(bi,bj,k,uFld,wVel,mT,myThid)
527         DO j=jMin,jMax         DO j=jMin,jMax
528          DO i=iMin,iMax          DO i=iMin,iMax
529           gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mTFacU*mT(i,j)           gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mtNHFacU*mT(i,j)
530          ENDDO          ENDDO
531         ENDDO         ENDDO
532        ENDIF        ENDIF
533        IF (usingSphericalPolarMTerms) THEN        IF ( usingSphericalPolarGrid .AND. metricTerms ) THEN
534    C      o Spherical polar grid metric terms
535         CALL MOM_U_METRIC_SPHERE(bi,bj,k,uFld,vFld,mT,myThid)         CALL MOM_U_METRIC_SPHERE(bi,bj,k,uFld,vFld,mT,myThid)
536         DO j=jMin,jMax         DO j=jMin,jMax
537          DO i=iMin,iMax          DO i=iMin,iMax
538           gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mTFacU*mT(i,j)           gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mtFacU*mT(i,j)
539          ENDDO          ENDDO
540         ENDDO         ENDDO
541        ENDIF        ENDIF
542        IF (usingCylindricalGrid) THEN        IF ( usingCylindricalGrid .AND. metricTerms ) THEN
543           CALL MOM_U_METRIC_CYLINDER(bi,bj,k,uFld,vFld,mT,myThid)  C      o Cylindrical grid metric terms
544           DO j=jMin,jMax         CALL MOM_U_METRIC_CYLINDER(bi,bj,k,uFld,vFld,mT,myThid)
545            DO i=iMin,iMax         DO j=jMin,jMax
546               gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mTFacU*mT(i,j)          DO i=iMin,iMax
547            ENDDO           gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+mtFacU*mT(i,j)
548            ENDDO
549         ENDDO         ENDDO
550        ENDIF        ENDIF
551    
# Line 510  C--   Tendency is minus divergence of th Line 597  C--   Tendency is minus divergence of th
597    
598  #ifdef NONLIN_FRSURF  #ifdef NONLIN_FRSURF
599  C-- account for 3.D divergence of the flow in rStar coordinate:  C-- account for 3.D divergence of the flow in rStar coordinate:
600    # ifndef DISABLE_RSTAR_CODE
601          IF ( select_rStar.GT.0 ) THEN          IF ( select_rStar.GT.0 ) THEN
602           DO j=jMin,jMax           DO j=jMin,jMax
603            DO i=iMin,iMax            DO i=iMin,iMax
# Line 527  C-- account for 3.D divergence of the fl Line 615  C-- account for 3.D divergence of the fl
615            ENDDO            ENDDO
616           ENDDO           ENDDO
617          ENDIF          ENDIF
618    # endif /* DISABLE_RSTAR_CODE */
619  #endif /* NONLIN_FRSURF */  #endif /* NONLIN_FRSURF */
620    
621        ELSE        ELSE
# Line 543  C-    endif momAdvection. Line 632  C-    endif momAdvection.
632        IF (momViscosity) THEN        IF (momViscosity) THEN
633  C---  Calculate eddy fluxes (dissipation) between cells for meridional flow.  C---  Calculate eddy fluxes (dissipation) between cells for meridional flow.
634  C     Bi-harmonic term del^2 V -> v4F  C     Bi-harmonic term del^2 V -> v4F
635          IF (biharmonic)          IF (biharmonic)
636       &  CALL MOM_V_DEL2V(bi,bj,k,vFld,hFacZ,v4f,myThid)       &  CALL MOM_V_DEL2V(bi,bj,k,vFld,hFacZ,v4f,myThid)
637    
638  C     Laplacian and bi-harmonic terms, Zonal  Fluxes -> fZon  C     Laplacian and bi-harmonic terms, Zonal  Fluxes -> fZon
# Line 587  C--   Tendency is minus divergence of th Line 676  C--   Tendency is minus divergence of th
676          ENDIF          ENDIF
677  #endif  #endif
678    
679  C-- No-slip and drag BCs appear as body forces in cell abutting topography  C-- No-slip and drag BCs appear as body forces in cell abutting topography
680        IF (no_slip_sides) THEN          IF (no_slip_sides) THEN
681  C-     No-slip BCs impose a drag at walls...  C-     No-slip BCs impose a drag at walls...
682           CALL MOM_V_SIDEDRAG(           CALL MOM_V_SIDEDRAG(
683       I        bi,bj,k,       I        bi,bj,k,
# Line 613  C-    No-slip BCs impose a drag at botto Line 702  C-    No-slip BCs impose a drag at botto
702           ENDDO           ENDDO
703          ENDIF          ENDIF
704    
705    #ifdef ALLOW_SHELFICE
706            IF (useShelfIce) THEN
707             CALL SHELFICE_V_DRAG(bi,bj,k,vFld,KE,KappaRU,vF,myThid)
708             DO j=jMin,jMax
709              DO i=iMin,iMax
710               gvDiss(i,j) = gvDiss(i,j) + vF(i,j)
711              ENDDO
712             ENDDO
713            ENDIF
714    #endif /* ALLOW_SHELFICE */
715    
716  C-    endif momViscosity  C-    endif momViscosity
717        ENDIF        ENDIF
718    
# Line 624  c    I     myTime,myThid) Line 724  c    I     myTime,myThid)
724    
725  C--   Metric terms for curvilinear grid systems  C--   Metric terms for curvilinear grid systems
726        IF (useNHMTerms) THEN        IF (useNHMTerms) THEN
727  C      o Spherical polar grid metric terms  C      o Non-Hydrostatic (spherical) metric terms
728         CALL MOM_V_METRIC_NH(bi,bj,k,vFld,wVel,mT,myThid)         CALL MOM_V_METRIC_NH(bi,bj,k,vFld,wVel,mT,myThid)
729         DO j=jMin,jMax         DO j=jMin,jMax
730          DO i=iMin,iMax          DO i=iMin,iMax
731           gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+mTFacV*mT(i,j)           gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+mtNHFacV*mT(i,j)
732          ENDDO          ENDDO
733         ENDDO         ENDDO
734        ENDIF        ENDIF
735        IF (usingSphericalPolarMTerms) THEN        IF ( usingSphericalPolarGrid .AND. metricTerms ) THEN
736    C      o Spherical polar grid metric terms
737         CALL MOM_V_METRIC_SPHERE(bi,bj,k,uFld,mT,myThid)         CALL MOM_V_METRIC_SPHERE(bi,bj,k,uFld,mT,myThid)
738         DO j=jMin,jMax         DO j=jMin,jMax
739          DO i=iMin,iMax          DO i=iMin,iMax
740           gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+mTFacV*mT(i,j)           gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+mtFacV*mT(i,j)
741          ENDDO          ENDDO
742         ENDDO         ENDDO
743        ENDIF        ENDIF
744        IF (usingCylindricalGrid) THEN        IF ( usingCylindricalGrid .AND. metricTerms ) THEN
745           CALL MOM_V_METRIC_CYLINDER(bi,bj,k,uFld,vFld,mT,myThid)  C      o Cylindrical grid metric terms
746           DO j=jMin,jMax         CALL MOM_V_METRIC_CYLINDER(bi,bj,k,uFld,vFld,mT,myThid)
747              DO i=iMin,iMax         DO j=jMin,jMax
748                 gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+mTFacV*mT(i,j)          DO i=iMin,iMax
749              ENDDO           gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+mtFacV*mT(i,j)
750           ENDDO          ENDDO
751           ENDDO
752        ENDIF        ENDIF
753    
754  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
# Line 679  c     ELSE Line 781  c     ELSE
781  #endif  #endif
782        ENDIF        ENDIF
783    
784        IF (nonHydrostatic.OR.quasiHydrostatic) THEN  C--   3.D Coriolis term (horizontal momentum, Eastward component: -f'*w)
785         CALL MOM_U_CORIOLIS_NH(bi,bj,k,wVel,cf,myThid)        IF ( use3dCoriolis ) THEN
786         DO j=jMin,jMax          CALL MOM_U_CORIOLIS_NH(bi,bj,k,wVel,cf,myThid)
787          DO i=iMin,iMax          DO j=jMin,jMax
788           gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+fuFac*cf(i,j)           DO i=iMin,iMax
789              gU(i,j,k,bi,bj) = gU(i,j,k,bi,bj)+fuFac*cf(i,j)
790             ENDDO
791          ENDDO          ENDDO
792         ENDDO         IF ( usingCurvilinearGrid ) THEN
793    C-     presently, non zero angleSinC array only supported with Curvilinear-Grid
794            CALL MOM_V_CORIOLIS_NH(bi,bj,k,wVel,cf,myThid)
795            DO j=jMin,jMax
796             DO i=iMin,iMax
797              gV(i,j,k,bi,bj) = gV(i,j,k,bi,bj)+fvFac*cf(i,j)
798             ENDDO
799            ENDDO
800           ENDIF
801        ENDIF        ENDIF
802    
803  C--   Set du/dt & dv/dt on boundaries to zero  C--   Set du/dt & dv/dt on boundaries to zero
# Line 700  C--   Set du/dt & dv/dt on boundaries to Line 812  C--   Set du/dt & dv/dt on boundaries to
812    
813  #ifdef ALLOW_DIAGNOSTICS  #ifdef ALLOW_DIAGNOSTICS
814        IF ( useDiagnostics ) THEN        IF ( useDiagnostics ) THEN
815         IF (bottomDragTerms)          CALL DIAGNOSTICS_FILL(KE,    'momKE   ',k,1,2,bi,bj,myThid)
      &  CALL DIAGNOSTICS_FILL(KE,    'momKE   ',k,1,2,bi,bj,myThid)  
816          CALL DIAGNOSTICS_FILL(gU(1-Olx,1-Oly,k,bi,bj),          CALL DIAGNOSTICS_FILL(gU(1-Olx,1-Oly,k,bi,bj),
817       &                               'Um_Advec',k,1,2,bi,bj,myThid)       &                               'Um_Advec',k,1,2,bi,bj,myThid)
818          CALL DIAGNOSTICS_FILL(gV(1-Olx,1-Oly,k,bi,bj),          CALL DIAGNOSTICS_FILL(gV(1-Olx,1-Oly,k,bi,bj),

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.38

  ViewVC Help
Powered by ViewVC 1.1.22