/[lmdze]/trunk/Sources/phylmd/ini_histins.f
ViewVC logotype

Contents of /trunk/Sources/phylmd/ini_histins.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 202 - (show annotations)
Wed Jun 8 12:23:41 2016 UTC (7 years, 11 months ago) by guez
File size: 12342 byte(s)
Promoted lmt_pas from local variable of physiq to variable of module
conf_gcm_m.

Removed variable run_off of module interface_surf. Was not
used. Called run_off_ter in LMDZ, but not used nor printed there
either.

Simplified logic in interfoce_lim. The way it was convoluted with
interfsurf_hq and clmain was quite a mess. Extracted reading of SST
into a separate procedure: read_sst. We do not need SST and pctsrf_new
at the same time: SST is not needed for sea-ice surface. I did not
like this programming: going through the procedure repeatedly for
different purposes and testing inside whether there was something to
do or it was already done. Reading is now only controlled by itap and
lmt_pas, instead of debut, jour, jour_lu and deja_lu. Now we do not
copy from pct_tmp to pctsrf_new every time step.

Simplified processing of pctsrf in clmain and below. It was quite
troubling: pctsrf_new was intent out in interfoce_lim but only defined
for ocean and sea-ice. Also the idea of having arrays for all
surfaces, pcsrf and pctsrf_new, in interfsurf_hq, which is called for
a particular surface, was troubling. pctsrf_new for all surfaces was
intent out in intefsurf_hq, but not defined for all surfaces at each
call. Removed argument pctsrf_new of clmain: was a duplicate of pctsrf
on output, and not used in physiq. Replaced pctsrf_new in clmain by
pctsrf_new_oce and pctsrf_new_sic, which were the only ones modified.

