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

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

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

revision 1.3 by jmc, Mon Jun 12 16:06:28 2006 UTC revision 1.7 by jmc, Wed Apr 4 01:39:06 2007 UTC
# Line 8  C !ROUTINE: GAD_DST2U1_ADV_Y Line 8  C !ROUTINE: GAD_DST2U1_ADV_Y
8    
9  C !INTERFACE: ==========================================================  C !INTERFACE: ==========================================================
10        SUBROUTINE GAD_DST2U1_ADV_Y(        SUBROUTINE GAD_DST2U1_ADV_Y(
11       I           bi,bj,k, advectionScheme, deltaTloc,       I           bi,bj,k, advectionScheme, calcCFL,
12       I           vTrans, vVel,       I           deltaTloc, vTrans, vFld,
13       I           tracer,       I           tracer,
14       O           vT,       O           vT,
15       I           myThid )       I           myThid )
# Line 30  C  bi,bj             :: tile indices Line 30  C  bi,bj             :: tile indices
30  C  k                 :: vertical level  C  k                 :: vertical level
31  C  advectionScheme   :: advection scheme to use: either 2nd Order DST  C  advectionScheme   :: advection scheme to use: either 2nd Order DST
32  C                                                or 1rst Order Upwind  C                                                or 1rst Order Upwind
33    C  calcCFL           :: =T: calculate CFL number ; =F: take vFld as CFL
34    C  deltaTloc         :: local time-step (s)
35  C  vTrans            :: meridional volume transport  C  vTrans            :: meridional volume transport
36  C  vVel              :: meridional flow  C  vFld              :: meridional flow / CFL number
37  C  tracer            :: tracer field  C  tracer            :: tracer field
38  C  myThid            :: thread number  C  myThid            :: thread number
39        INTEGER bi,bj, k, advectionScheme        INTEGER bi,bj, k, advectionScheme
40          LOGICAL calcCFL
41        _RL deltaTloc        _RL deltaTloc
42        _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43        _RL vVel  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)        _RL vFld  (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44        _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45        INTEGER myThid        INTEGER myThid
46    
# Line 48  C  vT                :: meridional advec Line 51  C  vT                :: meridional advec
51  C !LOCAL VARIABLES: ====================================================  C !LOCAL VARIABLES: ====================================================
52  C  i,j               :: loop indices  C  i,j               :: loop indices
53  C  yLimit            :: centered (vs upwind) fraction  C  yLimit            :: centered (vs upwind) fraction
 C  vFld              :: velocity [m/s], meridional component  
54  C  vCFL              :: Courant-Friedrich-Levy number  C  vCFL              :: Courant-Friedrich-Levy number
55        INTEGER i,j        INTEGER i,j
56        _RL vFld, vCFL, yLimit, vAbs        _RL vCFL, yLimit, vAbs
57  CEOP  CEOP
58    
59        yLimit = 0. _d 0        yLimit = 0. _d 0
# Line 63  CEOP Line 65  CEOP
65        DO j=1-Oly+1,sNy+Oly        DO j=1-Oly+1,sNy+Oly
66         DO i=1-Olx,sNx+Olx         DO i=1-Olx,sNx+Olx
67    
68  c       vFld = vVel(i,j,k,bi,bj)          vCFL = vFld(i,j)
69          vFld = vTrans(i,j)*recip_dxG(i,j,bi,bj)          IF ( calcCFL ) vCFL = ABS( vFld(i,j)*deltaTloc
70       &        *recip_drF(k)*_recip_hFacS(i,j,k,bi,bj)       &                  *recip_dyC(i,j,bi,bj)*recip_deepFacC(k) )
         vCFL = ABS(vFld*deltaTloc*recip_dyC(i,j,bi,bj))  
71    
72  c       vT(i,j) =  c       vT(i,j) =
73  c    &     vTrans(i,j)*(tracer(i,j-1)+tracer(i,j))*0.5 _d 0  c    &     vTrans(i,j)*(tracer(i,j-1)+tracer(i,j))*0.5 _d 0

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

  ViewVC Help
Powered by ViewVC 1.1.22