/[MITgcm]/MITgcm/pkg/generic_advdiff/gad_calc_rhs.F
ViewVC logotype

Diff of /MITgcm/pkg/generic_advdiff/gad_calc_rhs.F

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

revision 1.42 by jmc, Sun Nov 19 22:04:09 2006 UTC revision 1.45 by jmc, Thu Jan 25 16:59:08 2007 UTC
# Line 238  cph with limiters in forward, but withou Line 238  cph with limiters in forward, but withou
238       I           uTrans, uFld, maskW(1-Olx,1-Oly,k,bi,bj), locABT,       I           uTrans, uFld, maskW(1-Olx,1-Oly,k,bi,bj), locABT,
239       O           af, myThid )       O           af, myThid )
240           ENDIF           ENDIF
241    #ifndef ALLOW_AUTODIFF_TAMC
242            ELSEIF (advectionScheme.EQ.ENUM_OS7MP ) THEN
243              CALL GAD_OS7MP_ADV_X( bi,bj,k, dTtracerLev(k),
244         I            uTrans, uFld, maskW(1-Olx,1-Oly,k,bi,bj), locABT,
245         O            af, myThid )
246    #endif
247          ELSE          ELSE
248           STOP 'GAD_CALC_RHS: Bad advectionScheme (X)'           STOP 'GAD_CALC_RHS: Bad advectionScheme (X)'
249          ENDIF          ENDIF
# Line 289  C *note* should update GMREDI_XTRANSPORT Line 295  C *note* should update GMREDI_XTRANSPORT
295          ENDIF          ENDIF
296        ENDIF        ENDIF
297  #endif  #endif
298    C     anelastic: advect.fluxes are scaled by rhoFac but hor.diff. flx are not
299        DO j=1-Oly,sNy+Oly        DO j=1-Oly,sNy+Oly
300         DO i=1-Olx,sNx+Olx         DO i=1-Olx,sNx+Olx
301          fZon(i,j) = fZon(i,j) + df(i,j)          fZon(i,j) = fZon(i,j) + df(i,j)*rhoFacC(k)
302         ENDDO         ENDDO
303        ENDDO        ENDDO
304    
# Line 346  cph with limiters in forward, but withou Line 353  cph with limiters in forward, but withou
353       I           vTrans, vFld, maskS(1-Olx,1-Oly,k,bi,bj), locABT,       I           vTrans, vFld, maskS(1-Olx,1-Oly,k,bi,bj), locABT,
354       O           af, myThid )       O           af, myThid )
355           ENDIF           ENDIF
356    #ifndef ALLOW_AUTODIFF_TAMC
357            ELSEIF (advectionScheme.EQ.ENUM_OS7MP ) THEN
358              CALL GAD_OS7MP_ADV_Y( bi,bj,k, dTtracerLev(k),
359         I            vTrans, vFld, maskS(1-Olx,1-Oly,k,bi,bj), locABT,
360         O            af, myThid )
361    #endif
362          ELSE          ELSE
363            STOP 'GAD_CALC_RHS: Bad advectionScheme (Y)'            STOP 'GAD_CALC_RHS: Bad advectionScheme (Y)'
364          ENDIF          ENDIF
# Line 397  C *note* should update GMREDI_YTRANSPORT Line 410  C *note* should update GMREDI_YTRANSPORT
410          ENDIF          ENDIF
411        ENDIF        ENDIF
412  #endif  #endif
413    C     anelastic: advect.fluxes are scaled by rhoFac but hor.diff. flx are not
414        DO j=1-Oly,sNy+Oly        DO j=1-Oly,sNy+Oly
415         DO i=1-Olx,sNx+Olx         DO i=1-Olx,sNx+Olx
416          fMer(i,j) = fMer(i,j) + df(i,j)          fMer(i,j) = fMer(i,j) + df(i,j)*rhoFacC(k)
417         ENDDO         ENDDO
418        ENDDO        ENDDO
419    
# Line 456  cph with limiters in forward, but withou Line 470  cph with limiters in forward, but withou
470       I         dTtracerLev(k),rTrans,wFld,TracAB(1-Olx,1-Oly,1,bi,bj),       I         dTtracerLev(k),rTrans,wFld,TracAB(1-Olx,1-Oly,1,bi,bj),
471       O         af, myThid )       O         af, myThid )
472            ENDIF            ENDIF
473    #ifndef ALLOW_AUTODIFF_TAMC
474            ELSEIF (vertAdvecScheme.EQ.ENUM_OS7MP ) THEN
475               CALL GAD_OS7MP_ADV_R( bi,bj,k,
476         I         dTtracerLev(k),rTrans,wFld,TracAB(1-Olx,1-Oly,1,bi,bj),
477         O         af, myThid )
478    #endif
479          ELSE          ELSE
480            STOP 'GAD_CALC_RHS: Bad vertAdvecScheme (R)'            STOP 'GAD_CALC_RHS: Bad vertAdvecScheme (R)'
481          ENDIF          ENDIF
# Line 558  C-    Set non local KPP transport term ( Line 578  C-    Set non local KPP transport term (
578         ENDIF         ENDIF
579         DO j=1-Oly,sNy+Oly         DO j=1-Oly,sNy+Oly
580          DO i=1-Olx,sNx+Olx          DO i=1-Olx,sNx+Olx
581           fVerT(i,j,kUp) = fVerT(i,j,kUp) + df(i,j)*maskUp(i,j)           fVerT(i,j,kUp) = fVerT(i,j,kUp)
582         &                  + df(i,j)*maskUp(i,j)*rhoFacF(k)
583          ENDDO          ENDDO
584         ENDDO         ENDDO
585        ENDIF        ENDIF
586  #endif  #endif
587    
588  C--   Divergence of fluxes  C--   Divergence of fluxes
589    C     Anelastic: scale vertical fluxes by rhoFac and leave Horizontal fluxes unchanged
590        DO j=1-Oly,sNy+Oly-1        DO j=1-Oly,sNy+Oly-1
591         DO i=1-Olx,sNx+Olx-1         DO i=1-Olx,sNx+Olx-1
592          gTracer(i,j,k,bi,bj)=gTracer(i,j,k,bi,bj)          gTracer(i,j,k,bi,bj)=gTracer(i,j,k,bi,bj)
593       &   -_recip_hFacC(i,j,k,bi,bj)*recip_drF(k)*recip_rA(i,j,bi,bj)       &   -_recip_hFacC(i,j,k,bi,bj)*recip_drF(k)
594         &   *recip_rA(i,j,bi,bj)*recip_deepFac2C(k)*recip_rhoFacC(k)
595       &   *( (fZon(i+1,j)-fZon(i,j))       &   *( (fZon(i+1,j)-fZon(i,j))
596       &     +(fMer(i,j+1)-fMer(i,j))       &     +(fMer(i,j+1)-fMer(i,j))
597       &     +(fVerT(i,j,kDown)-fVerT(i,j,kUp))*rkSign       &     +(fVerT(i,j,kDown)-fVerT(i,j,kUp))*rkSign

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

  ViewVC Help
Powered by ViewVC 1.1.22