Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:40:51 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
e0b3e1bdd8 Dimi*0001 #include "FRAZIL_OPTIONS.h"
                0002 C--  File frazil_tendency_apply.F: Routines to apply FRAZIL tendencies
                0003 C--   Contents
                0004 C--   o FRAZIL_TENDENCY_APPLY_T
                0005 
                0006 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0007 CBOP 0
                0008 
                0009 C !INTERFACE:
                0010       SUBROUTINE FRAZIL_TENDENCY_APPLY_T(
73b1dccda0 Jean*0011      U                     gT_arr,
                0012      I                     iMin,iMax,jMin,jMax, k, bi, bj,
                0013      I                     myTime, myIter, myThid )
e0b3e1bdd8 Dimi*0014 
                0015 C     !DESCRIPTION:
33e5e9881a Dimi*0016 C     Add frazil tendency terms to T (theta) tendency.
                0017 C     Routine works for one level at a time.
e0b3e1bdd8 Dimi*0018 
                0019 C     !USES:
                0020       IMPLICIT NONE
                0021 #include "SIZE.h"
73b1dccda0 Jean*0022 #include "EEPARAMS.h"
33e5e9881a Dimi*0023 #include "PARAMS.h"
e0b3e1bdd8 Dimi*0024 #include "GRID.h"
73b1dccda0 Jean*0025 c#include "DYNVARS.h"
33e5e9881a Dimi*0026 #ifdef ALLOW_FRAZIL
                0027 # include "FRAZIL.h"
                0028 #endif
                0029 
                0030 C     !INPUT/OUTPUT PARAMETERS:
73b1dccda0 Jean*0031 C     gT_arr    :: the tendency array
                0032 C     iMin,iMax :: Working range of x-index for applying forcing.
                0033 C     jMin,jMax :: Working range of y-index for applying forcing.
                0034 C     k         :: Current vertical level index
                0035 C     bi,bj     :: Current tile indices
                0036 C     myTime    :: Current time in simulation
                0037 C     myIter    :: Current iteration number
                0038 C     myThid    :: my Thread Id number
                0039       _RL     gT_arr(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0040       INTEGER iMin, iMax, jMin, jMax
                0041       INTEGER k, bi, bj
33e5e9881a Dimi*0042       _RL     myTime
73b1dccda0 Jean*0043       INTEGER myIter
33e5e9881a Dimi*0044       INTEGER myThid
e0b3e1bdd8 Dimi*0045 CEOP
                0046 
                0047 #ifdef ALLOW_FRAZIL
33e5e9881a Dimi*0048 
e0b3e1bdd8 Dimi*0049 C     !LOCAL VARIABLES:
                0050       INTEGER i, j
52d51b46b8 Jean*0051       _RL recip_Cp
e0b3e1bdd8 Dimi*0052 
52d51b46b8 Jean*0053       recip_Cp = 1. _d 0 / HeatCapacity_Cp
610e3cd50d Dimi*0054       DO j=jMin,jMax
                0055        DO i=iMin,iMax
73b1dccda0 Jean*0056         gT_arr(i,j) = gT_arr(i,j)
33e5e9881a Dimi*0057      &       + FrazilForcingT(i,j,k,bi,bj)
                0058      &       * recip_Cp * mass2rUnit
                0059      &       * recip_drF(k) * _recip_hFacC(i,j,k,bi,bj)
610e3cd50d Dimi*0060        ENDDO
                0061       ENDDO
33e5e9881a Dimi*0062 
e0b3e1bdd8 Dimi*0063 #endif /* ALLOW_FRAZIL */
                0064 
                0065       RETURN
                0066       END