Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:37:08 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
8b771500b3 Jean*0001 #include "PACKAGES_CONFIG.h"
42c525bfb4 Alis*0002 #include "CPP_OPTIONS.h"
                0003 
9366854e02 Chri*0004 CBOP
                0005 C     !ROUTINE: TIMESTEP_TRACER
                0006 C     !INTERFACE:
aea29c8517 Alis*0007       SUBROUTINE TIMESTEP_TRACER(
6fca64f237 Jean*0008      I                     bi, bj, deltaTLev,
ebea654113 Jean*0009      I                     tracer,
                0010      U                     gTracer,
6fca64f237 Jean*0011      I                     myTime, myIter, myThid )
9366854e02 Chri*0012 C     !DESCRIPTION: \bv
                0013 C     *==========================================================*
8b771500b3 Jean*0014 C     | S/R TIMESTEP_TRACER
                0015 C     | o Step model tracer field forward in time
9366854e02 Chri*0016 C     *==========================================================*
                0017 C     \ev
aea29c8517 Alis*0018 
9366854e02 Chri*0019 C     !USES:
                0020       IMPLICIT NONE
aea29c8517 Alis*0021 C     == Global variables ===
42c525bfb4 Alis*0022 #include "SIZE.h"
                0023 #include "EEPARAMS.h"
                0024 #include "PARAMS.h"
8b771500b3 Jean*0025 #include "GRID.h"
aea29c8517 Alis*0026 
9366854e02 Chri*0027 C     !INPUT/OUTPUT PARAMETERS:
42c525bfb4 Alis*0028 C     == Routine Arguments ==
6fca64f237 Jean*0029 C     bi, bj     :: current tile indices
                0030 C     deltaTLev  :: time-step [s] (vertical dimension vector)
                0031 C     tracer     :: tracer field
                0032 C     gTracer    :: input: tracer tendency ; output: updated tracer
                0033 C     myTime     :: current time in simulation
                0034 C     myIter     :: current iteration number
                0035 C     myThid     :: my Thread Id number
                0036       INTEGER bi, bj
                0037       _RL     deltaTLev(Nr)
                0038       _RL     tracer (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
                0039       _RL     gTracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
                0040       _RL     myTime
42c525bfb4 Alis*0041       INTEGER myIter, myThid
9366854e02 Chri*0042 
                0043 C     !LOCAL VARIABLES:
42c525bfb4 Alis*0044 C     == Local variables ==
6fca64f237 Jean*0045       INTEGER i, j, k
9366854e02 Chri*0046 CEOP
42c525bfb4 Alis*0047 
dce55d02b7 Jean*0048 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0049 
8b771500b3 Jean*0050 C-    Step tracer forward in time and store provisional value in gTracer array
6fca64f237 Jean*0051       DO k=1,Nr
                0052        DO j=1-OLy,sNy+OLy
                0053         DO i=1-OLx,sNx+OLx
                0054           gTracer(i,j,k) = tracer(i,j,k)
                0055      &                   + deltaTLev(k)*gTracer(i,j,k)
8b771500b3 Jean*0056 #ifdef ALLOW_OBCS
e03571c360 Mart*0057 CML   For the Stevens open boundary conditions, we need to step forward
                0058 CML   the tracer even on the boundary in order to include surface
                0059 CML   forcing and (vertical) diffusion contributions. For other cases
                0060 CML   this mask was meant to avoid unrealistic values on the open boundaries.
                0061 CML   Lets hope that we can live without this safety net.
                0062 C    &                      *maskInC(i,j,bi,bj)
8b771500b3 Jean*0063 #endif
6fca64f237 Jean*0064         ENDDO
dce55d02b7 Jean*0065        ENDDO
                0066       ENDDO
                0067 
42c525bfb4 Alis*0068       RETURN
                0069       END