/[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.12 by jmc, Tue Nov 19 16:59:33 2013 UTC revision 1.13 by jmc, Thu Aug 14 16:46:36 2014 UTC
# Line 65  C !OUTPUT PARAMETERS: ================== Line 65  C !OUTPUT PARAMETERS: ==================
65  C  smTr              :: tracer 1rst & 2nd Order moments  C  smTr              :: tracer 1rst & 2nd Order moments
66  C  gTracer           :: tendency array  C  gTracer           :: tendency array
67        _RL smTr   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy,nSOM)        _RL smTr   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy,nSOM)
68        _RL gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)        _RL gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
69    
70  C !LOCAL VARIABLES: ====================================================  C !LOCAL VARIABLES: ====================================================
71  C  maskUp        :: 2-D array mask for W points  C  maskUp        :: 2-D array mask for W points
# Line 403  C-    explicit advection is done ; store Line 403  C-    explicit advection is done ; store
403           DO i=1-OLx,sNx+OLx           DO i=1-OLx,sNx+OLx
404  C--  without rescaling of tendencies:  C--  without rescaling of tendencies:
405  c         localTr = smTr0(i,j,k)/smVol(i,j,k)  c         localTr = smTr0(i,j,k)/smVol(i,j,k)
406  c         gTracer(i,j,k,bi,bj) = ( localTr - tracer(i,j,k,bi,bj) )  c         gTracer(i,j,k) = ( localTr - tracer(i,j,k,bi,bj) )
407  c    &                         / deltaTLev(k)  c    &                   / deltaTLev(k)
408  C--  consistent with rescaling of tendencies (in FREESURF_RESCALE_G):  C--  consistent with rescaling of tendencies (in FREESURF_RESCALE_G):
409            gTracer(i,j,k,bi,bj) =            gTracer(i,j,k) =
410       &          ( 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) )
411       &            *recip_rA(i,j,bi,bj)*recip_deepFac2C(k)       &            *recip_rA(i,j,bi,bj)*recip_deepFac2C(k)
412       &            *recip_drF(k)*_recip_hFacC(i,j,k,bi,bj)       &            *recip_drF(k)*_recip_hFacC(i,j,k,bi,bj)
# Line 575  C--   Compute new tracer value and store Line 575  C--   Compute new tracer value and store
575           DO i=1-OLx,sNx+OLx           DO i=1-OLx,sNx+OLx
576  C--  without rescaling of tendencies:  C--  without rescaling of tendencies:
577  c         localTr = smTr0(i,j,k)/smVol(i,j,k)  c         localTr = smTr0(i,j,k)/smVol(i,j,k)
578  c         gTracer(i,j,k,bi,bj) = ( localTr - tracer(i,j,k,bi,bj) )  c         gTracer(i,j,k) = ( localTr - tracer(i,j,k,bi,bj) )
579  c    &                         / deltaTLev(k)  c    &                   / deltaTLev(k)
580  C--  Non-Lin Free-Surf: consistent with rescaling of tendencies  C--  Non-Lin Free-Surf: consistent with rescaling of tendencies
581  C     (in FREESURF_RESCALE_G) and RealFreshFlux/addMass.  C     (in FREESURF_RESCALE_G) and RealFreshFlux/addMass.
582  C    Also valid for linear Free-Surf (r & r* coords) except that surf tracer  C    Also valid for linear Free-Surf (r & r* coords) except that surf tracer
583  C    loss/gain is computed (in GAD_SOM_ADV_R) from partially updated tracer  C    loss/gain is computed (in GAD_SOM_ADV_R) from partially updated tracer
584  C     (instead of from Tr^n as fresh-water dilution effect) resulting in  C     (instead of from Tr^n as fresh-water dilution effect) resulting in
585  C    inaccurate linFSConserveTr and "surfExpan_" monitor.  C    inaccurate linFSConserveTr and "surfExpan_" monitor.
586            gTracer(i,j,k,bi,bj) =            gTracer(i,j,k) =
587       &          ( 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) )
588       &            *recip_rA(i,j,bi,bj)*recip_deepFac2C(k)       &            *recip_rA(i,j,bi,bj)*recip_deepFac2C(k)
589       &            *recip_drF(k)*_recip_hFacC(i,j,k,bi,bj)       &            *recip_drF(k)*_recip_hFacC(i,j,k,bi,bj)

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.22