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

Diff of /MITgcm/model/src/convective_adjustment.F

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

revision 1.8 by cnh, Wed Sep 26 18:09:14 2001 UTC revision 1.11 by adcroft, Mon Mar 4 17:26:40 2002 UTC
# Line 55  C     ConvectCount :: Convection mixing Line 55  C     ConvectCount :: Convection mixing
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
# Line 72  C-      Initialisation of Convection Cou Line 74  C-      Initialisation of Convection Cou
74  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
75            act1 = bi - myBxLo(myThid)            act1 = bi - myBxLo(myThid)
76            max1 = myBxHi(myThid) - myBxLo(myThid) + 1            max1 = myBxHi(myThid) - myBxLo(myThid) + 1
   
77            act2 = bj - myByLo(myThid)            act2 = bj - myByLo(myThid)
78            max2 = myByHi(myThid) - myByLo(myThid) + 1            max2 = myByHi(myThid) - myByLo(myThid) + 1
   
79            act3 = myThid - 1            act3 = myThid - 1
80            max3 = nTx*nTy            max3 = nTx*nTy
   
81            act4 = ikey_dynamics - 1            act4 = ikey_dynamics - 1
   
82            ikey = (act1 + 1) + act2*max1            ikey = (act1 + 1) + act2*max1
83       &                      + act3*max1*max2       &                      + act3*max1*max2
84       &                      + act4*max1*max2*max3       &                      + act4*max1*max2*max3
# Line 123  CADJ STORE rhoKm1(:,:)  = comlev1_bibj_k Line 121  CADJ STORE rhoKm1(:,:)  = comlev1_bibj_k
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    #ifdef ALLOW_PTRACERS
156    C-          Convectively mix passive tracers across interface K
157                IF ( usePTRACERS ) THEN
158                  CALL PTRACERS_CONVECT(
159         I                              bi,bj,k,weightA,weightB,myThid)
160                ENDIF
161    #endif /* ALLOW_PTRACERS */
162    
163  C--       End DO K=1,Nr  C--       End DO K=1,Nr
164            ENDDO            ENDDO

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.22