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

Annotation of /trunk/phylmd/ini_histins.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 313 - (hide annotations)
Mon Dec 10 15:54:30 2018 UTC (5 years, 5 months ago) by guez
File size: 13932 byte(s)
Remove module temps. Move variable itau_dyn from module temps to
module dynetat0_m, where it is defined.

Split module dynetat0_m into dynetat0_m and dynetat0_chosen_m. The
motivation is to create smaller modules. Procedures principal_cshift
and invert_zoomx had to stay in dynetat0_m because of circular
dependency. Now we will be able to move them away. Module variables
which are chosen by the user, not computed, in program ce0l go to
dynetat0_chosen_m: day_ref, annee_ref, clon, clat, grossismx,
grossismy, dzoomx, dzoomy, taux, tauy.

Move variable "pa" from module disvert_m to module
dynetat0_chosen_m. Define "pa" in dynetat0_chosen rather than etat0.

Define day_ref and annee_ref in procedure read_serre rather than
etat0.

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

  ViewVC Help
Powered by ViewVC 1.1.21