1 module ini_histins_m
2
3 implicit none
4
5 integer, save:: nid_ins
6
7 contains
8
9 subroutine ini_histins(dtime)
10
11 ! From phylmd/ini_histins.h, v 1.2 2005/05/25 13:10:09
12
13 use clesphys, only: ecrit_ins, ok_instan
14 use clesphys2, only: conv_emanuel
15 use dimens_m, only: iim, jjm, llm, nqmx
16 use dimphy, only: klon
17 use disvert_m, only: presnivs
18 use dynetat0_m, only: day_ref, annee_ref, rlatu, rlonv
19 USE histbeg_totreg_m, ONLY : histbeg_totreg
20 USE histdef_m, ONLY : histdef
21 USE histend_m, ONLY : histend
22 USE histvert_m, ONLY : histvert
23 use indicesol, only: nbsrf, clnsurf
24 use iniadvtrac_m, only: tname, ttext
25 use nr_util, only: pi
26 use phyetat0_m, only: itau_phy
27 USE ymds2ju_m, only: ymds2ju
28
29 REAL, intent(in):: dtime ! pas temporel de la physique (s)
30
31 ! Local:
32 real zjulian, zsto, zout
33 integer nhori, nvert, nsrf, iq, it
34
35 !-------------------------------------------------------------------
36
37 IF (ok_instan) THEN
38 zsto = dtime * ecrit_ins
39 zout = dtime * ecrit_ins
40 CALL ymds2ju(annee_ref, 1, day_ref, 0.0, zjulian)
41 CALL histbeg_totreg("histins", rlonv(:iim) / pi * 180., &
42 rlatu / pi * 180., 1, iim, &
43 1, jjm + 1, itau_phy, zjulian, dtime, nhori, nid_ins)
44 write(*, *)'Inst ', itau_phy, zjulian
45 CALL histvert(nid_ins, "presnivs", "Vertical levels", "mb", &
46 presnivs/100., nvert)
47 CALL histdef(nid_ins, "phis", "Surface geop. height", "-", &
48 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
49 "once", zsto, zout)
50 CALL histdef(nid_ins, "aire", "Grid area", "-", &
51 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
52 "once", zsto, zout)
53
54 ! Champs 2D:
55
56 CALL histdef(nid_ins, "tsol", "Surface Temperature", "K", &
57 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
58 "inst(X)", zsto, zout)
59
60 CALL histdef(nid_ins, "t2m", "Temperature 2m", "K", &
61 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
62 "inst(X)", zsto, zout)
63
64 CALL histdef(nid_ins, "q2m", "Specific humidity 2m", "Kg/Kg", &
65 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
66 "inst(X)", zsto, zout)
67
68 CALL histdef(nid_ins, "u10m", "Vent zonal 10m", "m/s", &
69 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
70 "inst(X)", zsto, zout)
71
72 CALL histdef(nid_ins, "v10m", "Vent meridien 10m", "m/s", &
73 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
74 "inst(X)", zsto, zout)
75
76 CALL histdef(nid_ins, "psol", "Surface Pressure", "Pa", &
77 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
78 "inst(X)", zsto, zout)
79
80 CALL histdef(nid_ins, "plul", "Large-scale Precip.", "mm/day", &
81 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
82 "inst(X)", zsto, zout)
83
84 CALL histdef(nid_ins, "pluc", "Convective Precip.", "mm/day", &
85 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
86 "inst(X)", zsto, zout)
87
88 CALL histdef(nid_ins, "cdrm", "Momentum drag coef.", "-", &
89 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
90 "inst(X)", zsto, zout)
91
92 CALL histdef(nid_ins, "cdrh", "Heat drag coef.", "-", &
93 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
94 "inst(X)", zsto, zout)
95
96 CALL histdef(nid_ins, "precip", "Precipitation Totale liq+sol", &
97 "kg/(s*m2)", &
98 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
99 "inst(X)", zsto, zout)
100
101 CALL histdef(nid_ins, "snow", "Snow fall", "kg/(s*m2)", &
102 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
103 "inst(X)", zsto, zout)
104
105 ! CALL histdef(nid_ins, "snow_mass", "Snow Mass", "kg/m2",
106 ! . iim, (jjm + 1), nhori, 1, 1, 1, -99,
107 ! . "inst(X)", zsto, zout)
108
109 CALL histdef(nid_ins, "topl", "OLR", "W/m2", &
110 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
111 "inst(X)", zsto, zout)
112
113 CALL histdef(nid_ins, "evap", "Evaporation", "kg/(s*m2)", &
114 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
115 "inst(X)", zsto, zout)
116
117 CALL histdef(nid_ins, "sols", "Solar rad. at surf.", "W/m2", &
118 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
119 "inst(X)", zsto, zout)
120
121 CALL histdef(nid_ins, "soll", "IR rad. at surface", "W/m2", &
122 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
123 "inst(X)", zsto, zout)
124
125 CALL histdef(nid_ins, "solldown", "Down. IR rad. at surface", &
126 "W/m2", iim, (jjm + 1), nhori, 1, 1, 1, -99, &
127 "inst(X)", zsto, zout)
128
129 CALL histdef(nid_ins, "bils", "Surf. total heat flux", "W/m2", &
130 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
131 "inst(X)", zsto, zout)
132
133 CALL histdef(nid_ins, "sens", "Sensible heat flux", "W/m2", &
134 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
135 "inst(X)", zsto, zout)
136
137 CALL histdef(nid_ins, "fder", "Heat flux derivation", "W/m2", &
138 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
139 "inst(X)", zsto, zout)
140
141 CALL histdef(nid_ins, "dtsvdfo", "Boundary-layer dTs(o)", "K/s", &
142 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
143 "inst(X)", zsto, zout)
144
145 CALL histdef(nid_ins, "dtsvdft", "Boundary-layer dTs(t)", "K/s", &
146 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
147 "inst(X)", zsto, zout)
148
149 CALL histdef(nid_ins, "dtsvdfg", "Boundary-layer dTs(g)", "K/s", &
150 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
151 "inst(X)", zsto, zout)
152
153 CALL histdef(nid_ins, "dtsvdfi", "Boundary-layer dTs(g)", "K/s", &
154 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
155 "inst(X)", zsto, zout)
156
157 DO nsrf = 1, nbsrf
158 call histdef(nid_ins, "pourc_"//clnsurf(nsrf), &
159 "% "//clnsurf(nsrf), "%", &
160 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
161 "inst(X)", zsto, zout)
162
163 call histdef(nid_ins, "fract_"//clnsurf(nsrf), &
164 "Fraction "//clnsurf(nsrf), "1", &
165 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
166 "inst(X)", zsto, zout)
167
168 call histdef(nid_ins, "sens_"//clnsurf(nsrf), &
169 "Sensible heat flux "//clnsurf(nsrf), "W/m2", &
170 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
171 "inst(X)", zsto, zout)
172
173 call histdef(nid_ins, "tsol_"//clnsurf(nsrf), &
174 "Surface Temperature"//clnsurf(nsrf), "W/m2", &
175 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
176 "inst(X)", zsto, zout)
177
178 call histdef(nid_ins, "lat_"//clnsurf(nsrf), &
179 "Latent heat flux "//clnsurf(nsrf), "W/m2", &
180 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
181 "inst(X)", zsto, zout)
182
183 call histdef(nid_ins, "taux_"//clnsurf(nsrf), &
184 "Zonal wind stress"//clnsurf(nsrf), "Pa", &
185 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
186 "inst(X)", zsto, zout)
187
188 call histdef(nid_ins, "tauy_"//clnsurf(nsrf), &
189 "Meridional xind stress "//clnsurf(nsrf), "Pa", &
190 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
191 "inst(X)", zsto, zout)
192
193 call histdef(nid_ins, "albe_"//clnsurf(nsrf), &
194 "Albedo "//clnsurf(nsrf), "-", &
195 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
196 "inst(X)", zsto, zout)
197
198 call histdef(nid_ins, "rugs_"//clnsurf(nsrf), &
199 "rugosite "//clnsurf(nsrf), "-", &
200 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
201 "inst(X)", zsto, zout)
202 !XXX
203 END DO
204 CALL histdef(nid_ins, "rugs", "rugosity", "-", &
205 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
206 "inst(X)", zsto, zout)
207
208 CALL histdef(nid_ins, "albs", "Surface albedo", "-", &
209 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
210 "inst(X)", zsto, zout)
211
212 CALL histdef(nid_ins, "s_pblh", "Boundary Layer Height", "m", &
213 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
214 "inst(X)", zsto, zout)
215
216 CALL histdef(nid_ins, "s_pblt", "T at Boundary Layer Height", &
217 "K", &
218 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
219 "inst(X)", zsto, zout)
220
221 CALL histdef(nid_ins, "s_lcl", "Condensation level", "m", &
222 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
223 "inst(X)", zsto, zout)
224
225 CALL histdef(nid_ins, "s_capCL", "Conv avlbl pot ener for ABL", "J/m2", &
226 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
227 "inst(X)", zsto, zout)
228
229 CALL histdef(nid_ins, "s_oliqCL", "Liq Water in BL", "kg/m2", &
230 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
231 "inst(X)", zsto, zout)
232
233 CALL histdef(nid_ins, "s_cteiCL", "Instability criteria (ABL)", "K", &
234 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
235 "inst(X)", zsto, zout)
236
237 CALL histdef(nid_ins, "s_therm", "Exces du thermique", "K", &
238 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
239 "inst(X)", zsto, zout)
240
241 CALL histdef(nid_ins, "s_trmb1", "deep_cape(HBTM2)", "J/m2", &
242 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
243 "inst(X)", zsto, zout)
244
245 CALL histdef(nid_ins, "s_trmb2", "inhibition (HBTM2)", "J/m2", &
246 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
247 "inst(X)", zsto, zout)
248
249 CALL histdef(nid_ins, "s_trmb3", "Point Omega (HBTM2)", "m", &
250 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
251 "inst(X)", zsto, zout)
252
253 if (conv_emanuel) CALL histdef(nid_ins, "ptop", "cloud top pressure", &
254 "Pa", iim, jjm + 1, nhori, 1, 1, 1, -99, "inst(X)", zsto, zout)
255
256 ! Champs 3D:
257
258 CALL histdef(nid_ins, "temp", "Temperature", "K", &
259 iim, (jjm + 1), nhori, llm, 1, llm, nvert, &
260 "inst(X)", zsto, zout)
261
262 CALL histdef(nid_ins, "vitu", "Zonal wind", "m/s", &
263 iim, (jjm + 1), nhori, llm, 1, llm, nvert, &
264 "inst(X)", zsto, zout)
265
266 CALL histdef(nid_ins, "vitv", "Merid wind", "m/s", &
267 iim, (jjm + 1), nhori, llm, 1, llm, nvert, &
268 "inst(X)", zsto, zout)
269
270 CALL histdef(nid_ins, "geop", "Geopotential height", "m", &
271 iim, (jjm + 1), nhori, llm, 1, llm, nvert, &
272 "inst(X)", zsto, zout)
273
274 CALL histdef(nid_ins, "pres", "Air pressure", "Pa", &
275 iim, (jjm + 1), nhori, llm, 1, llm, nvert, &
276 "inst(X)", zsto, zout)
277
278 CALL histdef(nid_ins, "dtvdf", "Boundary-layer dT", "K/s", &
279 iim, (jjm + 1), nhori, llm, 1, llm, nvert, &
280 "inst(X)", zsto, zout)
281
282 CALL histdef(nid_ins, "dqvdf", "Boundary-layer dQ", "Kg/Kg/s", &
283 iim, (jjm + 1), nhori, llm, 1, llm, nvert, &
284 "inst(X)", zsto, zout)
285
286 CALL histdef(nid_ins, "zmasse", "column density of air in cell", &
287 "kg m-2", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
288 zsto, zout)
289
290 CALL histdef(nid_ins, "rhum", "Relative humidity", &
291 "", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
292 zsto, zout)
293
294 DO it = 1, nqmx - 2
295 ! champ 2D
296 iq=it+2
297 CALL histdef(nid_ins, tname(iq), ttext(iq), "U/kga", iim, jjm+1, &
298 nhori, llm, 1, llm, nvert, "inst(X)", zsto, zout)
299 CALL histdef(nid_ins, "fl"//tname(iq), "Flux "//ttext(iq), &
300 "U/m2/s", iim, jjm+1, nhori, llm, 1, llm, nvert, &
301 "inst(X)", zsto, zout)
302
303 !---Ajout Olivia
304 CALL histdef(nid_ins, "d_tr_th_"//tname(iq), &
305 "tendance thermique"// ttext(iq), "?", &
306 iim, jjm+1, nhori, llm, 1, llm, nvert, &
307 "inst(X)", zsto, zout)
308 CALL histdef(nid_ins, "d_tr_cv_"//tname(iq), &
309 "tendance convection"// ttext(iq), "?", &
310 iim, jjm+1, nhori, llm, 1, llm, nvert, &
311 "inst(X)", zsto, zout)
312 CALL histdef(nid_ins, "d_tr_cl_"//tname(iq), &
313 "tendance couche limite"// ttext(iq), "?", &
314 iim, jjm+1, nhori, llm, 1, llm, nvert, &
315 "inst(X)", zsto, zout)
316 !---fin Olivia
317
318 ENDDO
319
320 CALL histend(nid_ins)
321 ENDIF
322
323 end subroutine ini_histins
324
325 end module ini_histins_m

  ViewVC Help
Powered by ViewVC 1.1.21