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

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

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

revision 1.6 by jmc, Tue May 12 19:56:35 2009 UTC revision 1.7 by jahn, Fri Jun 26 23:10:09 2009 UTC
# Line 10  C !ROUTINE: GAD_SOM_ADVECT Line 10  C !ROUTINE: GAD_SOM_ADVECT
10  C !INTERFACE: ==========================================================  C !INTERFACE: ==========================================================
11        SUBROUTINE GAD_SOM_ADVECT(        SUBROUTINE GAD_SOM_ADVECT(
12       I     implicitAdvection, advectionScheme, vertAdvecScheme,       I     implicitAdvection, advectionScheme, vertAdvecScheme,
13       I     tracerIdentity,       I     tracerIdentity, deltaTLev,
14       I     uVel, vVel, wVel, tracer,       I     uVel, vVel, wVel, tracer,
15       U     smTr,       U     smTr,
16       O     gTracer,       O     gTracer,
# Line 51  C  myThid            :: thread number Line 51  C  myThid            :: thread number
51        LOGICAL implicitAdvection        LOGICAL implicitAdvection
52        INTEGER advectionScheme, vertAdvecScheme        INTEGER advectionScheme, vertAdvecScheme
53        INTEGER tracerIdentity        INTEGER tracerIdentity
54          _RL deltaTLev(Nr)
55        _RL uVel  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)        _RL uVel  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
56        _RL vVel  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)        _RL vVel  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
57        _RL wVel  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)        _RL wVel  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
# Line 327  C-     Solve advection in X and update m Line 328  C-     Solve advection in X and update m
328       I                     bi,bj,k, limiter,       I                     bi,bj,k, limiter,
329       I                     overlapOnly, interiorOnly,       I                     overlapOnly, interiorOnly,
330       I                     N_edge, S_edge, E_edge, W_edge,       I                     N_edge, S_edge, E_edge, W_edge,
331       I                     dTtracerLev(k), uTrans,       I                     deltaTLev(k), uTrans,
332       U                     smVol(1-OLx,1-OLy,k),       U                     smVol(1-OLx,1-OLy,k),
333       U                     smTr0(1-OLx,1-OLy,k),       U                     smTr0(1-OLx,1-OLy,k),
334       U                     smTr(1-OLx,1-OLy,k,bi,bj,1),       U                     smTr(1-OLx,1-OLy,k,bi,bj,1),
# Line 391  C-     Solve advection in Y and update m Line 392  C-     Solve advection in Y and update m
392       I                     bi,bj,k, limiter,       I                     bi,bj,k, limiter,
393       I                     overlapOnly, interiorOnly,       I                     overlapOnly, interiorOnly,
394       I                     N_edge, S_edge, E_edge, W_edge,       I                     N_edge, S_edge, E_edge, W_edge,
395       I                     dTtracerLev(k), vTrans,       I                     deltaTLev(k), vTrans,
396       U                     smVol(1-OLx,1-OLy,k),       U                     smVol(1-OLx,1-OLy,k),
397       U                     smTr0(1-OLx,1-OLy,k),       U                     smTr0(1-OLx,1-OLy,k),
398       U                     smTr(1-OLx,1-OLy,k,bi,bj,1),       U                     smTr(1-OLx,1-OLy,k,bi,bj,1),
# Line 439  C-    explicit advection is done ; store Line 440  C-    explicit advection is done ; store
440  C--  without rescaling of tendencies:  C--  without rescaling of tendencies:
441  c         localTr = smTr0(i,j,k)/smVol(i,j,k)  c         localTr = smTr0(i,j,k)/smVol(i,j,k)
442  c         gTracer(i,j,k,bi,bj) = ( localTr - tracer(i,j,k,bi,bj) )  c         gTracer(i,j,k,bi,bj) = ( localTr - tracer(i,j,k,bi,bj) )
443  c    &                         / dTtracerLev(k)  c    &                         / deltaTLev(k)
444  C--  consistent with rescaling of tendencies (in FREESURF_RESCALE_G):  C--  consistent with rescaling of tendencies (in FREESURF_RESCALE_G):
445            gTracer(i,j,k,bi,bj) =            gTracer(i,j,k,bi,bj) =
446       &          ( smTr0(i,j,k) - tracer(i,j,k,bi,bj)*smVol(i,j,k) )       &          ( smTr0(i,j,k) - tracer(i,j,k,bi,bj)*smVol(i,j,k) )
447       &            *recip_rA(i,j,bi,bj)*recip_deepFac2C(k)       &            *recip_rA(i,j,bi,bj)*recip_deepFac2C(k)
448       &            *recip_drF(k)*_recip_hFacC(i,j,k,bi,bj)       &            *recip_drF(k)*_recip_hFacC(i,j,k,bi,bj)
449       &            *recip_rhoFacC(k)       &            *recip_rhoFacC(k)
450       &            /dTtracerLev(k)       &            /deltaTLev(k)
451           ENDDO           ENDDO
452          ENDDO          ENDDO
453         ENDIF         ENDIF
# Line 591  C-    Compute vertical advective flux in Line 592  C-    Compute vertical advective flux in
592       &     .OR. vertAdvecScheme.EQ.ENUM_SOM_LIMITER ) THEN       &     .OR. vertAdvecScheme.EQ.ENUM_SOM_LIMITER ) THEN
593             CALL GAD_SOM_ADV_R(             CALL GAD_SOM_ADV_R(
594       I                     bi,bj,k, kUp, kDown,       I                     bi,bj,k, kUp, kDown,
595       I                     dTtracerLev(k), rTrans, maskUp,       I                     deltaTLev(k), rTrans, maskUp,
596       U                     smVol,       U                     smVol,
597       U                     smTr0,       U                     smTr0,
598       U                     smTr(1-OLx,1-OLy,1,bi,bj,1),       U                     smTr(1-OLx,1-OLy,1,bi,bj,1),
# Line 618  C--   Compute new tracer value and store Line 619  C--   Compute new tracer value and store
619  C--  without rescaling of tendencies:  C--  without rescaling of tendencies:
620  c         localTr = smTr0(i,j,k)/smVol(i,j,k)  c         localTr = smTr0(i,j,k)/smVol(i,j,k)
621  c         gTracer(i,j,k,bi,bj) = ( localTr - tracer(i,j,k,bi,bj) )  c         gTracer(i,j,k,bi,bj) = ( localTr - tracer(i,j,k,bi,bj) )
622  c    &                         / dTtracerLev(k)  c    &                         / deltaTLev(k)
623  C--  consistent with rescaling of tendencies (in FREESURF_RESCALE_G):  C--  consistent with rescaling of tendencies (in FREESURF_RESCALE_G):
624            gTracer(i,j,k,bi,bj) =            gTracer(i,j,k,bi,bj) =
625       &          ( smTr0(i,j,k) - tracer(i,j,k,bi,bj)*smVol(i,j,k) )       &          ( smTr0(i,j,k) - tracer(i,j,k,bi,bj)*smVol(i,j,k) )
626       &            *recip_rA(i,j,bi,bj)*recip_deepFac2C(k)       &            *recip_rA(i,j,bi,bj)*recip_deepFac2C(k)
627       &            *recip_drF(k)*_recip_hFacC(i,j,k,bi,bj)       &            *recip_drF(k)*_recip_hFacC(i,j,k,bi,bj)
628       &            *recip_rhoFacC(k)       &            *recip_rhoFacC(k)
629       &            /dTtracerLev(k)       &            /deltaTLev(k)
630           ENDDO           ENDDO
631          ENDDO          ENDDO
632    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22