Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:38:03 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
53b68b7823 Dimi*0001 #include "BBL_OPTIONS.h"
                0002 C--  File bbl_tendency_apply.F: Routines to apply BBL tendencies
                0003 C--   Contents
                0004 C--   o BBL_TENDENCY_APPLY_T
                0005 C--   o BBL_TENDENCY_APPLY_S
                0006 
                0007 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0008 CBOP 0
                0009 C !ROUTINE: BBL_TENDENCY_APPLY_T
                0010 
                0011 C !INTERFACE:
                0012       SUBROUTINE BBL_TENDENCY_APPLY_T(
73b1dccda0 Jean*0013      U                     gT_arr,
                0014      I                     iMin,iMax,jMin,jMax, k, bi, bj,
                0015      I                     myTime, myIter, myThid )
53b68b7823 Dimi*0016 
                0017 C     !DESCRIPTION:
                0018 C     Add bbl tendency terms to T (theta) tendency.  Routine works
                0019 C     for one level at a time
                0020 
                0021 C     !USES:
                0022       IMPLICIT NONE
                0023 #include "SIZE.h"
                0024 #include "EEPARAMS.h"
73b1dccda0 Jean*0025 #include "GRID.h"
                0026 c#include "DYNVARS.h"
53b68b7823 Dimi*0027 #include "BBL.h"
                0028 
73b1dccda0 Jean*0029 C     !INPUT/OUTPUT PARAMETERS:
                0030 C     gT_arr    :: the tendency array
                0031 C     iMin,iMax :: Working range of x-index for applying forcing.
                0032 C     jMin,jMax :: Working range of y-index for applying forcing.
                0033 C     k         :: Current vertical level index
                0034 C     bi,bj     :: Current tile indices
                0035 C     myTime    :: Current time in simulation
                0036 C     myIter    :: Current iteration number
                0037 C     myThid    :: my Thread Id number
                0038       _RL     gT_arr(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0039       INTEGER iMin, iMax, jMin, jMax
                0040       INTEGER k, bi, bj
                0041       _RL     myTime
                0042       INTEGER myIter
                0043       INTEGER myThid
53b68b7823 Dimi*0044 CEOP
                0045 
                0046 C     !LOCAL VARIABLES:
                0047       INTEGER i, j
                0048 
                0049       DO j=jMin,jMax
                0050        DO i=iMin,iMax
                0051          IF ( k .EQ. kLowC(i,j,bi,bj) )
73b1dccda0 Jean*0052      &     gT_arr(i,j) = gT_arr(i,j)
53b68b7823 Dimi*0053      &       + maskC(i,j,k,bi,bj) * bbl_TendTheta(i,j,bi,bj)
                0054        ENDDO
                0055       ENDDO
                0056 
                0057       RETURN
                0058       END
                0059 
                0060 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0061 CBOP 0
                0062 C !ROUTINE: BBL_TENDENCY_APPLY_S
                0063 
                0064 C !INTERFACE:
                0065       SUBROUTINE BBL_TENDENCY_APPLY_S(
73b1dccda0 Jean*0066      U                     gS_arr,
                0067      I                     iMin,iMax,jMin,jMax, k, bi, bj,
                0068      I                     myTime, myIter, myThid )
53b68b7823 Dimi*0069 
                0070 C     !DESCRIPTION:
                0071 C     Add bbl tendency terms to S tendency.  Routine works for one
                0072 C     level at a time
                0073 
                0074 C     !INPUT PARAMETERS:
                0075       IMPLICIT NONE
                0076 #include "SIZE.h"
                0077 #include "EEPARAMS.h"
73b1dccda0 Jean*0078 #include "GRID.h"
                0079 c#include "DYNVARS.h"
53b68b7823 Dimi*0080 #include "BBL.h"
                0081 
73b1dccda0 Jean*0082 C     !INPUT/OUTPUT PARAMETERS:
                0083 C     gS_arr    :: the tendency array
                0084 C     iMin,iMax :: Working range of x-index for applying forcing.
                0085 C     jMin,jMax :: Working range of y-index for applying forcing.
                0086 C     k         :: Current vertical level index
                0087 C     bi,bj     :: Current tile indices
                0088 C     myTime    :: Current time in simulation
                0089 C     myIter    :: Current iteration number
                0090 C     myThid    :: my Thread Id number
                0091       _RL     gS_arr(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0092       INTEGER iMin, iMax, jMin, jMax
                0093       INTEGER k, bi, bj
                0094       _RL     myTime
                0095       INTEGER myIter
                0096       INTEGER myThid
53b68b7823 Dimi*0097 CEOP
                0098 
                0099 C     !LOCAL VARIABLES:
                0100       INTEGER i, j
                0101 
                0102       DO j=jMin,jMax
                0103        DO i=iMin,iMax
                0104         IF ( k .EQ. kLowC(i,j,bi,bj) )
73b1dccda0 Jean*0105      &     gS_arr(i,j) = gS_arr(i,j)
53b68b7823 Dimi*0106      &       + maskC(i,j,k,bi,bj) * bbl_TendSalt(i,j,bi,bj)
                0107        ENDDO
                0108       ENDDO
                0109 
                0110       RETURN
                0111       END