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

Annotation of /trunk/phylmd/ini_histins.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 301 - (hide annotations)
Thu Aug 2 17:23:07 2018 UTC (5 years, 10 months ago) by guez
File size: 14049 byte(s)
Move the call to conf_interface up to physiq, so there is no need to
test first call inside pbl_surface for this.

run_off_lic in fonte_neige was computed but not used. Pass it up to
pbl_surface so we can output it (following LMDZ).

Simplify the logic in interfsur_lim so we do not need debut.

Remove the tests on the order of surface types in interfsurf_hq. Just
add comments in indicesol.

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

  ViewVC Help
Powered by ViewVC 1.1.21