/[MITgcm]/MITgcm/pkg/aim/phy_driver.F
ViewVC logotype

Contents of /MITgcm/pkg/aim/phy_driver.F

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


Revision 1.3 - (show annotations) (download)
Tue May 29 19:28:53 2001 UTC (23 years, 1 month ago) by cnh
Branch: MAIN
CVS Tags: icebear2, checkpoint40pre1, checkpoint44h_pre, release1_p12, release1_p10, release1_p11, release1_p16, release1_p15, ecco_c44_e17, ecco_c44_e16, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, icebear5, icebear4, checkpoint44f_pre, icebear3, checkpoint46f_post, release1_p13_pre, checkpoint46d_pre, checkpoint46e_post, release1-branch_tutorials, release1_p14, checkpoint44g_post, checkpoint46h_pre, checkpoint44h_post, release1_p12_pre, checkpoint44e_post, checkpoint46e_pre, ecco-branch-mod4, checkpoint43a-release1mods, checkpoint45d_post, checkpoint45b_post, checkpoint46b_pre, chkpt44a_pre, release1-branch-end, release1_final_v1, ecco_c44_e19, checkpoint46, ecco_c44_e20, checkpoint44, release1_p13, ecco_c44_e18, checkpoint44f_post, checkpoint40pre2, checkpoint40pre5, checkpoint40pre6, checkpoint40pre8, release1_p17, release1_b1, checkpoint44b_post, chkpt44c_post, chkpt44d_post, checkpoint42, release1_p9, release1_p8, checkpoint43, checkpoint46g_pre, release1_p2, release1_p3, release1_p4, release1_p6, checkpoint46a_post, chkpt44a_post, checkpoint44b_pre, release1_p1, checkpoint40pre4, checkpoint46a_pre, ecco-branch-mod1, checkpoint40pre3, checkpoint45c_post, release1_p5, checkpoint44e_pre, chkpt44c_pre, checkpoint40pre9, release1_p7, ecco_ice2, ecco_ice1, checkpoint46b_post, checkpoint46d_post, ecco-branch-mod2, checkpoint46g_post, checkpoint45a_post, checkpoint46c_pre, ecco-branch-mod3, ecco-branch-mod5, ecco_c44_e22, release1_beta1, ecco_c44_e23, release1-branch_branchpoint, checkpoint40pre7, checkpoint46c_post, checkpoint40, checkpoint45, checkpoint46h_post, release1_chkpt44d_post, ecco_c44_e25, checkpoint41
Branch point for: c24_e25_ice, ecco-branch, release1_coupled, icebear, release1_final, release1-branch, release1, release1_50yr
Changes since 1.2: +87 -55 lines
Updates for multi-threaded AIM with support for both latlon
and CS.
Needs compatible changes to verfication/

1 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
4 SUBROUTINE PDRIVER (TYEAR, myThid)
5 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 #include "EEPARAMS.h"
22
23 C Resolution parameters
24 C
25 #include "atparam.h"
26 #include "atparam1.h"
27 C
28 INTEGER NLON, NLAT, NLEV, NGP
29 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 INTEGER myThid
48
49 INTEGER IDEPTH(NGP)
50 REAL RPS(NGP), ALB1(NGP), FSOL1(NGP), OZONE1(NGP)
51
52 REAL TAURAD(NGP,NLEV), ST4ARAD(NGP,NLEV,2)
53 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 INTEGER J, K
61
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 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 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 ALB1(J)=ALB0(J,myThid)
85 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 SE(J,K,myThid)=CP*TG1(J,K,myThid)+PHIG1(J,K,myThid)
95 ENDDO
96 ENDDO
97 C
98 C 2.2 Relative humidity and saturation spec. humidity
99 C
100 DO K=1,NLEV
101 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 ENDDO
106 C
107 DO K=1,NLEV
108 DO J=1,NGP
109 phymask(J,K)=0.
110 IF (Tg1(J,K,myThid).ne.0.) THEN
111 phymask(J,K)=1.
112 ENDIF
113 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 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 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 C
132 DO K=2,NLEV
133 DO J=1,NGP
134 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 ENDDO
137 ENDDO
138
139 C 3.2 Large-scale condensation
140
141 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
146 C
147 C-- 4. Radiation (shortwave and longwave)
148
149 C 4.1 Compute climatological forcing
150
151 CALL SOL_OZ (SOLC,TYEAR,FSOL1,OZONE1,
152 I myThid)
153
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 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
163 C 4.3 Compute longwave fluxes
164
165 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
171 DO K=1,NLEV
172 DO J=1,NGP
173 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 ENDDO
176 ENDDO
177
178 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 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
200 C
201 C remove when vdifsc is implemented
202 DO K=1,NLEV
203 DO J=1,NGP
204 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 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 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 ENDIF
222 ENDDO
223 C
224 Cdbgch
225 DO J=1,NGP
226 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 ENDDO
233 ENDIF
234 ENDDO
235 C
236 C 5.2 Vertical diffusion and shallow convection (not yet implemented)
237 C
238 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 C
244 DO K=1,NLEV
245 DO J=1,NGP
246 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 ENDDO
251 ENDDO
252 C
253
254 CdbgC--
255 RETURN
256 END

  ViewVC Help
Powered by ViewVC 1.1.22