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

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

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

revision 1.4 by adcroft, Mon Sep 10 13:09:04 2001 UTC revision 1.5 by adcroft, Fri Sep 21 13:11:43 2001 UTC
# Line 3  C $Name$ Line 3  C $Name$
3    
4  #include "GAD_OPTIONS.h"  #include "GAD_OPTIONS.h"
5    
6    CBOP
7    C !ROUTINE: GAD_FLUXLIMIT_ADV_R
8    
9    C !INTERFACE: ==========================================================
10        SUBROUTINE GAD_FLUXLIMIT_ADV_R(        SUBROUTINE GAD_FLUXLIMIT_ADV_R(
11       I           bi_arg,bj_arg,k,dTarg,       I           bi_arg,bj_arg,k,dTarg,
12       I           rTrans, wVel,       I           rTrans, wVel,
13       I           tracer,       I           tracer,
14       O           wT,       O           wT,
15       I           myThid )       I           myThid )
 C     /==========================================================\  
 C     | SUBROUTINE GAD_FLUXLIMIT_ADV_R                           |  
 C     | o Compute vertical advective Flux of Tracer using        |  
 C     |   Flux Limiter Scheme                                    |  
 C     |==========================================================|  
       IMPLICIT NONE  
16    
17  C     == GLobal variables ==  C !DESCRIPTION:
18    C Calculates the area integrated vertical flux due to advection of a tracer
19    C using second-order interpolation with a flux limiter:
20    C \begin{equation*}
21    C F^x_{adv} = W \overline{ \theta }^k
22    C - \frac{1}{2} \left(
23    C     [ 1 - \psi(C_r) ] |W|
24    C    + W \frac{w \Delta t}{\Delta r_c} \psi(C_r)
25    C              \right) \delta_k \theta
26    C \end{equation*}
27    C where the $\psi(C_r)$ is the limiter function and $C_r$ is
28    C the slope ratio.
29    
30    C !USES: ===============================================================
31          IMPLICIT NONE
32  #include "SIZE.h"  #include "SIZE.h"
33  #include "GRID.h"  #include "GRID.h"
34  #include "EEPARAMS.h"  #include "EEPARAMS.h"
35  #include "PARAMS.h"  #include "PARAMS.h"
36    
37  C     == Routine arguments ==  C !INPUT PARAMETERS: ===================================================
38    C  bi_arg,bj_arg        :: tile indices
39    C  k                    :: vertical level
40    C  rTrans               :: vertical volume transport
41    C  wVel                 :: vertical flow
42    C  tracer               :: tracer field
43    C  myThid               :: thread number
44        INTEGER bi_arg,bj_arg,k        INTEGER bi_arg,bj_arg,k
45        _RL dTarg        _RL dTarg
46        _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
47        _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)
48        _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)        _RL tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
       _RL wT    (1-OLx:sNx+OLx,1-OLy:sNy+OLy)  
49        INTEGER myThid        INTEGER myThid
50    
51  C     == Local variables ==  C !OUTPUT PARAMETERS: ==================================================
52    C  wT                   :: vertical advective flux
53          _RL wT    (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
54    
55    C !LOCAL VARIABLES: ====================================================
56    C  i,j                  :: loop indices
57    C  kp1                  :: =min( k+1 , Nr )
58    C  km1                  :: =max( k-1 , 1 )
59    C  km2                  :: =max( k-2 , 1 )
60    C  bi,bj                :: tile indices or (1,1) depending on use
61    C  Cr                   :: slope ratio
62    C  Rjm,Rj,Rjp           :: differences at i-1,i,i+1
63        INTEGER i,j,kp1,km1,km2,bi,bj        INTEGER i,j,kp1,km1,km2,bi,bj
64        _RL Cr,Rjm,Rj,Rjp        _RL Cr,Rjm,Rj,Rjp
65    C Statement function provides Limiter(Cr)
66  #include "GAD_FLUX_LIMITER.h"  #include "GAD_FLUX_LIMITER.h"
67    CEOP
68    
69        IF (.NOT. multiDimAdvection) THEN        IF (.NOT. multiDimAdvection) THEN
70  C      If using the standard time-stepping/advection schemes (ie. AB-II)  C      If using the standard time-stepping/advection schemes (ie. AB-II)

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22