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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 186 - (hide annotations)
Mon Mar 21 15:36:26 2016 UTC (8 years, 2 months ago) by guez
File size: 12711 byte(s)
Removed variables nlm and nlp of module cv30_param_m. We do not
believe much in the benefit of these intermediary variables so we go
for clarity.

Removed variable noff of module cv30_param_m. Never used anywhere
else. Just set the value of nl explicitly in cv30_param.

Removed argument nd of cv30_param. Only called with nd = klev.

Replaced calls to zilch by array assignments. There was a strange
double call to zilch with the same arguments in cv30_mixing.

Removed procedure cv_flag. Just set the value of variable cvflag_grav
of module cvflag at declaration.

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

  ViewVC Help
Powered by ViewVC 1.1.21