55 |
_RL rhoKm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL rhoKm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
56 |
_RL rhoK (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL rhoK (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
57 |
_RL ConvectCount(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL ConvectCount(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
58 |
|
_RL weightA(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
59 |
|
_RL weightB(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
60 |
CEOP |
CEOP |
61 |
|
|
62 |
C-- Check to see if should convect now |
C-- Check to see if should convect now |
121 |
CADJ STORE rhoK (:,:) = comlev1_bibj_k, key = kkey, byte = isbyte |
CADJ STORE rhoK (:,:) = comlev1_bibj_k, key = kkey, byte = isbyte |
122 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF_TAMC */ |
123 |
C- Check static stability with layer below and mix as needed. |
C- Check static stability with layer below and mix as needed. |
124 |
CALL CONVECT( |
c CALL CONVECT( |
125 |
I bi,bj,iMin,iMax,jMin,jMax,K,rhoKm1,rhoK, |
c I bi,bj,iMin,iMax,jMin,jMax,K,rhoKm1,rhoK, |
126 |
U ConvectCount, |
c U ConvectCount, |
127 |
I myTime,myIter,myThid) |
c I myTime,myIter,myThid) |
128 |
|
|
129 |
|
C- Pre-calculate mixing weights for interface K |
130 |
|
CALL CONVECTIVE_WEIGHTS( |
131 |
|
I bi,bj,K,rhoKm1,rhoK, |
132 |
|
O weightA,weightB,ConvectCount, |
133 |
|
I myThid) |
134 |
|
|
135 |
|
C- Convectively mix heat across interface K |
136 |
|
CALL CONVECTIVELY_MIXTRACER( |
137 |
|
I bi,bj,k,weightA,weightB, |
138 |
|
U theta, |
139 |
|
I myThid) |
140 |
|
|
141 |
|
C- Convectively mix salt across interface K |
142 |
|
CALL CONVECTIVELY_MIXTRACER( |
143 |
|
I bi,bj,k,weightA,weightB, |
144 |
|
U salt, |
145 |
|
I myThid) |
146 |
|
|
147 |
|
#ifdef ALLOW_PASSIVE_TRACER |
148 |
|
C- Convectively mix passive tracer across interface K |
149 |
|
CALL CONVECTIVELY_MIXTRACER( |
150 |
|
I bi,bj,k,weightA,weightB, |
151 |
|
U Tr1, |
152 |
|
I myThid) |
153 |
|
#endif /* ALLOW_PASSIVE_TRACER */ |
154 |
|
|
155 |
C-- End DO K=1,Nr |
C-- End DO K=1,Nr |
156 |
ENDDO |
ENDDO |