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

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

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


Revision 1.18 - (show annotations) (download)
Wed Sep 26 18:09:14 2001 UTC (22 years, 9 months ago) by cnh
Branch: MAIN
CVS Tags: ecco_c44_e19, checkpoint46g_pre, release1_p13_pre, checkpoint46f_post, checkpoint46b_post, checkpoint43a-release1mods, checkpoint44g_post, checkpoint46l_pre, chkpt44d_post, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint44e_pre, release1_b1, checkpoint43, release1_chkpt44d_post, chkpt44c_pre, icebear5, icebear4, icebear3, icebear2, checkpoint46d_pre, checkpoint46e_post, release1-branch_tutorials, checkpoint45d_post, checkpoint46j_pre, chkpt44a_post, checkpoint44h_pre, checkpoint46a_post, chkpt44c_post, checkpoint46j_post, checkpoint46k_post, checkpoint46b_pre, checkpoint45a_post, checkpoint44e_post, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p12, release1_p13, release1_p10, release1_p11, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint46e_pre, checkpoint45b_post, release1-branch-end, release1_final_v1, release1_p12_pre, checkpoint46c_pre, checkpoint44f_post, checkpoint44b_post, checkpoint46h_pre, checkpoint46a_pre, checkpoint45c_post, ecco_ice2, ecco_ice1, checkpoint44h_post, checkpoint46g_post, checkpoint46i_post, ecco_c44_e25, chkpt44a_pre, ecco_c44_e22, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, checkpoint46c_post, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, release1_beta1, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint46, checkpoint44, checkpoint45, checkpoint46h_post, checkpoint44f_pre, checkpoint46d_post, release1-branch_branchpoint
Branch point for: c24_e25_ice, release1_coupled, release1_final, release1-branch, release1, ecco-branch, release1_50yr, icebear
Changes since 1.17: +23 -8 lines
Bringing comments up to data and formatting for document extraction.

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/convect.F,v 1.17 2001/07/30 20:23:09 heimbach Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: CONVECT
8 C !INTERFACE:
9 SUBROUTINE CONVECT( bi, bj, iMin, iMax, jMin, jMax, K,
10 & rhoKm1, rhoKp1, ConvectCount,
11 & myTime,myIter, myThid )
12 C !DESCRIPTION: \bv
13 C *==========================================================*
14 C | SUBROUTINE CONVECT
15 C | o Does vertical mixing of unstable water columns
16 C *==========================================================*
17 C | Uses simple homgenisation scheme between unstable
18 C | layers.
19 C *==========================================================*
20 C \ev
21 C !USES:
22 IMPLICIT NONE
23 C == Global data ==
24 #include "SIZE.h"
25 #include "EEPARAMS.h"
26 #include "PARAMS.h"
27 #include "DYNVARS.h"
28 #include "GRID.h"
29 #ifdef ALLOW_PASSIVE_TRACER
30 #include "TR1.h"
31 #endif
32 EXTERNAL DIFFERENT_MULTIPLE
33 LOGICAL DIFFERENT_MULTIPLE
34
35 C !INPUT/OUTPUT PARAMETERS:
36 C == Routine arguments ==
37 C bi,bj,iMin,iMax,jMin,jMax,K - Loop counters
38 C rhoKm1 - rho in layer above
39 C rhoKp1 - rho in layer below
40 C myTime - Current time in simulation
41 C myIter - Current iteration in simulation
42 C myThid - Thread number of this instance of S/R CONVECT
43 INTEGER bi,bj,iMin,iMax,jMin,jMax,K
44 _RL rhoKm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45 _RL rhoKp1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
46 _RL ConvectCount(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
47 _RL myTime
48 INTEGER myIter
49 INTEGER myThid
50
51 C !LOCAL VARIABLES:
52 C == Local variables ==
53 C i,j :: Loop counter
54 C tMix :: Temp. for calculation of mixed theta.
55 C sMix :: Temp. for calculation of mixed salt.
56 C tr1Mix :: Temp. for calculation of mixed tracer.
57 C dSum :: Temp. for layer thicknesses
58 INTEGER i,j
59 _RL tMix(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
60 _RL sMix(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
61 #ifdef ALLOW_PASSIVE_TRACER
62 _RL tr1Mix(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
63 #endif
64 _RL dSum(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
65 CEOP
66
67 C-- Check to see if should convect now
68 IF ( DIFFERENT_MULTIPLE(cAdjFreq,myTime,myTime-deltaTClock) ) THEN
69
70 C-- Calculate heat content of two level column
71 DO j=jMin,jmax
72 DO i=iMin,imax
73 tMix(i,j) = theta(i,j,k-1,bi,bj)
74 & *_hFacC(i,j,k-1,bi,bj)*drF(k-1)
75 & +theta(i,j,k,bi,bj)
76 & *_hFacC(i,j,k,bi,bj)*drF(k)
77 sMix(i,j) = salt (i,j,k-1,bi,bj)
78 & *_hFacC(i,j,k-1,bi,bj)*drF(k-1)
79 & +salt (i,j,k,bi,bj)
80 & *_hFacC(i,j,k,bi,bj)*drF(k)
81 #ifdef ALLOW_PASSIVE_TRACER
82 tr1Mix(i,j) = Tr1 (i,j,k-1,bi,bj)
83 & *_hFacC(i,j,k-1,bi,bj)*drF(k-1)
84 & +Tr1 (i,j,k,bi,bj)
85 & *_hFacC(i,j,k,bi,bj)*drF(k)
86 #endif
87 dSum(i,j) = _hFacC(i,j,k-1,bi,bj)*drF(k-1)
88 & +_hFacC(i,j,k,bi,bj)*drF(k)
89 ENDDO
90 ENDDO
91
92 C-- Where statically unstable, mix the heat and salt
93 DO j=jMin,jmax
94 DO i=iMin,imax
95 IF ( _hFacC(i,j,k,bi,bj) .GT. 0. .AND.
96 & rhokm1(i,j) .GT. rhokp1(i,j) ) THEN
97 theta(i,j,k-1,bi,bj) = tMix(i,j)/dSum(i,j)
98 theta(i,j,k ,bi,bj) = tMix(i,j)/dSum(i,j)
99 salt(i,j,k-1,bi,bj) = sMix(i,j)/dSum(i,j)
100 salt(i,j,k ,bi,bj) = sMix(i,j)/dSum(i,j)
101 #ifdef ALLOW_PASSIVE_TRACER
102 Tr1(i,j,k-1,bi,bj) = Tr1Mix(i,j)/dSum(i,j)
103 Tr1(i,j,k ,bi,bj) = Tr1Mix(i,j)/dSum(i,j)
104 #endif
105 ConvectCount(i,j,k) = ConvectCount(i,j,k) + 1.
106 ENDIF
107 ENDDO
108 ENDDO
109
110 ENDIF
111
112 RETURN
113 END

  ViewVC Help
Powered by ViewVC 1.1.22