1 |
cnh |
1.3 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/aim/phy_driver.F,v 1.2 2001/02/02 21:36:29 adcroft Exp $ |
2 |
|
|
C $Name: $ |
3 |
adcroft |
1.2 |
|
4 |
cnh |
1.3 |
SUBROUTINE PDRIVER (TYEAR, myThid) |
5 |
adcroft |
1.2 |
C-- |
6 |
|
|
C-- SUBROUTINE PDRIVER (TYEAR) |
7 |
|
|
C-- |
8 |
|
|
C-- Purpose: stand-alone driver for physical parametrization routines |
9 |
|
|
C-- Input : TYEAR : fraction of year (0 = 1jan.00, 1 = 31dec.24) |
10 |
|
|
C-- grid-point model fields in common block: PHYGR1 |
11 |
|
|
C-- forcing fields in common blocks : LSMASK, FORFIX, FORCIN |
12 |
|
|
C-- Output : Diagnosed upper-air variables in common block: PHYGR2 |
13 |
|
|
C-- Diagnosed surface variables in common block: PHYGR3 |
14 |
|
|
C-- Physical param. tendencies in common block: PHYTEN |
15 |
|
|
C-- Surface and upper boundary fluxes in common block: FLUXES |
16 |
|
|
C-- |
17 |
|
|
|
18 |
|
|
|
19 |
|
|
IMPLICIT rEAL*8 ( A-H,O-Z) |
20 |
|
|
|
21 |
cnh |
1.3 |
#include "EEPARAMS.h" |
22 |
adcroft |
1.2 |
|
23 |
|
|
C Resolution parameters |
24 |
|
|
C |
25 |
|
|
#include "atparam.h" |
26 |
|
|
#include "atparam1.h" |
27 |
|
|
C |
28 |
cnh |
1.3 |
INTEGER NLON, NLAT, NLEV, NGP |
29 |
adcroft |
1.2 |
PARAMETER ( NLON=IX, NLAT=IL, NLEV=KX, NGP=NLON*NLAT ) |
30 |
|
|
C |
31 |
|
|
C Constants + functions of sigma and latitude |
32 |
|
|
C |
33 |
|
|
#include "Lev_def.h" |
34 |
|
|
#include "com_physcon.h" |
35 |
|
|
C |
36 |
|
|
C Model variables, tendencies and fluxes on gaussian grid |
37 |
|
|
C |
38 |
|
|
#include "com_physvar.h" |
39 |
|
|
C |
40 |
|
|
C Surface forcing fields (time-inv. or functions of seasonal cycle) |
41 |
|
|
C |
42 |
|
|
#include "com_forcing1.h" |
43 |
|
|
#include "com_forcon.h" |
44 |
|
|
#include "com_sflcon.h" |
45 |
|
|
|
46 |
|
|
REAL TYEAR |
47 |
cnh |
1.3 |
INTEGER myThid |
48 |
adcroft |
1.2 |
|
49 |
|
|
INTEGER IDEPTH(NGP) |
50 |
|
|
REAL RPS(NGP), ALB1(NGP), FSOL1(NGP), OZONE1(NGP) |
51 |
cnh |
1.3 |
|
52 |
|
|
REAL TAURAD(NGP,NLEV), ST4ARAD(NGP,NLEV,2) |
53 |
adcroft |
1.2 |
CcnhDebugStarts |
54 |
|
|
REAL AUX(NGP) |
55 |
|
|
REAL Phymask(NGP,NLEV) |
56 |
|
|
real xminim |
57 |
|
|
REAL UT_VDI(NGP,NLEV), VT_VDI(NGP,NLEV), TT_VDI(NGP,NLEV) |
58 |
|
|
REAL QT_VDI(NGP,NLEV) |
59 |
|
|
CcnhDebugEnds |
60 |
cnh |
1.3 |
INTEGER J, K |
61 |
adcroft |
1.2 |
|
62 |
|
|
|
63 |
|
|
C-- 1. Compute surface variables |
64 |
|
|
|
65 |
|
|
C 1.1 Surface pressure (ps), 1/ps and surface temperature |
66 |
|
|
C |
67 |
|
|
DO J=1,NGP |
68 |
cnh |
1.3 |
PSG(J,myThid)=EXP(PSLG1(J,myThid)) |
69 |
|
|
RPS(J)=1./PSG(J,myThid) |
70 |
|
|
TS(J,myThid) =SST1(J,myThid)+ |
71 |
|
|
& FMASK1(J,myThid)*(STL1(J,myThid)-SST1(J,myThid)) |
72 |
adcroft |
1.2 |
ENDDO |
73 |
|
|
|
74 |
|
|
C 1.2 Surface albedo: |
75 |
|
|
C defined as a weighed average of land and ocean albedos, where |
76 |
|
|
C land albedo depends linearly on snow depth (up to the SDALB |
77 |
|
|
C threshold) and sea albedo depends linearly on sea-ice fraction. |
78 |
|
|
C |
79 |
|
|
DALB=ALBICE-ALBSEA |
80 |
|
|
RSD=1./SDALB |
81 |
|
|
C |
82 |
|
|
CmoltBegin |
83 |
|
|
DO J=1,NGP |
84 |
cnh |
1.3 |
ALB1(J)=ALB0(J,myThid) |
85 |
adcroft |
1.2 |
ENDDO |
86 |
|
|
CmoltEnd |
87 |
|
|
|
88 |
|
|
C-- 2. Compute thermodynamic variables |
89 |
|
|
|
90 |
|
|
C 2.1 Dry static energy |
91 |
|
|
|
92 |
|
|
DO K=1,NLEV |
93 |
|
|
DO J=1,NGP |
94 |
cnh |
1.3 |
SE(J,K,myThid)=CP*TG1(J,K,myThid)+PHIG1(J,K,myThid) |
95 |
adcroft |
1.2 |
ENDDO |
96 |
|
|
ENDDO |
97 |
|
|
C |
98 |
|
|
C 2.2 Relative humidity and saturation spec. humidity |
99 |
|
|
C |
100 |
|
|
DO K=1,NLEV |
101 |
cnh |
1.3 |
CALL SHTORH (1,NGP,TG1(1,K,myThid),PSG(1,myThid), |
102 |
|
|
& SIG(K),QG1(1,K,myThid), |
103 |
|
|
* RH(1,K,myThid),QSAT(1,K,myThid), |
104 |
|
|
I myThid) |
105 |
adcroft |
1.2 |
ENDDO |
106 |
|
|
C |
107 |
|
|
DO K=1,NLEV |
108 |
|
|
DO J=1,NGP |
109 |
|
|
phymask(J,K)=0. |
110 |
cnh |
1.3 |
IF (Tg1(J,K,myThid).ne.0.) THEN |
111 |
adcroft |
1.2 |
phymask(J,K)=1. |
112 |
|
|
ENDIF |
113 |
cnh |
1.3 |
QSAT(J,K,myThid)=QSAT(J,K,myThid)*Phymask(J,K) |
114 |
|
|
QG1(J,K,myThid)=QG1(J,K,myThid)*Phymask(J,K) |
115 |
|
|
RH(J,K,myThid)=RH(J,K,myThid)*Phymask(J,K) |
116 |
adcroft |
1.2 |
ENDDO |
117 |
|
|
ENDDO |
118 |
|
|
cdbgch |
119 |
|
|
C |
120 |
|
|
C-- 3. Precipitation |
121 |
|
|
|
122 |
|
|
C 3.1 Deep convection |
123 |
|
|
C |
124 |
|
|
cch CALL CONVMF (PSG,SE,QG1,QSAT, |
125 |
cnh |
1.3 |
CALL CONVMF (PSG(1,myThid),TG1(1,1,myThid), |
126 |
|
|
& QG1(1,1,myThid),QSAT(1,1,myThid), |
127 |
|
|
* IDEPTH,CBMF(1,myThid),PRECNV(1,myThid), |
128 |
|
|
& TT_CNV(1,1,myThid),QT_CNV(1,1,myThid), |
129 |
|
|
I myThid) |
130 |
|
|
|
131 |
adcroft |
1.2 |
C |
132 |
|
|
DO K=2,NLEV |
133 |
|
|
DO J=1,NGP |
134 |
cnh |
1.3 |
TT_CNV(J,K,myThid)=TT_CNV(J,K,myThid)*RPS(J)*GRDSCP(K) |
135 |
|
|
QT_CNV(J,K,myThid)=QT_CNV(J,K,myThid)*RPS(J)*GRDSIG(K) |
136 |
adcroft |
1.2 |
ENDDO |
137 |
|
|
ENDDO |
138 |
|
|
|
139 |
|
|
C 3.2 Large-scale condensation |
140 |
|
|
|
141 |
cnh |
1.3 |
CALL LSCOND (PSG(1,myThid),QG1(1,1,myThid),QSAT(1,1,myThid), |
142 |
|
|
* PRECLS(1,myThid),TT_LSC(1,1,myThid), |
143 |
|
|
& QT_LSC(1,1,myThid), |
144 |
|
|
I myThid) |
145 |
adcroft |
1.2 |
|
146 |
|
|
C |
147 |
|
|
C-- 4. Radiation (shortwave and longwave) |
148 |
|
|
|
149 |
|
|
C 4.1 Compute climatological forcing |
150 |
|
|
|
151 |
cnh |
1.3 |
CALL SOL_OZ (SOLC,TYEAR,FSOL1,OZONE1, |
152 |
|
|
I myThid) |
153 |
adcroft |
1.2 |
|
154 |
|
|
C 4.2 Compute shortwave tendencies and initialize lw transmissivity |
155 |
|
|
C (The sw radiation may be called at selected time steps) |
156 |
|
|
|
157 |
cnh |
1.3 |
CALL RADSW (PSG(1,myThid),QG1(1,1,myThid),RH(1,1,myThid), |
158 |
|
|
* FSOL1,OZONE1,ALB1,TAURAD, |
159 |
|
|
* CLOUDC(1,myThid),TSR(1,myThid),SSR(1,myThid), |
160 |
|
|
& TT_RSW(1,1,myThid), |
161 |
|
|
I myThid) |
162 |
adcroft |
1.2 |
|
163 |
|
|
C 4.3 Compute longwave fluxes |
164 |
|
|
|
165 |
cnh |
1.3 |
CALL RADLW (1,TG1(1,1,myThid),TS(1,myThid),ST4S(1,myThid), |
166 |
|
|
& TAURAD, ST4ARAD, |
167 |
|
|
* OLR(1,myThid),SLR(1,myThid),TT_RLW(1,1,myThid), |
168 |
|
|
& SLR_DOWN(1,myThid), |
169 |
|
|
I myThid) |
170 |
adcroft |
1.2 |
|
171 |
|
|
DO K=1,NLEV |
172 |
|
|
DO J=1,NGP |
173 |
cnh |
1.3 |
TT_RSW(J,K,myThid)=TT_RSW(J,K,myThid)*RPS(J)*GRDSCP(K) |
174 |
|
|
TT_RLW(J,K,myThid)=TT_RLW(J,K,myThid)*RPS(J)*GRDSCP(K) |
175 |
adcroft |
1.2 |
ENDDO |
176 |
|
|
ENDDO |
177 |
cnh |
1.3 |
|
178 |
adcroft |
1.2 |
C |
179 |
|
|
C-- 5. PBL interactions with lower troposphere and surface |
180 |
|
|
|
181 |
|
|
C 5.1. Surface fluxes (from climatological surface temperature) |
182 |
|
|
|
183 |
|
|
cch Attention the pressure used is a the last T level and |
184 |
|
|
Cch not at the last W level |
185 |
|
|
C -------------------------------- |
186 |
cnh |
1.3 |
CALL SUFLUX (PNLEVW(1,myThid), |
187 |
|
|
& UG1(1,1,myThid),VG1(1,1,myThid), |
188 |
|
|
& TG1(1,1,myThid),QG1(1,1,myThid), |
189 |
|
|
& RH(1,1,myThid),QSAT(1,1,myThid), |
190 |
|
|
& VsurfSq(1,myThid),PHIG1(1,1,myThid), |
191 |
|
|
& PHI0(1,myThid),FMASK1(1,myThid), |
192 |
|
|
& STL1(1,myThid),SST1(1,myThid),SOILQ1(1,myThid), |
193 |
|
|
& SSR(1,myThid),SLR(1,myThid), |
194 |
|
|
& DRAG(1,myThid), |
195 |
|
|
& USTR(1,1,myThid),VSTR(1,1,myThid),SHF(1,1,myThid), |
196 |
|
|
& EVAP(1,1,myThid),T0(1,1,myThid),Q0(1,myThid), |
197 |
|
|
& QSAT0(1,1,myThid),SPEED0(1,myThid), |
198 |
|
|
I myThid) |
199 |
adcroft |
1.2 |
|
200 |
|
|
C |
201 |
|
|
C remove when vdifsc is implemented |
202 |
|
|
DO K=1,NLEV |
203 |
|
|
DO J=1,NGP |
204 |
cnh |
1.3 |
UT_PBL(J,K,myThid)=0. |
205 |
|
|
VT_PBL(J,K,myThid)=0. |
206 |
|
|
TT_PBL(J,K,myThid)=0. |
207 |
|
|
QT_PBL(J,K,myThid)=0. |
208 |
adcroft |
1.2 |
ENDDO |
209 |
|
|
ENDDO |
210 |
|
|
c |
211 |
|
|
C |
212 |
|
|
c |
213 |
|
|
C 5.3 Add surface fluxes and convert fluxes to tendencies |
214 |
|
|
|
215 |
|
|
DO J=1,NGP |
216 |
cnh |
1.3 |
IF ( NLEVxy(J,myThid) .GT. 0 ) THEN |
217 |
|
|
UT_PBL(J,NLEVxy(J,myThid),myThid)=UT_PBL(J,NLEVxy(J,myThid),myThid)+ USTR(J,3,myThid) |
218 |
|
|
VT_PBL(J,NLEVxy(J,myThid),myThid)=VT_PBL(J,NLEVxy(J,myThid),myThid)+ VSTR(J,3,myThid) |
219 |
|
|
TT_PBL(J,NLEVxy(J,myThid),myThid)=TT_PBL(J,NLEVxy(J,myThid),myThid)+ SHF(J,3,myThid) |
220 |
|
|
QT_PBL(J,NLEVxy(J,myThid),myThid)=QT_PBL(J,NLEVxy(J,myThid),myThid)+ EVAP(J,3,myThid) |
221 |
adcroft |
1.2 |
ENDIF |
222 |
|
|
ENDDO |
223 |
|
|
C |
224 |
|
|
Cdbgch |
225 |
|
|
DO J=1,NGP |
226 |
cnh |
1.3 |
IF ( NLEVxy(J,myThid) .GT. 0 ) THEN |
227 |
|
|
DO K=NLEVxy(J,myThid)-1,NLEVxy(J,myThid) |
228 |
|
|
UT_PBL(J,K,myThid)=UT_PBL(J,K,myThid)*GRDSIG(K) |
229 |
|
|
VT_PBL(J,K,myThid)=VT_PBL(J,K,myThid)*GRDSIG(K) |
230 |
|
|
TT_PBL(J,K,myThid)=TT_PBL(J,K,myThid)*GRDSCP(K) |
231 |
|
|
QT_PBL(J,K,myThid)=QT_PBL(J,K,myThid)*GRDSIG(K) |
232 |
adcroft |
1.2 |
ENDDO |
233 |
|
|
ENDIF |
234 |
|
|
ENDDO |
235 |
|
|
C |
236 |
|
|
C 5.2 Vertical diffusion and shallow convection (not yet implemented) |
237 |
|
|
C |
238 |
cnh |
1.3 |
CALL VDIFSC (UG1(1,1,myThid),VG1(1,1,myThid), |
239 |
|
|
& TG1(1,1,myThid),RH(1,1,myThid), |
240 |
|
|
& QG1(1,1,myThid), QSAT(1,1,myThid), |
241 |
|
|
* UT_VDI,VT_VDI,TT_VDI,QT_VDI, |
242 |
|
|
I myThid) |
243 |
adcroft |
1.2 |
C |
244 |
|
|
DO K=1,NLEV |
245 |
|
|
DO J=1,NGP |
246 |
cnh |
1.3 |
UT_PBL(J,K,myThid)=UT_PBL(J,K,myThid)+ UT_VDI(J,K) |
247 |
|
|
VT_PBL(J,K,myThid)=VT_PBL(J,K,myThid)+ VT_VDI(J,K) |
248 |
|
|
TT_PBL(J,K,myThid)=TT_PBL(J,K,myThid)+ TT_VDI(J,K) |
249 |
|
|
QT_PBL(J,K,myThid)=QT_PBL(J,K,myThid)+ QT_VDI(J,K) |
250 |
adcroft |
1.2 |
ENDDO |
251 |
|
|
ENDDO |
252 |
|
|
C |
253 |
|
|
|
254 |
|
|
CdbgC-- |
255 |
|
|
RETURN |
256 |
|
|
END |