/[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.44 by adcroft, Sat Jan 20 21:20:11 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            ELSEIF (advectionScheme.EQ.ENUM_OS7MP ) THEN
242              CALL GAD_OS7MP_ADV_X( bi,bj,k, dTtracerLev(k),
243         I            uTrans, uFld, maskW(1-Olx,1-Oly,k,bi,bj), locABT,
244         O            af, myThid )
245          ELSE          ELSE
246           STOP 'GAD_CALC_RHS: Bad advectionScheme (X)'           STOP 'GAD_CALC_RHS: Bad advectionScheme (X)'
247          ENDIF          ENDIF
# Line 289  C *note* should update GMREDI_XTRANSPORT Line 293  C *note* should update GMREDI_XTRANSPORT
293          ENDIF          ENDIF
294        ENDIF        ENDIF
295  #endif  #endif
296    C     anelastic: advect.fluxes are scaled by rhoFac but hor.diff. flx are not
297        DO j=1-Oly,sNy+Oly        DO j=1-Oly,sNy+Oly
298         DO i=1-Olx,sNx+Olx         DO i=1-Olx,sNx+Olx
299          fZon(i,j) = fZon(i,j) + df(i,j)          fZon(i,j) = fZon(i,j) + df(i,j)*rhoFacC(k)
300         ENDDO         ENDDO
301        ENDDO        ENDDO
302    
# Line 346  cph with limiters in forward, but withou Line 351  cph with limiters in forward, but withou
351       I           vTrans, vFld, maskS(1-Olx,1-Oly,k,bi,bj), locABT,       I           vTrans, vFld, maskS(1-Olx,1-Oly,k,bi,bj), locABT,
352       O           af, myThid )       O           af, myThid )
353           ENDIF           ENDIF
354            ELSEIF (advectionScheme.EQ.ENUM_OS7MP ) THEN
355              CALL GAD_OS7MP_ADV_Y( bi,bj,k, dTtracerLev(k),
356         I            vTrans, vFld, maskS(1-Olx,1-Oly,k,bi,bj), locABT,
357         O            af, myThid )
358          ELSE          ELSE
359            STOP 'GAD_CALC_RHS: Bad advectionScheme (Y)'            STOP 'GAD_CALC_RHS: Bad advectionScheme (Y)'
360          ENDIF          ENDIF
# Line 397  C *note* should update GMREDI_YTRANSPORT Line 406  C *note* should update GMREDI_YTRANSPORT
406          ENDIF          ENDIF
407        ENDIF        ENDIF
408  #endif  #endif
409    C     anelastic: advect.fluxes are scaled by rhoFac but hor.diff. flx are not
410        DO j=1-Oly,sNy+Oly        DO j=1-Oly,sNy+Oly
411         DO i=1-Olx,sNx+Olx         DO i=1-Olx,sNx+Olx
412          fMer(i,j) = fMer(i,j) + df(i,j)          fMer(i,j) = fMer(i,j) + df(i,j)*rhoFacC(k)
413         ENDDO         ENDDO
414        ENDDO        ENDDO
415    
# Line 456  cph with limiters in forward, but withou Line 466  cph with limiters in forward, but withou
466       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),
467       O         af, myThid )       O         af, myThid )
468            ENDIF            ENDIF
469            ELSEIF (vertAdvecScheme.EQ.ENUM_OS7MP ) THEN
470               CALL GAD_OS7MP_ADV_R( bi,bj,k,
471         I         dTtracerLev(k),rTrans,wFld,TracAB(1-Olx,1-Oly,1,bi,bj),
472         O         af, myThid )
473          ELSE          ELSE
474            STOP 'GAD_CALC_RHS: Bad vertAdvecScheme (R)'            STOP 'GAD_CALC_RHS: Bad vertAdvecScheme (R)'
475          ENDIF          ENDIF
# Line 558  C-    Set non local KPP transport term ( Line 572  C-    Set non local KPP transport term (
572         ENDIF         ENDIF
573         DO j=1-Oly,sNy+Oly         DO j=1-Oly,sNy+Oly
574          DO i=1-Olx,sNx+Olx          DO i=1-Olx,sNx+Olx
575           fVerT(i,j,kUp) = fVerT(i,j,kUp) + df(i,j)*maskUp(i,j)           fVerT(i,j,kUp) = fVerT(i,j,kUp)
576         &                  + df(i,j)*maskUp(i,j)*rhoFacF(k)
577          ENDDO          ENDDO
578         ENDDO         ENDDO
579        ENDIF        ENDIF
580  #endif  #endif
581    
582  C--   Divergence of fluxes  C--   Divergence of fluxes
583    C     Anelastic: scale vertical fluxes by rhoFac and leave Horizontal fluxes unchanged
584        DO j=1-Oly,sNy+Oly-1        DO j=1-Oly,sNy+Oly-1
585         DO i=1-Olx,sNx+Olx-1         DO i=1-Olx,sNx+Olx-1
586          gTracer(i,j,k,bi,bj)=gTracer(i,j,k,bi,bj)          gTracer(i,j,k,bi,bj)=gTracer(i,j,k,bi,bj)
587       &   -_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)
588         &   *recip_rA(i,j,bi,bj)*recip_deepFac2C(k)*recip_rhoFacC(k)
589       &   *( (fZon(i+1,j)-fZon(i,j))       &   *( (fZon(i+1,j)-fZon(i,j))
590       &     +(fMer(i,j+1)-fMer(i,j))       &     +(fMer(i,j+1)-fMer(i,j))
591       &     +(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.44

  ViewVC Help
Powered by ViewVC 1.1.22