/[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 178 - (hide annotations)
Fri Mar 11 18:47:26 2016 UTC (8 years, 2 months ago) by guez
File size: 12506 byte(s)
Moved variables date0, deltat, datasz_max, ncvar_ids, point, buff_pos,
buffer, regular from module histcom_var to modules where they are
defined.

Removed procedure ioipslmpp, useless for a sequential program.

Added argument datasz_max to histwrite_real (to avoid circular
dependency with histwrite).

Removed useless variables and computations everywhere.

Changed real litteral constants from default kind to double precision
in lwb, lwu, lwvn, sw1s, swtt, swtt1, swu.

Removed unused arguments: paer of sw, sw1s, sw2s, swclr; pcldsw of
sw1s, sw2s; pdsig, prayl of swr; co2_ppm of clmain, clqh; tsol of
transp_lay; nsrf of screenp; kcrit and kknu of gwstress; pstd of
orosetup.

Added output of relative humidity.

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

  ViewVC Help
Powered by ViewVC 1.1.21