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

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

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


Revision 1.2 - (hide annotations) (download)
Fri Feb 2 21:04:47 2001 UTC (23 years, 4 months ago) by adcroft
Branch: MAIN
Changes since 1.1: +100 -0 lines
Merged changes from branch "branch-atmos-merge" into MAIN (checkpoint34)
 - substantial modifications to algorithm sequence (dynamics.F)
 - packaged OBCS, Shapiro filter, Zonal filter, Atmospheric Physics

1 adcroft 1.2 C $Header: /u/gcmpack/models/MITgcmUV/model/src/Attic/convective_adjustment.F,v 1.1.2.3 2001/01/12 21:02:46 adcroft Exp $
2    
3     #include "CPP_OPTIONS.h"
4    
5     SUBROUTINE CONVECTIVE_ADJUSTMENT(
6     I bi, bj, iMin, iMax, jMin, jMax,
7     I myTime, myIter, myThid )
8     C /==========================================================\
9     C | SUBROUTINE CONVECTIVE_ADJUSTMENT |
10     C | o Calls vertical mixing or similar parameterization |
11     C \==========================================================/
12     IMPLICIT NONE
13    
14     C == Global data ==
15     #include "SIZE.h"
16     #include "EEPARAMS.h"
17     #include "PARAMS.h"
18     #include "DYNVARS.h"
19     #include "GRID.h"
20    
21     EXTERNAL DIFFERENT_MULTIPLE
22     LOGICAL DIFFERENT_MULTIPLE
23    
24     C == Routine arguments ==
25     C bi,bj,iMin,iMax,jMin,jMax,K - Loop counters
26     C myTime - Current time in simulation
27     C myIter - Current iteration in simulation
28     C myThid - Thread number of this instance of S/R CONVECT
29     INTEGER bi,bj,iMin,iMax,jMin,jMax
30     _RL myTime
31     INTEGER myIter
32     INTEGER myThid
33    
34     #ifdef INCLUDE_CONVECT_CALL
35    
36     C == Local variables ==
37     INTEGER K
38     _RL rhoKm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
39     _RL rhoK (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
40     _RL ConvectCount(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
41    
42     C-- Check to see if should convect now
43     IF ( DIFFERENT_MULTIPLE(cAdjFreq,myTime,myTime-deltaTClock) ) THEN
44    
45     #ifdef ALLOW_KPP
46     IF (
47     & (.NOT.useKPP) ! CONVECT not needed with KPP mixing
48     & ) THEN
49     #endif /* ALLOW_KPP */
50    
51     C-- Loop over all *interior* layers
52     DO K=2,Nr
53    
54     #ifdef ALLOW_AUTODIFF_TAMC
55     CADJ STORE theta(:,:,k-1,bi,bj) = comlev1_bibj, key = ikey, byte = isbyte
56     CADJ STORE salt (:,:,k-1,bi,bj) = comlev1_bibj, key = ikey, byte = isbyte
57     #endif /* ALLOW_AUTODIFF_TAMC */
58     C- Density of K-1 layer (above W(K)) reference to K-1 T-level
59     CALL FIND_RHO(
60     I bi,bj,iMin,iMax,jMin,jMax,K-1,K-1,eosType,
61     I theta,salt,
62     O rhoKm1,
63     I myThid )
64    
65     C- Density of K layer (below W(K)) reference to K-1 T-level.
66     #ifdef ALLOW_AUTODIFF_TAMC
67     CADJ STORE theta(:,:,k,bi,bj) = comlev1_bibj, key = ikey, byte = isbyte
68     CADJ STORE salt (:,:,k,bi,bj) = comlev1_bibj, key = ikey, byte = isbyte
69     #endif /* ALLOW_AUTODIFF_TAMC */
70     CALL FIND_RHO(
71     I bi,bj,iMin,iMax,jMin,jMax,K,K-1,eosType,
72     I theta,salt,
73     O rhoK,
74     I myThid )
75    
76     #ifdef ALLOW_AUTODIFF_TAMC
77     CADJ STORE rhoKm1(:,:) = comlev1_bibj, key = ikey, byte = isbyte
78     CADJ STORE rhoKp1(:,:) = comlev1_bibj, key = ikey, byte = isbyte
79     #endif /* ALLOW_AUTODIFF_TAMC */
80     C- Check static stability with layer below and mix as needed.
81     CALL CONVECT(
82     I bi,bj,iMin,iMax,jMin,jMax,K,rhoKm1,rhoK,
83     U ConvectCount,
84     I myTime,myIter,myThid)
85    
86     C-- End DO K=1,Nr
87     ENDDO
88    
89     #ifdef ALLOW_KPP
90     C-- End IF (.NOT.useKPP)
91     ENDIF
92     #endif /* ALLOW_KPP */
93    
94     C-- End IF (DIFFERENT_MULTIPLE)
95     ENDIF
96    
97     #endif /* INCLUDE_CONVECT_CALL */
98    
99     RETURN
100     END

  ViewVC Help
Powered by ViewVC 1.1.22