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

Annotation of /trunk/phylmd/ini_histins.f90

Parent Directory Parent Directory | Revision Log Revision Log


Revision 308 - (hide annotations)
Tue Sep 18 15:14:40 2018 UTC (5 years, 9 months ago) by guez
Original Path: trunk/phylmd/ini_histins.f
File size: 14095 byte(s)
In procedure calcul_fluxs, rename coef1lay to cdragh (following
LMDZ). Use named constant min_wind_speed (following LMDZ).

Change name of NetCDF variable soll to CF standard rls.

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 306 ! Once:
52 guez 227 CALL histdef(nid_ins, "phis", "surface geopotential", "m2 s-2", &
53 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
54 guez 34 "once", zsto, zout)
55     CALL histdef(nid_ins, "aire", "Grid area", "-", &
56 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
57 guez 34 "once", zsto, zout)
58    
59     ! Champs 2D:
60    
61     CALL histdef(nid_ins, "tsol", "Surface Temperature", "K", &
62 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
63 guez 34 "inst(X)", zsto, zout)
64     CALL histdef(nid_ins, "t2m", "Temperature 2m", "K", &
65 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
66 guez 34 "inst(X)", zsto, zout)
67     CALL histdef(nid_ins, "q2m", "Specific humidity 2m", "Kg/Kg", &
68 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
69 guez 34 "inst(X)", zsto, zout)
70     CALL histdef(nid_ins, "u10m", "Vent zonal 10m", "m/s", &
71 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
72 guez 34 "inst(X)", zsto, zout)
73     CALL histdef(nid_ins, "v10m", "Vent meridien 10m", "m/s", &
74 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
75 guez 34 "inst(X)", zsto, zout)
76     CALL histdef(nid_ins, "psol", "Surface Pressure", "Pa", &
77 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
78 guez 34 "inst(X)", zsto, zout)
79     CALL histdef(nid_ins, "plul", "Large-scale Precip.", "mm/day", &
80 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
81 guez 34 "inst(X)", zsto, zout)
82     CALL histdef(nid_ins, "pluc", "Convective Precip.", "mm/day", &
83 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
84 guez 34 "inst(X)", zsto, zout)
85     CALL histdef(nid_ins, "cdrm", "Momentum drag coef.", "-", &
86 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
87 guez 34 "inst(X)", zsto, zout)
88     CALL histdef(nid_ins, "cdrh", "Heat drag coef.", "-", &
89 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
90 guez 34 "inst(X)", zsto, zout)
91     CALL histdef(nid_ins, "precip", "Precipitation Totale liq+sol", &
92     "kg/(s*m2)", &
93 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
94 guez 34 "inst(X)", zsto, zout)
95     CALL histdef(nid_ins, "snow", "Snow fall", "kg/(s*m2)", &
96 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
97 guez 34 "inst(X)", zsto, zout)
98     CALL histdef(nid_ins, "topl", "OLR", "W/m2", &
99 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
100 guez 34 "inst(X)", zsto, zout)
101     CALL histdef(nid_ins, "evap", "Evaporation", "kg/(s*m2)", &
102 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
103 guez 34 "inst(X)", zsto, zout)
104     CALL histdef(nid_ins, "sols", "Solar rad. at surf.", "W/m2", &
105 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
106 guez 34 "inst(X)", zsto, zout)
107 guez 308 CALL histdef(nid_ins, "rls", "surface net downward longwave flux", &
108     "W/m2", iim, jjm + 1, nhori, 1, 1, 1, -99, "inst(X)", zsto, zout)
109 guez 34 CALL histdef(nid_ins, "solldown", "Down. IR rad. at surface", &
110 guez 306 "W/m2", iim, jjm + 1, nhori, 1, 1, 1, -99, &
111 guez 34 "inst(X)", zsto, zout)
112     CALL histdef(nid_ins, "bils", "Surf. total heat flux", "W/m2", &
113 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
114 guez 34 "inst(X)", zsto, zout)
115     CALL histdef(nid_ins, "sens", "Sensible heat flux", "W/m2", &
116 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
117 guez 34 "inst(X)", zsto, zout)
118     CALL histdef(nid_ins, "fder", "Heat flux derivation", "W/m2", &
119 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
120 guez 34 "inst(X)", zsto, zout)
121     CALL histdef(nid_ins, "dtsvdfo", "Boundary-layer dTs(o)", "K/s", &
122 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
123 guez 34 "inst(X)", zsto, zout)
124     CALL histdef(nid_ins, "dtsvdft", "Boundary-layer dTs(t)", "K/s", &
125 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
126 guez 34 "inst(X)", zsto, zout)
127     CALL histdef(nid_ins, "dtsvdfg", "Boundary-layer dTs(g)", "K/s", &
128 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
129 guez 34 "inst(X)", zsto, zout)
130     CALL histdef(nid_ins, "dtsvdfi", "Boundary-layer dTs(g)", "K/s", &
131 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
132 guez 34 "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 306 CALL histdef(nid_ins, "flat", "latent heat flux", "W m-2", iim, &
141     jjm + 1, nhori, 1, 1, 1, -99, "inst(X)", zsto, zout)
142 guez 34
143     DO nsrf = 1, nbsrf
144     call histdef(nid_ins, "pourc_"//clnsurf(nsrf), &
145     "% "//clnsurf(nsrf), "%", &
146 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
147 guez 34 "inst(X)", zsto, zout)
148     call histdef(nid_ins, "fract_"//clnsurf(nsrf), &
149     "Fraction "//clnsurf(nsrf), "1", &
150 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
151 guez 34 "inst(X)", zsto, zout)
152     call histdef(nid_ins, "sens_"//clnsurf(nsrf), &
153     "Sensible heat flux "//clnsurf(nsrf), "W/m2", &
154 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
155 guez 34 "inst(X)", zsto, zout)
156     call histdef(nid_ins, "tsol_"//clnsurf(nsrf), &
157     "Surface Temperature"//clnsurf(nsrf), "W/m2", &
158 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
159 guez 34 "inst(X)", zsto, zout)
160     call histdef(nid_ins, "lat_"//clnsurf(nsrf), &
161     "Latent heat flux "//clnsurf(nsrf), "W/m2", &
162 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
163 guez 34 "inst(X)", zsto, zout)
164     call histdef(nid_ins, "taux_"//clnsurf(nsrf), &
165     "Zonal wind stress"//clnsurf(nsrf), "Pa", &
166 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
167 guez 34 "inst(X)", zsto, zout)
168     call histdef(nid_ins, "tauy_"//clnsurf(nsrf), &
169     "Meridional xind stress "//clnsurf(nsrf), "Pa", &
170 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
171 guez 34 "inst(X)", zsto, zout)
172     call histdef(nid_ins, "albe_"//clnsurf(nsrf), &
173     "Albedo "//clnsurf(nsrf), "-", &
174 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
175 guez 34 "inst(X)", zsto, zout)
176     call histdef(nid_ins, "rugs_"//clnsurf(nsrf), &
177     "rugosite "//clnsurf(nsrf), "-", &
178 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
179 guez 34 "inst(X)", zsto, zout)
180 guez 225 call histdef(nid_ins, "u10m_"//clnsurf(nsrf), &
181     "zonal wind 10 m "//clnsurf(nsrf), "m s-1", &
182 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
183 guez 225 "inst(X)", zsto, zout)
184     call histdef(nid_ins, "v10m_"//clnsurf(nsrf), &
185     "meridional wind 10 m "//clnsurf(nsrf), "m s-1", &
186 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
187 guez 225 "inst(X)", zsto, zout)
188 guez 34 END DO
189 guez 206
190 guez 34 CALL histdef(nid_ins, "rugs", "rugosity", "-", &
191 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
192 guez 34 "inst(X)", zsto, zout)
193     CALL histdef(nid_ins, "albs", "Surface albedo", "-", &
194 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
195 guez 34 "inst(X)", zsto, zout)
196     CALL histdef(nid_ins, "s_pblh", "Boundary Layer Height", "m", &
197 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
198 guez 34 "inst(X)", zsto, zout)
199     CALL histdef(nid_ins, "s_pblt", "T at Boundary Layer Height", &
200     "K", &
201 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
202 guez 34 "inst(X)", zsto, zout)
203     CALL histdef(nid_ins, "s_lcl", "Condensation level", "m", &
204 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
205 guez 34 "inst(X)", zsto, zout)
206 guez 259 CALL histdef(nid_ins, "s_capCL", &
207     "Convective available potential energy for atmospheric boundary " &
208 guez 306 // "layer", "J/m2", iim, jjm + 1, nhori, 1, 1, 1, -99, &
209 guez 34 "inst(X)", zsto, zout)
210     CALL histdef(nid_ins, "s_oliqCL", "Liq Water in BL", "kg/m2", &
211 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
212 guez 34 "inst(X)", zsto, zout)
213     CALL histdef(nid_ins, "s_cteiCL", "Instability criteria (ABL)", "K", &
214 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
215 guez 34 "inst(X)", zsto, zout)
216     CALL histdef(nid_ins, "s_therm", "Exces du thermique", "K", &
217 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
218 guez 34 "inst(X)", zsto, zout)
219 guez 221 CALL histdef(nid_ins, "qsurf", "Surface Air humidity", "", &
220 guez 306 iim, jjm + 1, nhori, 1, 1, 1, -99, &
221 guez 221 "inst(X)", zsto, zout)
222 guez 34
223 guez 206 if (conv_emanuel) then
224     CALL histdef(nid_ins, "ptop", "cloud top pressure", &
225     "Pa", iim, jjm + 1, nhori, 1, 1, 1, -99, "inst(X)", zsto, zout)
226     CALL histdef(nid_ins, "dnwd0", "unsaturated downdraft", &
227     "kg/m2/s", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
228     zsto, zout)
229     end if
230 guez 34
231     ! Champs 3D:
232    
233 guez 212 CALL histdef(nid_ins, "tro3", "ozone mole fraction", "-", &
234     iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", zsto, zout)
235 guez 34 CALL histdef(nid_ins, "temp", "Temperature", "K", &
236 guez 306 iim, jjm + 1, nhori, llm, 1, llm, nvert, &
237 guez 34 "inst(X)", zsto, zout)
238     CALL histdef(nid_ins, "vitu", "Zonal wind", "m/s", &
239 guez 306 iim, jjm + 1, nhori, llm, 1, llm, nvert, &
240 guez 34 "inst(X)", zsto, zout)
241     CALL histdef(nid_ins, "vitv", "Merid wind", "m/s", &
242 guez 306 iim, jjm + 1, nhori, llm, 1, llm, nvert, &
243 guez 34 "inst(X)", zsto, zout)
244     CALL histdef(nid_ins, "geop", "Geopotential height", "m", &
245 guez 306 iim, jjm + 1, nhori, llm, 1, llm, nvert, &
246 guez 34 "inst(X)", zsto, zout)
247     CALL histdef(nid_ins, "pres", "Air pressure", "Pa", &
248 guez 306 iim, jjm + 1, nhori, llm, 1, llm, nvert, &
249 guez 34 "inst(X)", zsto, zout)
250     CALL histdef(nid_ins, "dtvdf", "Boundary-layer dT", "K/s", &
251 guez 306 iim, jjm + 1, nhori, llm, 1, llm, nvert, &
252 guez 34 "inst(X)", zsto, zout)
253     CALL histdef(nid_ins, "dqvdf", "Boundary-layer dQ", "Kg/Kg/s", &
254 guez 306 iim, jjm + 1, nhori, llm, 1, llm, nvert, &
255 guez 34 "inst(X)", zsto, zout)
256 guez 159 CALL histdef(nid_ins, "zmasse", "column density of air in cell", &
257     "kg m-2", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
258     zsto, zout)
259 guez 178 CALL histdef(nid_ins, "rhum", "Relative humidity", &
260     "", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
261     zsto, zout)
262 guez 213 CALL histdef(nid_ins, "d_t_ec", "kinetic dissipation dT", &
263     "K/s", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
264     zsto, zout)
265     CALL histdef(nid_ins, "dtsw0", "CS SW radiation dT", &
266     "K/s", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
267     zsto, zout)
268     CALL histdef(nid_ins, "dtlw0", "CS LW radiation dT", &
269     "K/s", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
270     zsto, zout)
271 guez 221
272 guez 217 if (ok_newmicro) then
273     CALL histdef(nid_ins, "re", "cloud droplet effective radius", &
274     "micrometer", iim, jjm + 1, nhori, llm, 1, llm, nvert, &
275     "inst(X)", zsto, zout)
276     CALL histdef(nid_ins, "fl", &
277     "denominator of Cloud droplet effective radius", "", iim, &
278     jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", zsto, zout)
279     end if
280 guez 178
281 guez 159 DO it = 1, nqmx - 2
282     ! champ 2D
283     iq=it+2
284     CALL histdef(nid_ins, tname(iq), ttext(iq), "U/kga", iim, jjm+1, &
285     nhori, llm, 1, llm, nvert, "inst(X)", zsto, zout)
286     CALL histdef(nid_ins, "fl"//tname(iq), "Flux "//ttext(iq), &
287     "U/m2/s", iim, jjm+1, nhori, llm, 1, llm, nvert, &
288     "inst(X)", zsto, zout)
289     CALL histdef(nid_ins, "d_tr_th_"//tname(iq), &
290     "tendance thermique"// ttext(iq), "?", &
291     iim, jjm+1, nhori, llm, 1, llm, nvert, &
292     "inst(X)", zsto, zout)
293     CALL histdef(nid_ins, "d_tr_cv_"//tname(iq), &
294     "tendance convection"// ttext(iq), "?", &
295     iim, jjm+1, nhori, llm, 1, llm, nvert, &
296     "inst(X)", zsto, zout)
297     CALL histdef(nid_ins, "d_tr_cl_"//tname(iq), &
298     "tendance couche limite"// ttext(iq), "?", &
299     iim, jjm+1, nhori, llm, 1, llm, nvert, &
300     "inst(X)", zsto, zout)
301     ENDDO
302    
303 guez 34 CALL histend(nid_ins)
304 guez 215 ENDIF test_ok_instan
305 guez 34
306     end subroutine ini_histins
307    
308     end module ini_histins_m

  ViewVC Help
Powered by ViewVC 1.1.21