/[MITgcm]/MITgcm/model/src/calc_ivdc.F
ViewVC logotype

Contents of /MITgcm/model/src/calc_ivdc.F

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


Revision 1.5 - (show annotations) (download)
Wed Oct 15 22:55:01 2003 UTC (20 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint52d_pre, checkpoint52j_pre, checkpoint51o_pre, checkpoint51l_post, checkpoint52l_post, checkpoint52k_post, checkpoint53, checkpoint52, checkpoint52f_post, checkpoint51t_post, checkpoint51n_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint52e_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint53d_post, checkpoint52b_pre, checkpoint51l_pre, checkpoint52m_post, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint52f_pre, checkpoint53c_post, checkpoint51r_post, checkpoint53a_post, checkpoint52d_post, checkpoint52a_pre, checkpoint52i_post, checkpoint52h_pre, checkpoint53f_post, checkpoint52j_post, branch-netcdf, checkpoint52n_post, checkpoint53b_pre, checkpoint51o_post, checkpoint53b_post, checkpoint52a_post, ecco_c52_e35, checkpoint51m_post, checkpoint53d_pre, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.4: +2 -2 lines
* reverse gravitySign back to "logical" value: +1 when R increases downward

1 C $Header: /u/gcmpack/MITgcm/model/src/calc_ivdc.F,v 1.4 2002/08/15 17:25:31 adcroft Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5 CBOP
6 C !ROUTINE: CALC_IVDC
7 C !INTERFACE:
8 SUBROUTINE CALC_IVDC( bi, bj, iMin, iMax, jMin, jMax, K,
9 & rhoKm1, rhoKp1,
10 & ConvectCount, KappaRT, KappaRS,
11 & myTime,myIter, myThid )
12 C !DESCRIPTION: \bv
13 C *==========================================================*
14 C | SUBROUTINE CALC_IVDC
15 C | o Calculates Implicit Vertical Diffusivity for Convection
16 C \==========================================================*
17 C \ev
18 C !USES:
19 IMPLICIT NONE
20 C == Global data ==
21 #include "SIZE.h"
22 #include "EEPARAMS.h"
23 #include "PARAMS.h"
24 #include "DYNVARS.h"
25 #include "GRID.h"
26 EXTERNAL DIFFERENT_MULTIPLE
27 LOGICAL DIFFERENT_MULTIPLE
28
29 C !INPUT/OUTPUT PARAMETERS:
30 C == Routine arguments ==
31 C bi,bj,iMin,iMax,jMin,jMax,K :: Loop counters
32 C rhoKm1 :: rho in layer above
33 C rhoKp1 :: rho in layer below
34 C myTime :: Current time in simulation
35 C myIter :: Current iteration in simulation
36 C myThid :: Thread number of this instance of S/R CONVECT
37 INTEGER bi,bj,iMin,iMax,jMin,jMax,K
38 C KappaRT :: Vertical diffusion coeff. for theta
39 C KappaRS :: Vertical diffusion coeff. for salt
40 C ConvectCount :: Static instability counter
41 _RL rhoKm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
42 _RL rhoKp1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43 _RL ConvectCount(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
44 _RL KappaRT(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
45 _RL KappaRS(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
46 _RL myTime
47 INTEGER myIter
48 INTEGER myThid
49
50 C !LOCAL VARIABLES:
51 C == Local variables ==
52 C i,j :: Loop counters
53 INTEGER i,j
54 CEOP
55
56 C-- Where statically unstable, mix the heat and salt
57 DO j=jMin,jmax
58 DO i=iMin,imax
59 IF ( _hFacC(i,j,k,bi,bj) .GT. 0. .AND.
60 & (rhokm1(i,j)-rhokp1(i,j))*rkFac*gravitySign .LT. 0. ) THEN
61 KappaRT(i,j,k) = ivdc_kappa
62 KappaRS(i,j,k) = ivdc_kappa
63 ConvectCount(i,j,k) = ConvectCount(i,j,k) + 1.
64 ENDIF
65 ENDDO
66 ENDDO
67
68 RETURN
69 END

  ViewVC Help
Powered by ViewVC 1.1.22