Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:41:31 UTC

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