1 | c |
---|
2 | c $Header$ |
---|
3 | c |
---|
4 | SUBROUTINE physiq (nlon,nlev,nqmax , |
---|
5 | . debut,lafin,rjourvrai,rjour_ecri,gmtime,pdtphys, |
---|
6 | . paprs,pplay,pphi,pphis,paire,presnivs,clesphy0, |
---|
7 | . u,v,t,qx, |
---|
8 | . omega, cufi, cvfi, |
---|
9 | . d_u, d_v, d_t, d_qx, d_ps) |
---|
10 | USE ioipsl |
---|
11 | USE histcom |
---|
12 | |
---|
13 | IMPLICIT none |
---|
14 | c====================================================================== |
---|
15 | c |
---|
16 | c Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818 |
---|
17 | c |
---|
18 | c Objet: Moniteur general de la physique du modele |
---|
19 | cAA Modifications quant aux traceurs : |
---|
20 | cAA - uniformisation des parametrisations ds phytrac |
---|
21 | cAA - stockage des moyennes des champs necessaires |
---|
22 | cAA en mode traceur off-line |
---|
23 | c====================================================================== |
---|
24 | c modif ( P. Le Van , 12/10/98 ) |
---|
25 | c |
---|
26 | c Arguments: |
---|
27 | c |
---|
28 | c nlon----input-I-nombre de points horizontaux |
---|
29 | c nlev----input-I-nombre de couches verticales |
---|
30 | c nqmax---input-I-nombre de traceurs (y compris vapeur d'eau) = 1 |
---|
31 | c debut---input-L-variable logique indiquant le premier passage |
---|
32 | c lafin---input-L-variable logique indiquant le dernier passage |
---|
33 | c rjour---input-R-numero du jour de l'experience |
---|
34 | c gmtime--input-R-temps universel dans la journee (0 a 86400 s) |
---|
35 | c pdtphys-input-R-pas d'integration pour la physique (seconde) |
---|
36 | c paprs---input-R-pression pour chaque inter-couche (en Pa) |
---|
37 | c pplay---input-R-pression pour le mileu de chaque couche (en Pa) |
---|
38 | c pphi----input-R-geopotentiel de chaque couche (g z) (reference sol) |
---|
39 | c pphis---input-R-geopotentiel du sol |
---|
40 | c paire---input-R-aire de chaque maille |
---|
41 | c presnivs-input_R_pressions approximat. des milieux couches ( en PA) |
---|
42 | c u-------input-R-vitesse dans la direction X (de O a E) en m/s |
---|
43 | c v-------input-R-vitesse Y (de S a N) en m/s |
---|
44 | c t-------input-R-temperature (K) |
---|
45 | c qx------input-R-humidite specifique (kg/kg) et d'autres traceurs |
---|
46 | c d_t_dyn-input-R-tendance dynamique pour "t" (K/s) |
---|
47 | c d_q_dyn-input-R-tendance dynamique pour "q" (kg/kg/s) |
---|
48 | c omega---input-R-vitesse verticale en Pa/s |
---|
49 | c cufi----input-R-resolution des mailles en x (m) |
---|
50 | c cvfi----input-R-resolution des mailles en y (m) |
---|
51 | c |
---|
52 | c d_u-----output-R-tendance physique de "u" (m/s/s) |
---|
53 | c d_v-----output-R-tendance physique de "v" (m/s/s) |
---|
54 | c d_t-----output-R-tendance physique de "t" (K/s) |
---|
55 | c d_qx----output-R-tendance physique de "qx" (kg/kg/s) |
---|
56 | c d_ps----output-R-tendance physique de la pression au sol |
---|
57 | c====================================================================== |
---|
58 | #include "dimensions.h" |
---|
59 | integer jjmp1 |
---|
60 | parameter (jjmp1=jjm+1-1/jjm) |
---|
61 | #include "dimphy.h" |
---|
62 | #include "regdim.h" |
---|
63 | #include "indicesol.h" |
---|
64 | #include "dimsoil.h" |
---|
65 | #include "clesphys.h" |
---|
66 | #include "control.h" |
---|
67 | #include "temps.h" |
---|
68 | c====================================================================== |
---|
69 | LOGICAL check ! Verifier la conservation du modele en eau |
---|
70 | PARAMETER (check=.FALSE.) |
---|
71 | LOGICAL ok_stratus ! Ajouter artificiellement les stratus |
---|
72 | PARAMETER (ok_stratus=.FALSE.) |
---|
73 | c====================================================================== |
---|
74 | c Parametres lies au coupleur OASIS: |
---|
75 | #include "oasis.h" |
---|
76 | INTEGER,SAVE :: npas, nexca |
---|
77 | logical rnpb |
---|
78 | parameter(rnpb=.true.) |
---|
79 | c PARAMETER (npas=1440) |
---|
80 | c PARAMETER (nexca=48) |
---|
81 | EXTERNAL fromcpl, intocpl, inicma |
---|
82 | c ocean = type de modele ocean a utiliser: force, slab, couple |
---|
83 | character*6 ocean |
---|
84 | SAVE ocean |
---|
85 | |
---|
86 | c parameter (ocean = 'force ') |
---|
87 | c parameter (ocean = 'couple') |
---|
88 | logical ok_ocean |
---|
89 | c====================================================================== |
---|
90 | c Clef controlant l'activation du cycle diurne: |
---|
91 | ccc LOGICAL cycle_diurne |
---|
92 | ccc PARAMETER (cycle_diurne=.FALSE.) |
---|
93 | c====================================================================== |
---|
94 | c Modele thermique du sol, a activer pour le cycle diurne: |
---|
95 | ccc LOGICAL soil_model |
---|
96 | ccc PARAMETER (soil_model=.FALSE.) |
---|
97 | logical ok_veget |
---|
98 | save ok_veget |
---|
99 | c parameter (ok_veget = .true.) |
---|
100 | c parameter (ok_veget = .false.) |
---|
101 | c====================================================================== |
---|
102 | c Dans les versions precedentes, l'eau liquide nuageuse utilisee dans |
---|
103 | c le calcul du rayonnement est celle apres la precipitation des nuages. |
---|
104 | c Si cette cle new_oliq est activee, ce sera une valeur moyenne entre |
---|
105 | c la condensation et la precipitation. Cette cle augmente les impacts |
---|
106 | c radiatifs des nuages. |
---|
107 | ccc LOGICAL new_oliq |
---|
108 | ccc PARAMETER (new_oliq=.FALSE.) |
---|
109 | c====================================================================== |
---|
110 | c Clefs controlant deux parametrisations de l'orographie: |
---|
111 | cc LOGICAL ok_orodr |
---|
112 | ccc PARAMETER (ok_orodr=.FALSE.) |
---|
113 | ccc LOGICAL ok_orolf |
---|
114 | ccc PARAMETER (ok_orolf=.FALSE.) |
---|
115 | c====================================================================== |
---|
116 | LOGICAL ok_journe ! sortir le fichier journalier |
---|
117 | save ok_journe |
---|
118 | c PARAMETER (ok_journe=.true.) |
---|
119 | c |
---|
120 | LOGICAL ok_mensuel ! sortir le fichier mensuel |
---|
121 | save ok_mensuel |
---|
122 | c PARAMETER (ok_mensuel=.true.) |
---|
123 | c |
---|
124 | LOGICAL ok_instan ! sortir le fichier instantane |
---|
125 | save ok_instan |
---|
126 | c PARAMETER (ok_instan=.true.) |
---|
127 | c |
---|
128 | LOGICAL ok_region ! sortir le fichier regional |
---|
129 | PARAMETER (ok_region=.FALSE.) |
---|
130 | c====================================================================== |
---|
131 | c |
---|
132 | INTEGER ivap ! indice de traceurs pour vapeur d'eau |
---|
133 | PARAMETER (ivap=1) |
---|
134 | INTEGER iliq ! indice de traceurs pour eau liquide |
---|
135 | PARAMETER (iliq=2) |
---|
136 | |
---|
137 | INTEGER nvm ! nombre de vegetations |
---|
138 | PARAMETER (nvm=8) |
---|
139 | REAL veget(klon,nvm) ! couverture vegetale |
---|
140 | SAVE veget |
---|
141 | |
---|
142 | c |
---|
143 | c |
---|
144 | c Variables argument: |
---|
145 | c |
---|
146 | INTEGER nlon |
---|
147 | INTEGER nlev |
---|
148 | INTEGER nqmax |
---|
149 | REAL rjourvrai, rjour_ecri |
---|
150 | REAL gmtime |
---|
151 | REAL pdtphys |
---|
152 | LOGICAL debut, lafin |
---|
153 | REAL paprs(klon,klev+1) |
---|
154 | REAL pplay(klon,klev) |
---|
155 | REAL pphi(klon,klev) |
---|
156 | REAL pphis(klon) |
---|
157 | REAL paire(klon) |
---|
158 | REAL presnivs(klev) |
---|
159 | REAL znivsig(klev) |
---|
160 | REAL zsurf(nbsrf) |
---|
161 | real cufi(klon), cvfi(klon) |
---|
162 | |
---|
163 | REAL u(klon,klev) |
---|
164 | REAL v(klon,klev) |
---|
165 | REAL t(klon,klev) |
---|
166 | REAL qx(klon,klev,nqmax) |
---|
167 | |
---|
168 | REAL t_ancien(klon,klev), q_ancien(klon,klev) |
---|
169 | SAVE t_ancien, q_ancien |
---|
170 | LOGICAL ancien_ok |
---|
171 | SAVE ancien_ok |
---|
172 | |
---|
173 | REAL d_t_dyn(klon,klev) |
---|
174 | REAL d_q_dyn(klon,klev) |
---|
175 | |
---|
176 | REAL omega(klon,klev) |
---|
177 | |
---|
178 | REAL d_u(klon,klev) |
---|
179 | REAL d_v(klon,klev) |
---|
180 | REAL d_t(klon,klev) |
---|
181 | REAL d_qx(klon,klev,nqmax) |
---|
182 | REAL d_ps(klon) |
---|
183 | |
---|
184 | INTEGER longcles |
---|
185 | PARAMETER ( longcles = 20 ) |
---|
186 | REAL clesphy0( longcles ) |
---|
187 | c |
---|
188 | c Variables quasi-arguments |
---|
189 | c |
---|
190 | REAL xjour |
---|
191 | SAVE xjour |
---|
192 | c |
---|
193 | c |
---|
194 | c Variables propres a la physique |
---|
195 | c |
---|
196 | REAL dtime |
---|
197 | SAVE dtime ! pas temporel de la physique |
---|
198 | c |
---|
199 | INTEGER radpas |
---|
200 | SAVE radpas ! frequence d'appel rayonnement |
---|
201 | c |
---|
202 | REAL radsol(klon) |
---|
203 | SAVE radsol ! bilan radiatif au sol |
---|
204 | c |
---|
205 | REAL rlat(klon) |
---|
206 | SAVE rlat ! latitude pour chaque point |
---|
207 | c |
---|
208 | REAL rlon(klon) |
---|
209 | SAVE rlon ! longitude pour chaque point |
---|
210 | c |
---|
211 | cc INTEGER iflag_con |
---|
212 | cc SAVE iflag_con ! indicateur de la convection |
---|
213 | c |
---|
214 | INTEGER itap |
---|
215 | SAVE itap ! compteur pour la physique |
---|
216 | c |
---|
217 | REAL co2_ppm |
---|
218 | SAVE co2_ppm ! concentration du CO2 |
---|
219 | c |
---|
220 | REAL solaire |
---|
221 | SAVE solaire ! constante solaire |
---|
222 | c |
---|
223 | REAL ftsol(klon,nbsrf) |
---|
224 | SAVE ftsol ! temperature du sol |
---|
225 | c |
---|
226 | REAL ftsoil(klon,nsoilmx,nbsrf) |
---|
227 | SAVE ftsoil ! temperature dans le sol |
---|
228 | c |
---|
229 | REAL fevap(klon,nbsrf) |
---|
230 | SAVE fevap ! evaporation |
---|
231 | REAL fluxlat(klon,nbsrf) |
---|
232 | SAVE fluxlat |
---|
233 | c |
---|
234 | REAL deltat(klon) |
---|
235 | SAVE deltat ! ecart avec la SST de reference |
---|
236 | c |
---|
237 | REAL fqsol(klon,nbsrf) |
---|
238 | SAVE fqsol ! humidite du sol |
---|
239 | c |
---|
240 | REAL fsnow(klon,nbsrf) |
---|
241 | SAVE fsnow ! epaisseur neigeuse |
---|
242 | c |
---|
243 | REAL falbe(klon,nbsrf) |
---|
244 | SAVE falbe ! albedo par type de surface |
---|
245 | c |
---|
246 | c |
---|
247 | c Parametres de l'Orographie a l'Echelle Sous-Maille (OESM): |
---|
248 | c |
---|
249 | REAL zmea(klon) |
---|
250 | SAVE zmea ! orographie moyenne |
---|
251 | c |
---|
252 | REAL zstd(klon) |
---|
253 | SAVE zstd ! deviation standard de l'OESM |
---|
254 | c |
---|
255 | REAL zsig(klon) |
---|
256 | SAVE zsig ! pente de l'OESM |
---|
257 | c |
---|
258 | REAL zgam(klon) |
---|
259 | save zgam ! anisotropie de l'OESM |
---|
260 | c |
---|
261 | REAL zthe(klon) |
---|
262 | SAVE zthe ! orientation de l'OESM |
---|
263 | c |
---|
264 | REAL zpic(klon) |
---|
265 | SAVE zpic ! Maximum de l'OESM |
---|
266 | c |
---|
267 | REAL zval(klon) |
---|
268 | SAVE zval ! Minimum de l'OESM |
---|
269 | c |
---|
270 | REAL rugoro(klon) |
---|
271 | SAVE rugoro ! longueur de rugosite de l'OESM |
---|
272 | c |
---|
273 | REAL zulow(klon),zvlow(klon),zustr(klon), zvstr(klon) |
---|
274 | c |
---|
275 | REAL zuthe(klon),zvthe(klon) |
---|
276 | SAVE zuthe |
---|
277 | SAVE zvthe |
---|
278 | INTEGER igwd,idx(klon),itest(klon) |
---|
279 | c |
---|
280 | REAL agesno(klon) |
---|
281 | SAVE agesno ! age de la neige |
---|
282 | c |
---|
283 | c |
---|
284 | c Variables locales: |
---|
285 | c |
---|
286 | REAL cdragh(klon) ! drag coefficient pour T and Q |
---|
287 | REAL cdragm(klon) ! drag coefficient pour vent |
---|
288 | cAA |
---|
289 | cAA Pour phytrac |
---|
290 | cAA |
---|
291 | REAL ycoefh(klon,klev) ! coef d'echange pour phytrac |
---|
292 | REAL yu1(klon) ! vents dans la premiere couche U |
---|
293 | REAL yv1(klon) ! vents dans la premiere couche V |
---|
294 | LOGICAL offline ! Controle du stockage ds "physique" |
---|
295 | PARAMETER (offline=.false.) |
---|
296 | INTEGER physid |
---|
297 | REAL pfrac_impa(klon,klev)! Produits des coefs lessivage impaction |
---|
298 | save pfrac_impa |
---|
299 | REAL pfrac_nucl(klon,klev)! Produits des coefs lessivage nucleation |
---|
300 | save pfrac_nucl |
---|
301 | REAL pfrac_1nucl(klon,klev)! Produits des coefs lessi nucl (alpha = 1) |
---|
302 | save pfrac_1nucl |
---|
303 | REAL frac_impa(klon,klev) ! fractions d'aerosols lessivees (impaction) |
---|
304 | REAL frac_nucl(klon,klev) ! idem (nucleation) |
---|
305 | cAA |
---|
306 | REAL rain_fall(klon) ! pluie |
---|
307 | REAL snow_fall(klon) ! neige |
---|
308 | save snow_fall, rain_fall |
---|
309 | REAL evap(klon), devap(klon) ! evaporation et sa derivee |
---|
310 | REAL sens(klon), dsens(klon) ! chaleur sensible et sa derivee |
---|
311 | REAL bils(klon) ! bilan de chaleur au sol |
---|
312 | REAL fder(klon) ! Derive de flux (sensible et latente) |
---|
313 | save fder |
---|
314 | REAL ve(klon) ! integr. verticale du transport meri. de l'energie |
---|
315 | REAL vq(klon) ! integr. verticale du transport meri. de l'eau |
---|
316 | REAL ue(klon) ! integr. verticale du transport zonal de l'energie |
---|
317 | REAL uq(klon) ! integr. verticale du transport zonal de l'eau |
---|
318 | c |
---|
319 | REAL frugs(klon,nbsrf) ! longueur de rugosite |
---|
320 | save frugs |
---|
321 | REAL zxrugs(klon) ! longueur de rugosite |
---|
322 | c |
---|
323 | c Conditions aux limites |
---|
324 | c |
---|
325 | INTEGER julien |
---|
326 | INTEGER idayvrai |
---|
327 | SAVE idayvrai |
---|
328 | c |
---|
329 | INTEGER lmt_pas |
---|
330 | SAVE lmt_pas ! frequence de mise a jour |
---|
331 | REAL pctsrf(klon,nbsrf) |
---|
332 | SAVE pctsrf ! sous-fraction du sol |
---|
333 | REAL albsol(klon) |
---|
334 | SAVE albsol ! albedo du sol total |
---|
335 | REAL wo(klon,klev) |
---|
336 | SAVE wo ! ozone |
---|
337 | c====================================================================== |
---|
338 | c |
---|
339 | c Declaration des procedures appelees |
---|
340 | c |
---|
341 | EXTERNAL angle ! calculer angle zenithal du soleil |
---|
342 | EXTERNAL alboc ! calculer l'albedo sur ocean |
---|
343 | EXTERNAL albsno ! calculer albedo sur neige |
---|
344 | EXTERNAL ajsec ! ajustement sec |
---|
345 | EXTERNAL clmain ! couche limite |
---|
346 | EXTERNAL condsurf ! lire les conditions aux limites |
---|
347 | EXTERNAL conlmd ! convection (schema LMD) |
---|
348 | EXTERNAL fisrtilp ! schema de condensation a grande echelle (pluie) |
---|
349 | cAA |
---|
350 | EXTERNAL fisrtilp_tr ! schema de condensation a grande echelle (pluie) |
---|
351 | c ! stockage des coefficients necessaires au |
---|
352 | c ! lessivage OFF-LINE et ON-LINE |
---|
353 | cAA |
---|
354 | EXTERNAL hgardfou ! verifier les temperatures |
---|
355 | EXTERNAL nuage ! calculer les proprietes radiatives |
---|
356 | EXTERNAL o3cm ! initialiser l'ozone |
---|
357 | EXTERNAL orbite ! calculer l'orbite terrestre |
---|
358 | EXTERNAL ozonecm ! prescrire l'ozone |
---|
359 | EXTERNAL phyetat0 ! lire l'etat initial de la physique |
---|
360 | EXTERNAL phyredem ! ecrire l'etat de redemarrage de la physique |
---|
361 | EXTERNAL radlwsw ! rayonnements solaire et infrarouge |
---|
362 | EXTERNAL suphec ! initialiser certaines constantes |
---|
363 | EXTERNAL transp ! transport total de l'eau et de l'energie |
---|
364 | EXTERNAL ecribina ! ecrire le fichier binaire global |
---|
365 | EXTERNAL ecribins ! ecrire le fichier binaire global |
---|
366 | EXTERNAL ecrirega ! ecrire le fichier binaire regional |
---|
367 | EXTERNAL ecriregs ! ecrire le fichier binaire regional |
---|
368 | c |
---|
369 | c Variables locales |
---|
370 | c |
---|
371 | REAL dialiq(klon,klev) ! eau liquide nuageuse |
---|
372 | REAL diafra(klon,klev) ! fraction nuageuse |
---|
373 | REAL cldliq(klon,klev) ! eau liquide nuageuse |
---|
374 | REAL cldfra(klon,klev) ! fraction nuageuse |
---|
375 | REAL cldtau(klon,klev) ! epaisseur optique |
---|
376 | REAL cldemi(klon,klev) ! emissivite infrarouge |
---|
377 | c |
---|
378 | C§§§ PB |
---|
379 | REAL fluxq(klon,klev, nbsrf) ! flux turbulent d'humidite |
---|
380 | REAL fluxt(klon,klev, nbsrf) ! flux turbulent de chaleur |
---|
381 | REAL fluxu(klon,klev, nbsrf) ! flux turbulent de vitesse u |
---|
382 | REAL fluxv(klon,klev, nbsrf) ! flux turbulent de vitesse v |
---|
383 | c |
---|
384 | REAL zxfluxt(klon, klev) |
---|
385 | REAL zxfluxq(klon, klev) |
---|
386 | REAL zxfluxu(klon, klev) |
---|
387 | REAL zxfluxv(klon, klev) |
---|
388 | C§§§ |
---|
389 | REAL heat(klon,klev) ! chauffage solaire |
---|
390 | REAL heat0(klon,klev) ! chauffage solaire ciel clair |
---|
391 | REAL cool(klon,klev) ! refroidissement infrarouge |
---|
392 | REAL cool0(klon,klev) ! refroidissement infrarouge ciel clair |
---|
393 | REAL topsw(klon), toplw(klon), solsw(klon), sollw(klon) |
---|
394 | real sollwdown(klon) ! downward LW flux at surface |
---|
395 | REAL topsw0(klon), toplw0(klon), solsw0(klon), sollw0(klon) |
---|
396 | REAL albpla(klon) |
---|
397 | c Le rayonnement n'est pas calcule tous les pas, il faut donc |
---|
398 | c sauvegarder les sorties du rayonnement |
---|
399 | SAVE heat,cool,albpla,topsw,toplw,solsw,sollw,sollwdown |
---|
400 | SAVE topsw0,toplw0,solsw0,sollw0, heat0, cool0 |
---|
401 | INTEGER itaprad |
---|
402 | SAVE itaprad |
---|
403 | c |
---|
404 | REAL conv_q(klon,klev) ! convergence de l'humidite (kg/kg/s) |
---|
405 | REAL conv_t(klon,klev) ! convergence de la temperature(K/s) |
---|
406 | c |
---|
407 | REAL cldl(klon),cldm(klon),cldh(klon) !nuages bas, moyen et haut |
---|
408 | REAL cldt(klon),cldq(klon) !nuage total, eau liquide integree |
---|
409 | c |
---|
410 | REAL zxtsol(klon), zxqsol(klon), zxsnow(klon) |
---|
411 | c |
---|
412 | REAL dist, rmu0(klon), fract(klon) |
---|
413 | REAL zdtime, zlongi |
---|
414 | c |
---|
415 | CHARACTER*2 str2 |
---|
416 | c |
---|
417 | REAL qcheck |
---|
418 | REAL z_avant(klon), z_apres(klon), z_factor(klon) |
---|
419 | LOGICAL zx_ajustq |
---|
420 | c |
---|
421 | REAL za, zb |
---|
422 | REAL zx_t, zx_qs, zdelta, zcor, zlvdcp, zlsdcp |
---|
423 | INTEGER i, k, iq, nsrf, ll |
---|
424 | REAL t_coup |
---|
425 | PARAMETER (t_coup=234.0) |
---|
426 | c |
---|
427 | REAL zphi(klon,klev) |
---|
428 | c |
---|
429 | c Variables du changement |
---|
430 | c |
---|
431 | c con: convection |
---|
432 | c lsc: condensation a grande echelle (Large-Scale-Condensation) |
---|
433 | c ajs: ajustement sec |
---|
434 | c eva: evaporation de l'eau liquide nuageuse |
---|
435 | c vdf: couche limite (Vertical DiFfusion) |
---|
436 | REAL d_t_con(klon,klev),d_q_con(klon,klev) |
---|
437 | REAL d_u_con(klon,klev),d_v_con(klon,klev) |
---|
438 | REAL d_t_lsc(klon,klev),d_q_lsc(klon,klev),d_ql_lsc(klon,klev) |
---|
439 | REAL d_t_ajs(klon,klev), d_q_ajs(klon,klev) |
---|
440 | REAL d_t_eva(klon,klev),d_q_eva(klon,klev) |
---|
441 | REAL rneb(klon,klev) |
---|
442 | c |
---|
443 | REAL pmfu(klon,klev), pmfd(klon,klev) |
---|
444 | REAL pen_u(klon,klev), pen_d(klon,klev) |
---|
445 | REAL pde_u(klon,klev), pde_d(klon,klev) |
---|
446 | INTEGER kcbot(klon), kctop(klon), kdtop(klon) |
---|
447 | REAL pmflxr(klon,klev+1), pmflxs(klon,klev+1) |
---|
448 | REAL prfl(klon,klev+1), psfl(klon,klev+1) |
---|
449 | c |
---|
450 | INTEGER ibas_con(klon), itop_con(klon) |
---|
451 | REAL rain_con(klon), rain_lsc(klon) |
---|
452 | REAL snow_con(klon), snow_lsc(klon) |
---|
453 | REAL d_ts(klon,nbsrf) |
---|
454 | c |
---|
455 | REAL d_u_vdf(klon,klev), d_v_vdf(klon,klev) |
---|
456 | REAL d_t_vdf(klon,klev), d_q_vdf(klon,klev) |
---|
457 | c |
---|
458 | REAL d_u_oro(klon,klev), d_v_oro(klon,klev) |
---|
459 | REAL d_t_oro(klon,klev) |
---|
460 | REAL d_u_lif(klon,klev), d_v_lif(klon,klev) |
---|
461 | REAL d_t_lif(klon,klev) |
---|
462 | c |
---|
463 | c Variables liees a l'ecriture de la bande histoire physique |
---|
464 | c |
---|
465 | INTEGER ecrit_mth |
---|
466 | SAVE ecrit_mth ! frequence d'ecriture (fichier mensuel) |
---|
467 | c |
---|
468 | INTEGER ecrit_day |
---|
469 | SAVE ecrit_day ! frequence d'ecriture (fichier journalier) |
---|
470 | c |
---|
471 | INTEGER ecrit_ins |
---|
472 | SAVE ecrit_ins ! frequence d'ecriture (fichier instantane) |
---|
473 | c |
---|
474 | INTEGER ecrit_reg |
---|
475 | SAVE ecrit_reg ! frequence d'ecriture |
---|
476 | c |
---|
477 | c |
---|
478 | c |
---|
479 | c Variables locales pour effectuer les appels en serie |
---|
480 | c |
---|
481 | REAL t_seri(klon,klev), q_seri(klon,klev) |
---|
482 | REAL ql_seri(klon,klev) |
---|
483 | REAL u_seri(klon,klev), v_seri(klon,klev) |
---|
484 | c |
---|
485 | REAL tr_seri(klon,klev,nbtr) |
---|
486 | |
---|
487 | REAL zx_rh(klon,klev) |
---|
488 | |
---|
489 | INTEGER length |
---|
490 | PARAMETER ( length = 100 ) |
---|
491 | REAL tabcntr0( length ) |
---|
492 | c |
---|
493 | INTEGER ndex2d(iim*jjmp1),ndex3d(iim*jjmp1*klev) |
---|
494 | REAL zx_tmp_fi2d(klon) |
---|
495 | REAL zx_tmp_2d(iim,jjmp1), zx_tmp_3d(iim,jjmp1,klev) |
---|
496 | REAL zx_lon(iim,jjmp1), zx_lat(iim,jjmp1) |
---|
497 | c |
---|
498 | INTEGER nid_day, nid_mth, nid_ins |
---|
499 | SAVE nid_day, nid_mth, nid_ins |
---|
500 | c |
---|
501 | INTEGER nhori, nvert |
---|
502 | REAL zsto, zout, zjulian |
---|
503 | |
---|
504 | character*20 modname |
---|
505 | character*80 abort_message |
---|
506 | logical ok_sync |
---|
507 | real date0 |
---|
508 | |
---|
509 | c |
---|
510 | c Declaration des constantes et des fonctions thermodynamiques |
---|
511 | c |
---|
512 | #include "YOMCST.h" |
---|
513 | #include "YOETHF.h" |
---|
514 | #include "FCTTRE.h" |
---|
515 | c====================================================================== |
---|
516 | modname = 'physiq' |
---|
517 | ok_sync=.TRUE. |
---|
518 | IF (nqmax .LT. 2) THEN |
---|
519 | PRINT*, 'eaux vapeur et liquide sont indispensables' |
---|
520 | CALL ABORT |
---|
521 | ENDIF |
---|
522 | IF (debut) THEN |
---|
523 | CALL suphec ! initialiser constantes et parametres phys. |
---|
524 | ENDIF |
---|
525 | |
---|
526 | |
---|
527 | c====================================================================== |
---|
528 | xjour = rjourvrai |
---|
529 | c |
---|
530 | c Si c'est le debut, il faut initialiser plusieurs choses |
---|
531 | c ******** |
---|
532 | c |
---|
533 | IF (debut) THEN |
---|
534 | |
---|
535 | c |
---|
536 | c appel a la lecture du run.def physique |
---|
537 | c |
---|
538 | call conf_phys(ocean, ok_veget, ok_journe, ok_mensuel, |
---|
539 | . ok_instan) |
---|
540 | |
---|
541 | DO k = 2, nvm ! pas de vegetation |
---|
542 | DO i = 1, klon |
---|
543 | veget(i,k) = 0.0 |
---|
544 | ENDDO |
---|
545 | ENDDO |
---|
546 | DO i = 1, klon |
---|
547 | veget(i,1) = 1.0 ! il n'y a que du desert |
---|
548 | ENDDO |
---|
549 | PRINT*, 'Pas de vegetation; desert partout' |
---|
550 | c |
---|
551 | c |
---|
552 | c Initialiser les compteurs: |
---|
553 | c |
---|
554 | |
---|
555 | frugs = 0. |
---|
556 | itap = 0 |
---|
557 | itaprad = 0 |
---|
558 | c |
---|
559 | CALL phyetat0 ("startphy.nc",dtime,co2_ppm,solaire, |
---|
560 | . rlat,rlon,pctsrf, ftsol,ftsoil,deltat,fqsol,fsnow, |
---|
561 | . falbe, fevap, rain_fall,snow_fall,solsw, sollwdown, |
---|
562 | . fder,radsol,frugs,agesno,clesphy0, |
---|
563 | . zmea,zstd,zsig,zgam,zthe,zpic,zval,rugoro,tabcntr0, |
---|
564 | . t_ancien, q_ancien, ancien_ok ) |
---|
565 | |
---|
566 | c |
---|
567 | radpas = NINT( 86400./dtime/nbapp_rad) |
---|
568 | |
---|
569 | c |
---|
570 | CALL printflag( tabcntr0,radpas,ok_ocean,ok_oasis ,ok_journe, |
---|
571 | , ok_instan, ok_region ) |
---|
572 | c |
---|
573 | IF (ABS(dtime-pdtphys).GT.0.001) THEN |
---|
574 | PRINT*, 'Pas physique n est pas correcte',dtime,pdtphys |
---|
575 | abort_message=' See above ' |
---|
576 | call abort_gcm(modname,abort_message,1) |
---|
577 | ENDIF |
---|
578 | IF (nlon .NE. klon) THEN |
---|
579 | PRINT*, 'nlon et klon ne sont pas coherents', nlon, klon |
---|
580 | abort_message=' See above ' |
---|
581 | call abort_gcm(modname,abort_message,1) |
---|
582 | ENDIF |
---|
583 | IF (nlev .NE. klev) THEN |
---|
584 | PRINT*, 'nlev et klev ne sont pas coherents', nlev, klev |
---|
585 | abort_message=' See above ' |
---|
586 | call abort_gcm(modname,abort_message,1) |
---|
587 | ENDIF |
---|
588 | c |
---|
589 | IF (dtime*FLOAT(radpas).GT.21600..AND.cycle_diurne) THEN |
---|
590 | PRINT*, 'Nbre d appels au rayonnement insuffisant' |
---|
591 | PRINT*, "Au minimum 4 appels par jour si cycle diurne" |
---|
592 | abort_message=' See above ' |
---|
593 | call abort_gcm(modname,abort_message,1) |
---|
594 | ENDIF |
---|
595 | PRINT*, "Clef pour la convection, iflag_con=", iflag_con |
---|
596 | c |
---|
597 | IF (ok_orodr) THEN |
---|
598 | DO i=1,klon |
---|
599 | rugoro(i) = MAX(1.0e-05, zstd(i)*zsig(i)/2.0) |
---|
600 | ENDDO |
---|
601 | CALL SUGWD(klon,klev,paprs,pplay) |
---|
602 | DO i=1,klon |
---|
603 | zuthe(i)=0. |
---|
604 | zvthe(i)=0. |
---|
605 | if(zstd(i).gt.10.)then |
---|
606 | zuthe(i)=(1.-zgam(i))*cos(zthe(i)) |
---|
607 | zvthe(i)=(1.-zgam(i))*sin(zthe(i)) |
---|
608 | endif |
---|
609 | ENDDO |
---|
610 | ENDIF |
---|
611 | c |
---|
612 | c |
---|
613 | lmt_pas = NINT(86400./dtime * 1.0) ! tous les jours |
---|
614 | PRINT*,'La frequence de lecture surface est de ', lmt_pas |
---|
615 | c |
---|
616 | ecrit_mth = NINT(86400./dtime *ecritphy) ! tous les ecritphy jours |
---|
617 | IF (ok_mensuel) THEN |
---|
618 | PRINT*, 'La frequence de sortie mensuelle est de ', ecrit_mth |
---|
619 | ENDIF |
---|
620 | ecrit_day = NINT(86400./dtime *1.0) ! tous les jours |
---|
621 | IF (ok_journe) THEN |
---|
622 | PRINT*, 'La frequence de sortie journaliere est de ',ecrit_day |
---|
623 | ENDIF |
---|
624 | ccc ecrit_ins = NINT(86400./dtime *0.5) ! 2 fois par jour |
---|
625 | ccc ecrit_ins = NINT(86400./dtime *0.25) ! 4 fois par jour |
---|
626 | ecrit_ins = NINT(86400./dtime/48.) ! a chaque pas de temps |
---|
627 | IF (ok_instan) THEN |
---|
628 | PRINT*, 'La frequence de sortie instant. est de ', ecrit_ins |
---|
629 | ENDIF |
---|
630 | ecrit_reg = NINT(86400./dtime *0.25) ! 4 fois par jour |
---|
631 | IF (ok_region) THEN |
---|
632 | PRINT*, 'La frequence de sortie region est de ', ecrit_reg |
---|
633 | ENDIF |
---|
634 | |
---|
635 | c |
---|
636 | c Initialiser le couplage si necessaire |
---|
637 | c |
---|
638 | npas = 0 |
---|
639 | nexca = 0 |
---|
640 | if (ocean == 'couple') then |
---|
641 | npas = itaufin/ iphysiq |
---|
642 | nexca = 86400 / dtime |
---|
643 | write(*,*)' ##### Ocean couple #####' |
---|
644 | write(*,*)' Valeurs des pas de temps' |
---|
645 | write(*,*)' npas = ', npas |
---|
646 | write(*,*)' nexca = ', nexca |
---|
647 | endif |
---|
648 | c |
---|
649 | c |
---|
650 | IF (ok_journe) THEN |
---|
651 | c |
---|
652 | CALL ymds2ju(anne_ini, 1, 1, 0.0, zjulian) |
---|
653 | zjulian = zjulian + day_ini |
---|
654 | c |
---|
655 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlon,zx_lon) |
---|
656 | DO i = 1, iim |
---|
657 | zx_lon(i,1) = rlon(i+1) |
---|
658 | zx_lon(i,jjmp1) = rlon(i+1) |
---|
659 | ENDDO |
---|
660 | DO ll=1,klev |
---|
661 | znivsig(ll)=float(ll) |
---|
662 | ENDDO |
---|
663 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat,zx_lat) |
---|
664 | CALL histbeg("histday", iim,zx_lon, jjmp1,zx_lat, |
---|
665 | . 1,iim,1,jjmp1, 0, zjulian, dtime, |
---|
666 | . nhori, nid_day) |
---|
667 | c CALL histvert(nid_day, "presnivs", "Vertical levels", "mb", |
---|
668 | c . klev, presnivs, nvert) |
---|
669 | call histvert(nid_day, 'sig_s', 'Niveaux sigma','-', |
---|
670 | . klev, znivsig, nvert) |
---|
671 | c |
---|
672 | zsto = dtime |
---|
673 | zout = dtime * FLOAT(ecrit_day) |
---|
674 | c |
---|
675 | CALL histdef(nid_day, "phis", "Surface geop. height", "-", |
---|
676 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
677 | . "once", zsto,zout) |
---|
678 | c |
---|
679 | CALL histdef(nid_day, "aire", "Grid area", "-", |
---|
680 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
681 | . "once", zsto,zout) |
---|
682 | c |
---|
683 | c Champs 2D: |
---|
684 | c |
---|
685 | CALL histdef(nid_day, "tsol", "Surface Temperature", "K", |
---|
686 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
687 | . "ave(X)", zsto,zout) |
---|
688 | c |
---|
689 | CALL histdef(nid_day, "tter", "Surface Temperature", "K", |
---|
690 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
691 | . "ave(X)", zsto,zout) |
---|
692 | c |
---|
693 | CALL histdef(nid_day, "tlic", "Surface Temperature", "K", |
---|
694 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
695 | . "ave(X)", zsto,zout) |
---|
696 | c |
---|
697 | CALL histdef(nid_day, "toce", "Surface Temperature", "K", |
---|
698 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
699 | . "ave(X)", zsto,zout) |
---|
700 | c |
---|
701 | CALL histdef(nid_day, "tsic", "Surface Temperature", "K", |
---|
702 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
703 | . "ave(X)", zsto,zout) |
---|
704 | c |
---|
705 | CALL histdef(nid_day, "psol", "Surface Pressure", "Pa", |
---|
706 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
707 | . "ave(X)", zsto,zout) |
---|
708 | c |
---|
709 | CALL histdef(nid_day, "rain", "Precipitation", "mm/day", |
---|
710 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
711 | . "ave(X)", zsto,zout) |
---|
712 | c |
---|
713 | CALL histdef(nid_day, "snow", "Snow fall", "mm/day", |
---|
714 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
715 | . "ave(X)", zsto,zout) |
---|
716 | c |
---|
717 | CALL histdef(nid_day, "snow_cov", "Snow cover", "mm", |
---|
718 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
719 | . "ave(X)", zsto,zout) |
---|
720 | c |
---|
721 | CALL histdef(nid_day, "evap", "Evaporation", "mm/day", |
---|
722 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
723 | . "ave(X)", zsto,zout) |
---|
724 | c |
---|
725 | CALL histdef(nid_day, "tops", "Solar rad. at TOA", "W/m2", |
---|
726 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
727 | . "ave(X)", zsto,zout) |
---|
728 | c |
---|
729 | CALL histdef(nid_day, "topl", "IR rad. at TOA", "W/m2", |
---|
730 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
731 | . "ave(X)", zsto,zout) |
---|
732 | c |
---|
733 | CALL histdef(nid_day, "sols", "Solar rad. at surf.", "W/m2", |
---|
734 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
735 | . "ave(X)", zsto,zout) |
---|
736 | c |
---|
737 | CALL histdef(nid_day, "soll", "IR rad. at surface", "W/m2", |
---|
738 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
739 | . "ave(X)", zsto,zout) |
---|
740 | c |
---|
741 | CALL histdef(nid_day, "solldown", "Down. IR rad. at surface", |
---|
742 | . "W/m2", iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
743 | . "ave(X)", zsto,zout) |
---|
744 | c |
---|
745 | CALL histdef(nid_day, "bils", "Surf. total heat flux", "W/m2", |
---|
746 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
747 | . "ave(X)", zsto,zout) |
---|
748 | c |
---|
749 | CALL histdef(nid_day, "sens", "Sensible heat flux", "W/m2", |
---|
750 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
751 | . "ave(X)", zsto,zout) |
---|
752 | c |
---|
753 | CALL histdef(nid_day, "fder", "Heat flux derivation", "W/m2", |
---|
754 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
755 | . "ave(X)", zsto,zout) |
---|
756 | c |
---|
757 | CALL histdef(nid_day, "frtu", "Zonal wind stress", "Pa", |
---|
758 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
759 | . "ave(X)", zsto,zout) |
---|
760 | c |
---|
761 | CALL histdef(nid_day, "frtv", "Meridional wind stress", "Pa", |
---|
762 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
763 | . "ave(X)", zsto,zout) |
---|
764 | c |
---|
765 | C §§§ PB flux pour chauqe sous surface |
---|
766 | C |
---|
767 | DO nsrf = 1, nbsrf |
---|
768 | C |
---|
769 | call histdef(nid_day, "pourc_"//clnsurf(nsrf), |
---|
770 | $ "Fraction"//clnsurf(nsrf), "W/m2", |
---|
771 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
772 | $ "ave(X)", zsto,zout) |
---|
773 | C |
---|
774 | call histdef(nid_day, "tsol_"//clnsurf(nsrf), |
---|
775 | $ "Fraction"//clnsurf(nsrf), "W/m2", |
---|
776 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
777 | $ "ave(X)", zsto,zout) |
---|
778 | C |
---|
779 | call histdef(nid_day, "sens_"//clnsurf(nsrf), |
---|
780 | $ "Sensible heat flux "//clnsurf(nsrf), "W/m2", |
---|
781 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
782 | $ "ave(X)", zsto,zout) |
---|
783 | c |
---|
784 | call histdef(nid_day, "lat_"//clnsurf(nsrf), |
---|
785 | $ "Latent heat flux "//clnsurf(nsrf), "W/m2", |
---|
786 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
787 | $ "ave(X)", zsto,zout) |
---|
788 | C |
---|
789 | call histdef(nid_day, "taux_"//clnsurf(nsrf), |
---|
790 | $ "Zonal wind stress"//clnsurf(nsrf),"Pa", |
---|
791 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
792 | $ "ave(X)", zsto,zout) |
---|
793 | |
---|
794 | call histdef(nid_day, "tauy_"//clnsurf(nsrf), |
---|
795 | $ "Meridional xind stress "//clnsurf(nsrf), "Pa", |
---|
796 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
797 | $ "ave(X)", zsto,zout) |
---|
798 | C |
---|
799 | call histdef(nid_day, "albe_"//clnsurf(nsrf), |
---|
800 | $ "Albedo surf. "//clnsurf(nsrf), "W/m2", |
---|
801 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
802 | $ "ave(X)", zsto,zout) |
---|
803 | C |
---|
804 | call histdef(nid_day, "rugs_"//clnsurf(nsrf), |
---|
805 | $ "Latent heat flux "//clnsurf(nsrf), "W/m2", |
---|
806 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
807 | $ "ave(X)", zsto,zout) |
---|
808 | |
---|
809 | C§§§ |
---|
810 | END DO |
---|
811 | |
---|
812 | CALL histdef(nid_day, "sicf", "Sea-ice fraction", "-", |
---|
813 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
814 | . "ave(X)", zsto,zout) |
---|
815 | c |
---|
816 | CALL histdef(nid_day, "cldl", "Low-level cloudiness", "-", |
---|
817 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
818 | . "ave(X)", zsto,zout) |
---|
819 | c |
---|
820 | CALL histdef(nid_day, "cldm", "Mid-level cloudiness", "-", |
---|
821 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
822 | . "ave(X)", zsto,zout) |
---|
823 | c |
---|
824 | CALL histdef(nid_day, "cldh", "High-level cloudiness", "-", |
---|
825 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
826 | . "ave(X)", zsto,zout) |
---|
827 | c |
---|
828 | CALL histdef(nid_day, "cldt", "Total cloudiness", "-", |
---|
829 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
830 | . "ave(X)", zsto,zout) |
---|
831 | c |
---|
832 | CALL histdef(nid_day, "cldq", "Cloud liquid water path", "-", |
---|
833 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
834 | . "ave(X)", zsto,zout) |
---|
835 | c |
---|
836 | c Champs 3D: |
---|
837 | c |
---|
838 | CALL histdef(nid_day, "temp", "Air temperature", "K", |
---|
839 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
840 | . "ave(X)", zsto,zout) |
---|
841 | c |
---|
842 | CALL histdef(nid_day, "ovap", "Specific humidity", "Kg/Kg", |
---|
843 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
844 | . "ave(X)", zsto,zout) |
---|
845 | c |
---|
846 | CALL histdef(nid_day, "geop", "Geopotential height", "m", |
---|
847 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
848 | . "ave(X)", zsto,zout) |
---|
849 | c |
---|
850 | CALL histdef(nid_day, "vitu", "Zonal wind", "m/s", |
---|
851 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
852 | . "ave(X)", zsto,zout) |
---|
853 | c |
---|
854 | CALL histdef(nid_day, "vitv", "Meridional wind", "m/s", |
---|
855 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
856 | . "ave(X)", zsto,zout) |
---|
857 | c |
---|
858 | CALL histdef(nid_day, "vitw", "Vertical wind", "m/s", |
---|
859 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
860 | . "ave(X)", zsto,zout) |
---|
861 | c |
---|
862 | CALL histdef(nid_day, "pres", "Air pressure", "Pa", |
---|
863 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
864 | . "ave(X)", zsto,zout) |
---|
865 | c |
---|
866 | CALL histend(nid_day) |
---|
867 | c |
---|
868 | ndex2d = 0 |
---|
869 | ndex3d = 0 |
---|
870 | c |
---|
871 | ENDIF ! fin de test sur ok_journe |
---|
872 | c |
---|
873 | IF (ok_mensuel) THEN |
---|
874 | c |
---|
875 | CALL ymds2ju(anne_ini, 1, 1, 0.0, zjulian) |
---|
876 | zjulian = zjulian + day_ini |
---|
877 | c |
---|
878 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlon,zx_lon) |
---|
879 | DO i = 1, iim |
---|
880 | zx_lon(i,1) = rlon(i+1) |
---|
881 | zx_lon(i,jjmp1) = rlon(i+1) |
---|
882 | ENDDO |
---|
883 | DO ll=1,klev |
---|
884 | znivsig(ll)=float(ll) |
---|
885 | ENDDO |
---|
886 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat,zx_lat) |
---|
887 | CALL histbeg("histmth", iim,zx_lon, jjmp1,zx_lat, |
---|
888 | . 1,iim,1,jjmp1, 0, zjulian, dtime, |
---|
889 | . nhori, nid_mth) |
---|
890 | c CALL histvert(nid_mth, "presnivs", "Vertical levels", "mb", |
---|
891 | c . klev, presnivs, nvert) |
---|
892 | call histvert(nid_mth, 'sig_s', 'Niveaux sigma','-', |
---|
893 | . klev, znivsig, nvert) |
---|
894 | c |
---|
895 | zsto = dtime |
---|
896 | zout = dtime * ecrit_mth |
---|
897 | c |
---|
898 | CALL histdef(nid_mth, "phis", "Surface geop. height", "-", |
---|
899 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
900 | . "once", zsto,zout) |
---|
901 | c |
---|
902 | CALL histdef(nid_mth, "aire", "Grid area", "-", |
---|
903 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
904 | . "once", zsto,zout) |
---|
905 | c |
---|
906 | c Champs 2D: |
---|
907 | c |
---|
908 | CALL histdef(nid_mth, "tsol", "Surface Temperature", "K", |
---|
909 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
910 | . "ave(X)", zsto,zout) |
---|
911 | c |
---|
912 | CALL histdef(nid_mth, "psol", "Surface Pressure", "Pa", |
---|
913 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
914 | . "ave(X)", zsto,zout) |
---|
915 | c |
---|
916 | CALL histdef(nid_mth, "qsol", "Surface humidity", "mm", |
---|
917 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
918 | . "ave(X)", zsto,zout) |
---|
919 | c |
---|
920 | CALL histdef(nid_mth, "rain", "Precipitation", "mm/day", |
---|
921 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
922 | . "ave(X)", zsto,zout) |
---|
923 | c |
---|
924 | CALL histdef(nid_mth, "plul", "Large-scale Precip.", "mm/day", |
---|
925 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
926 | . "ave(X)", zsto,zout) |
---|
927 | c |
---|
928 | CALL histdef(nid_mth, "pluc", "Convective Precip.", "mm/day", |
---|
929 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
930 | . "ave(X)", zsto,zout) |
---|
931 | c |
---|
932 | CALL histdef(nid_mth, "snow", "Snow fall", "mm/day", |
---|
933 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
934 | . "ave(X)", zsto,zout) |
---|
935 | c |
---|
936 | CALL histdef(nid_mth, "snow_cov", "Snow cover", "mm", |
---|
937 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
938 | . "ave(X)", zsto,zout) |
---|
939 | c |
---|
940 | CALL histdef(nid_mth, "ages", "Snow age", "day", |
---|
941 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
942 | . "ave(X)", zsto,zout) |
---|
943 | c |
---|
944 | CALL histdef(nid_mth, "evap", "Evaporation", "mm/day", |
---|
945 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
946 | . "ave(X)", zsto,zout) |
---|
947 | c |
---|
948 | CALL histdef(nid_mth, "tops", "Solar rad. at TOA", "W/m2", |
---|
949 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
950 | . "ave(X)", zsto,zout) |
---|
951 | c |
---|
952 | CALL histdef(nid_mth, "topl", "IR rad. at TOA", "W/m2", |
---|
953 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
954 | . "ave(X)", zsto,zout) |
---|
955 | c |
---|
956 | CALL histdef(nid_mth, "sols", "Solar rad. at surf.", "W/m2", |
---|
957 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
958 | . "ave(X)", zsto,zout) |
---|
959 | c |
---|
960 | CALL histdef(nid_mth, "soll", "IR rad. at surface", "W/m2", |
---|
961 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
962 | . "ave(X)", zsto,zout) |
---|
963 | c |
---|
964 | CALL histdef(nid_mth, "solldown", "Down. IR rad. at surface", |
---|
965 | . "W/m2", iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
966 | . "ave(X)", zsto,zout) |
---|
967 | c |
---|
968 | CALL histdef(nid_mth, "tops0", "Solar rad. at TOA", "W/m2", |
---|
969 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
970 | . "ave(X)", zsto,zout) |
---|
971 | c |
---|
972 | CALL histdef(nid_mth, "topl0", "IR rad. at TOA", "W/m2", |
---|
973 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
974 | . "ave(X)", zsto,zout) |
---|
975 | c |
---|
976 | CALL histdef(nid_mth, "sols0", "Solar rad. at surf.", "W/m2", |
---|
977 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
978 | . "ave(X)", zsto,zout) |
---|
979 | c |
---|
980 | CALL histdef(nid_mth, "soll0", "IR rad. at surface", "W/m2", |
---|
981 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
982 | . "ave(X)", zsto,zout) |
---|
983 | c |
---|
984 | CALL histdef(nid_mth, "bils", "Surf. total heat flux", "W/m2", |
---|
985 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
986 | . "ave(X)", zsto,zout) |
---|
987 | c |
---|
988 | CALL histdef(nid_mth, "sens", "Sensible heat flux", "W/m2", |
---|
989 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
990 | . "ave(X)", zsto,zout) |
---|
991 | c |
---|
992 | CALL histdef(nid_mth, "fder", "Heat flux derivation", "W/m2", |
---|
993 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
994 | . "ave(X)", zsto,zout) |
---|
995 | c |
---|
996 | CALL histdef(nid_mth, "frtu", "Zonal wind stress", "Pa", |
---|
997 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
998 | . "ave(X)", zsto,zout) |
---|
999 | c |
---|
1000 | CALL histdef(nid_mth, "frtv", "Meridional wind stress", "Pa", |
---|
1001 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1002 | . "ave(X)", zsto,zout) |
---|
1003 | c |
---|
1004 | DO nsrf = 1, nbsrf |
---|
1005 | C |
---|
1006 | call histdef(nid_mth, "pourc_"//clnsurf(nsrf), |
---|
1007 | $ "Fraction "//clnsurf(nsrf), "W/m2", |
---|
1008 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1009 | $ "ave(X)", zsto,zout) |
---|
1010 | C |
---|
1011 | call histdef(nid_mth, "tsol_"//clnsurf(nsrf), |
---|
1012 | $ "Fraction "//clnsurf(nsrf), "W/m2", |
---|
1013 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1014 | $ "ave(X)", zsto,zout) |
---|
1015 | C |
---|
1016 | call histdef(nid_mth, "sens_"//clnsurf(nsrf), |
---|
1017 | $ "Sensible heat flux "//clnsurf(nsrf), "W/m2", |
---|
1018 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1019 | $ "ave(X)", zsto,zout) |
---|
1020 | c |
---|
1021 | call histdef(nid_mth, "lat_"//clnsurf(nsrf), |
---|
1022 | $ "Latent heat flux "//clnsurf(nsrf), "W/m2", |
---|
1023 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1024 | $ "ave(X)", zsto,zout) |
---|
1025 | C |
---|
1026 | call histdef(nid_mth, "taux_"//clnsurf(nsrf), |
---|
1027 | $ "Zonal wind stress"//clnsurf(nsrf), "Pa", |
---|
1028 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1029 | $ "ave(X)", zsto,zout) |
---|
1030 | |
---|
1031 | call histdef(nid_mth, "tauy_"//clnsurf(nsrf), |
---|
1032 | $ "Meridional xind stress "//clnsurf(nsrf), "Pa", |
---|
1033 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1034 | $ "ave(X)", zsto,zout) |
---|
1035 | c |
---|
1036 | call histdef(nid_mth, "albe_"//clnsurf(nsrf), |
---|
1037 | $ "Albedo surf. "//clnsurf(nsrf), "W/m2", |
---|
1038 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1039 | $ "ave(X)", zsto,zout) |
---|
1040 | c |
---|
1041 | call histdef(nid_mth, "rugs_"//clnsurf(nsrf), |
---|
1042 | $ "Latent heat flux "//clnsurf(nsrf), "W/m2", |
---|
1043 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1044 | $ "ave(X)", zsto,zout) |
---|
1045 | END DO |
---|
1046 | C |
---|
1047 | CALL histdef(nid_mth, "sicf", "Sea-ice fraction", "-", |
---|
1048 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1049 | . "ave(X)", zsto,zout) |
---|
1050 | c |
---|
1051 | CALL histdef(nid_mth, "albs", "Surface albedo", "-", |
---|
1052 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1053 | . "ave(X)", zsto,zout) |
---|
1054 | c |
---|
1055 | CALL histdef(nid_mth, "cdrm", "Momentum drag coef.", "-", |
---|
1056 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1057 | . "ave(X)", zsto,zout) |
---|
1058 | c |
---|
1059 | CALL histdef(nid_mth, "cdrh", "Heat drag coef.", "-", |
---|
1060 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1061 | . "ave(X)", zsto,zout) |
---|
1062 | c |
---|
1063 | CALL histdef(nid_mth, "cldl", "Low-level cloudiness", "-", |
---|
1064 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1065 | . "ave(X)", zsto,zout) |
---|
1066 | c |
---|
1067 | CALL histdef(nid_mth, "cldm", "Mid-level cloudiness", "-", |
---|
1068 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1069 | . "ave(X)", zsto,zout) |
---|
1070 | c |
---|
1071 | CALL histdef(nid_mth, "cldh", "High-level cloudiness", "-", |
---|
1072 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1073 | . "ave(X)", zsto,zout) |
---|
1074 | c |
---|
1075 | CALL histdef(nid_mth, "cldt", "Total cloudiness", "-", |
---|
1076 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1077 | . "ave(X)", zsto,zout) |
---|
1078 | c |
---|
1079 | CALL histdef(nid_mth, "cldq", "Cloud liquid water path", "-", |
---|
1080 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1081 | . "ave(X)", zsto,zout) |
---|
1082 | c |
---|
1083 | CALL histdef(nid_mth, "ue", "Zonal energy transport", "-", |
---|
1084 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1085 | . "ave(X)", zsto,zout) |
---|
1086 | c |
---|
1087 | CALL histdef(nid_mth, "ve", "Merid energy transport", "-", |
---|
1088 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1089 | . "ave(X)", zsto,zout) |
---|
1090 | c |
---|
1091 | CALL histdef(nid_mth, "uq", "Zonal humidity transport", "-", |
---|
1092 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1093 | . "ave(X)", zsto,zout) |
---|
1094 | c |
---|
1095 | CALL histdef(nid_mth, "vq", "Merid humidity transport", "-", |
---|
1096 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1097 | . "ave(X)", zsto,zout) |
---|
1098 | c |
---|
1099 | c Champs 3D: |
---|
1100 | c |
---|
1101 | CALL histdef(nid_mth, "temp", "Air temperature", "K", |
---|
1102 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1103 | . "ave(X)", zsto,zout) |
---|
1104 | c |
---|
1105 | CALL histdef(nid_mth, "ovap", "Specific humidity", "Kg/Kg", |
---|
1106 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1107 | . "ave(X)", zsto,zout) |
---|
1108 | c |
---|
1109 | CALL histdef(nid_mth, "geop", "Geopotential height", "m", |
---|
1110 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1111 | . "ave(X)", zsto,zout) |
---|
1112 | c |
---|
1113 | CALL histdef(nid_mth, "vitu", "Zonal wind", "m/s", |
---|
1114 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1115 | . "ave(X)", zsto,zout) |
---|
1116 | c |
---|
1117 | CALL histdef(nid_mth, "vitv", "Meridional wind", "m/s", |
---|
1118 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1119 | . "ave(X)", zsto,zout) |
---|
1120 | c |
---|
1121 | CALL histdef(nid_mth, "vitw", "Vertical wind", "m/s", |
---|
1122 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1123 | . "ave(X)", zsto,zout) |
---|
1124 | c |
---|
1125 | CALL histdef(nid_mth, "pres", "Air pressure", "Pa", |
---|
1126 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1127 | . "ave(X)", zsto,zout) |
---|
1128 | c |
---|
1129 | CALL histdef(nid_mth, "rneb", "Cloud fraction", "-", |
---|
1130 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1131 | . "ave(X)", zsto,zout) |
---|
1132 | c |
---|
1133 | CALL histdef(nid_mth, "rhum", "Relative humidity", "-", |
---|
1134 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1135 | . "ave(X)", zsto,zout) |
---|
1136 | c |
---|
1137 | CALL histdef(nid_mth, "oliq", "Liquid water content", "kg/kg", |
---|
1138 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1139 | . "ave(X)", zsto,zout) |
---|
1140 | c |
---|
1141 | CALL histdef(nid_mth, "dtdyn", "Dynamics dT", "K/s", |
---|
1142 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1143 | . "ave(X)", zsto,zout) |
---|
1144 | c |
---|
1145 | CALL histdef(nid_mth, "dqdyn", "Dynamics dQ", "Kg/Kg/s", |
---|
1146 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1147 | . "ave(X)", zsto,zout) |
---|
1148 | c |
---|
1149 | CALL histdef(nid_mth, "dtcon", "Convection dT", "K/s", |
---|
1150 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1151 | . "ave(X)", zsto,zout) |
---|
1152 | c |
---|
1153 | CALL histdef(nid_mth, "dqcon", "Convection dQ", "Kg/Kg/s", |
---|
1154 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1155 | . "ave(X)", zsto,zout) |
---|
1156 | c |
---|
1157 | CALL histdef(nid_mth, "dtlsc", "Condensation dT", "K/s", |
---|
1158 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1159 | . "ave(X)", zsto,zout) |
---|
1160 | c |
---|
1161 | CALL histdef(nid_mth, "dqlsc", "Condensation dQ", "Kg/Kg/s", |
---|
1162 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1163 | . "ave(X)", zsto,zout) |
---|
1164 | c |
---|
1165 | CALL histdef(nid_mth, "dtvdf", "Boundary-layer dT", "K/s", |
---|
1166 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1167 | . "ave(X)", zsto,zout) |
---|
1168 | c |
---|
1169 | CALL histdef(nid_mth, "dqvdf", "Boundary-layer dQ", "Kg/Kg/s", |
---|
1170 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1171 | . "ave(X)", zsto,zout) |
---|
1172 | c |
---|
1173 | CALL histdef(nid_mth, "dteva", "Reevaporation dT", "K/s", |
---|
1174 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1175 | . "ave(X)", zsto,zout) |
---|
1176 | c |
---|
1177 | CALL histdef(nid_mth, "dqeva", "Reevaporation dQ", "Kg/Kg/s", |
---|
1178 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1179 | . "ave(X)", zsto,zout) |
---|
1180 | c |
---|
1181 | CALL histdef(nid_mth, "dtajs", "Dry adjust. dT", "K/s", |
---|
1182 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1183 | . "ave(X)", zsto,zout) |
---|
1184 | |
---|
1185 | CALL histdef(nid_mth, "dqajs", "Dry adjust. dQ", "Kg/Kg/s", |
---|
1186 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1187 | . "ave(X)", zsto,zout) |
---|
1188 | c |
---|
1189 | CALL histdef(nid_mth, "dtswr", "SW radiation dT", "K/s", |
---|
1190 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1191 | . "ave(X)", zsto,zout) |
---|
1192 | c |
---|
1193 | CALL histdef(nid_mth, "dtsw0", "SW radiation dT", "K/s", |
---|
1194 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1195 | . "ave(X)", zsto,zout) |
---|
1196 | c |
---|
1197 | CALL histdef(nid_mth, "dtlwr", "LW radiation dT", "K/s", |
---|
1198 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1199 | . "ave(X)", zsto,zout) |
---|
1200 | c |
---|
1201 | CALL histdef(nid_mth, "dtlw0", "LW radiation dT", "K/s", |
---|
1202 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1203 | . "ave(X)", zsto,zout) |
---|
1204 | c |
---|
1205 | CALL histdef(nid_mth, "duvdf", "Boundary-layer dU", "m/s2", |
---|
1206 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1207 | . "ave(X)", zsto,zout) |
---|
1208 | c |
---|
1209 | CALL histdef(nid_mth, "dvvdf", "Boundary-layer dV", "m/s2", |
---|
1210 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1211 | . "ave(X)", zsto,zout) |
---|
1212 | c |
---|
1213 | IF (ok_orodr) THEN |
---|
1214 | CALL histdef(nid_mth, "duoro", "Orography dU", "m/s2", |
---|
1215 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1216 | . "ave(X)", zsto,zout) |
---|
1217 | c |
---|
1218 | CALL histdef(nid_mth, "dvoro", "Orography dV", "m/s2", |
---|
1219 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1220 | . "ave(X)", zsto,zout) |
---|
1221 | c |
---|
1222 | ENDIF |
---|
1223 | C |
---|
1224 | IF (ok_orolf) THEN |
---|
1225 | CALL histdef(nid_mth, "dulif", "Orography dU", "m/s2", |
---|
1226 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1227 | . "ave(X)", zsto,zout) |
---|
1228 | c |
---|
1229 | CALL histdef(nid_mth, "dvlif", "Orography dV", "m/s2", |
---|
1230 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1231 | . "ave(X)", zsto,zout) |
---|
1232 | ENDIF |
---|
1233 | C |
---|
1234 | CALL histdef(nid_mth, "ozone", "Ozone concentration", "-", |
---|
1235 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1236 | . "ave(X)", zsto,zout) |
---|
1237 | c |
---|
1238 | if (nqmax.GE.3) THEN |
---|
1239 | DO iq=1,nqmax-2 |
---|
1240 | IF (iq.LE.99) THEN |
---|
1241 | WRITE(str2,'(i2.2)') iq |
---|
1242 | CALL histdef(nid_mth, "trac"//str2, "Tracer No."//str2, "-", |
---|
1243 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1244 | . "ave(X)", zsto,zout) |
---|
1245 | ELSE |
---|
1246 | PRINT*, "Trop de traceurs" |
---|
1247 | CALL abort |
---|
1248 | ENDIF |
---|
1249 | ENDDO |
---|
1250 | ENDIF |
---|
1251 | c |
---|
1252 | CALL histend(nid_mth) |
---|
1253 | c |
---|
1254 | ndex2d = 0 |
---|
1255 | ndex3d = 0 |
---|
1256 | c |
---|
1257 | ENDIF ! fin de test sur ok_mensuel |
---|
1258 | c |
---|
1259 | c |
---|
1260 | IF (ok_instan) THEN |
---|
1261 | c |
---|
1262 | CALL ymds2ju(anne_ini, 1, 1, 0.0, zjulian) |
---|
1263 | zjulian = zjulian + day_ini |
---|
1264 | c |
---|
1265 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlon,zx_lon) |
---|
1266 | DO i = 1, iim |
---|
1267 | zx_lon(i,1) = rlon(i+1) |
---|
1268 | zx_lon(i,jjmp1) = rlon(i+1) |
---|
1269 | ENDDO |
---|
1270 | DO ll=1,klev |
---|
1271 | znivsig(ll)=float(ll) |
---|
1272 | ENDDO |
---|
1273 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat,zx_lat) |
---|
1274 | CALL histbeg("histins", iim,zx_lon, jjmp1,zx_lat, |
---|
1275 | . 1,iim,1,jjmp1, 0, zjulian, dtime, |
---|
1276 | . nhori, nid_ins) |
---|
1277 | c CALL histvert(nid_ins, "presnivs", "Vertical levels", "mb", |
---|
1278 | c . klev, presnivs, nvert) |
---|
1279 | call histvert(nid_ins, 'sig_s', 'Niveaux sigma','-', |
---|
1280 | . klev, znivsig, nvert) |
---|
1281 | c |
---|
1282 | c |
---|
1283 | zsto = dtime * ecrit_ins |
---|
1284 | zout = dtime * ecrit_ins |
---|
1285 | C |
---|
1286 | CALL histdef(nid_ins, "phis", "Surface geop. height", "-", |
---|
1287 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1288 | . "once", zsto,zout) |
---|
1289 | c |
---|
1290 | CALL histdef(nid_ins, "aire", "Grid area", "-", |
---|
1291 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1292 | . "once", zsto,zout) |
---|
1293 | c |
---|
1294 | c Champs 2D: |
---|
1295 | c |
---|
1296 | CALL histdef(nid_ins, "tsol", "Surface Temperature", "K", |
---|
1297 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1298 | . "inst(X)", zsto,zout) |
---|
1299 | c |
---|
1300 | CALL histdef(nid_ins, "psol", "Surface Pressure", "Pa", |
---|
1301 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1302 | . "inst(X)", zsto,zout) |
---|
1303 | c |
---|
1304 | CALL histdef(nid_ins, "topl", "OLR", "W/m2", |
---|
1305 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1306 | . "inst(X)", zsto,zout) |
---|
1307 | c |
---|
1308 | CALL histdef(nid_ins, "evap", "Evaporation", "mm/day", |
---|
1309 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1310 | . "inst(X)", zsto,zout) |
---|
1311 | c |
---|
1312 | CALL histdef(nid_ins, "sols", "Solar rad. at surf.", "W/m2", |
---|
1313 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1314 | . "inst(X)", zsto,zout) |
---|
1315 | c |
---|
1316 | CALL histdef(nid_ins, "soll", "IR rad. at surface", "W/m2", |
---|
1317 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1318 | . "inst(X)", zsto,zout) |
---|
1319 | c |
---|
1320 | CALL histdef(nid_ins, "solldown", "Down. IR rad. at surface", |
---|
1321 | . "W/m2", iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1322 | . "ave(X)", zsto,zout) |
---|
1323 | c |
---|
1324 | CALL histdef(nid_ins, "bils", "Surf. total heat flux", "W/m2", |
---|
1325 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1326 | . "inst(X)", zsto,zout) |
---|
1327 | c |
---|
1328 | CALL histdef(nid_ins, "sens", "Sensible heat flux", "W/m2", |
---|
1329 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1330 | . "inst(X)", zsto,zout) |
---|
1331 | c |
---|
1332 | CALL histdef(nid_ins, "fder", "Heat flux derivation", "W/m2", |
---|
1333 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1334 | . "inst(X)", zsto,zout) |
---|
1335 | c |
---|
1336 | CALL histdef(nid_ins, "dtsvdfo", "Boundary-layer dTs(o)", "K/s", |
---|
1337 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1338 | . "inst(X)", zsto,zout) |
---|
1339 | c |
---|
1340 | CALL histdef(nid_ins, "dtsvdft", "Boundary-layer dTs(t)", "K/s", |
---|
1341 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1342 | . "inst(X)", zsto,zout) |
---|
1343 | c |
---|
1344 | CALL histdef(nid_ins, "dtsvdfg", "Boundary-layer dTs(g)", "K/s", |
---|
1345 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1346 | . "inst(X)", zsto,zout) |
---|
1347 | c |
---|
1348 | CALL histdef(nid_ins, "dtsvdfi", "Boundary-layer dTs(g)", "K/s", |
---|
1349 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1350 | . "inst(X)", zsto,zout) |
---|
1351 | |
---|
1352 | DO nsrf = 1, nbsrf |
---|
1353 | C |
---|
1354 | call histdef(nid_ins, "pourc_"//clnsurf(nsrf), |
---|
1355 | $ "Fraction"//clnsurf(nsrf), "W/m2", |
---|
1356 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1357 | $ "inst(X)", zsto,zout) |
---|
1358 | |
---|
1359 | call histdef(nid_ins, "sens_"//clnsurf(nsrf), |
---|
1360 | $ "Sensible heat flux "//clnsurf(nsrf), "W/m2", |
---|
1361 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1362 | $ "inst(X)", zsto,zout) |
---|
1363 | c |
---|
1364 | call histdef(nid_ins, "tsol_"//clnsurf(nsrf), |
---|
1365 | $ "Surface Temperature"//clnsurf(nsrf), "W/m2", |
---|
1366 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1367 | $ "inst(X)", zsto,zout) |
---|
1368 | c |
---|
1369 | call histdef(nid_ins, "lat_"//clnsurf(nsrf), |
---|
1370 | $ "Latent heat flux "//clnsurf(nsrf), "W/m2", |
---|
1371 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1372 | $ "inst(X)", zsto,zout) |
---|
1373 | C |
---|
1374 | call histdef(nid_ins, "taux_"//clnsurf(nsrf), |
---|
1375 | $ "Zonal wind stress"//clnsurf(nsrf),"Pa", |
---|
1376 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1377 | $ "inst(X)", zsto,zout) |
---|
1378 | |
---|
1379 | call histdef(nid_ins, "tauy_"//clnsurf(nsrf), |
---|
1380 | $ "Meridional xind stress "//clnsurf(nsrf), "Pa", |
---|
1381 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1382 | $ "inst(X)", zsto,zout) |
---|
1383 | c |
---|
1384 | call histdef(nid_ins, "albe_"//clnsurf(nsrf), |
---|
1385 | $ "Albedo surf. "//clnsurf(nsrf), "-", |
---|
1386 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1387 | $ "inst(X)", zsto,zout) |
---|
1388 | c |
---|
1389 | call histdef(nid_ins, "rugs_"//clnsurf(nsrf), |
---|
1390 | $ "rugosite "//clnsurf(nsrf), "-", |
---|
1391 | $ iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1392 | $ "inst(X)", zsto,zout) |
---|
1393 | C§§§ |
---|
1394 | END DO |
---|
1395 | CALL histdef(nid_ins, "rugs", "rugosity", "-", |
---|
1396 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1397 | . "inst(X)", zsto,zout) |
---|
1398 | |
---|
1399 | c |
---|
1400 | CALL histdef(nid_ins, "albs", "Surface albedo", "-", |
---|
1401 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1402 | . "inst(X)", zsto,zout) |
---|
1403 | c |
---|
1404 | CALL histdef(nid_ins, "snow_cov", "Snow cover", "mm", |
---|
1405 | . iim,jjmp1,nhori, 1,1,1, -99, 32, |
---|
1406 | . "inst(X)", zsto,zout) |
---|
1407 | c |
---|
1408 | c Champs 3D: |
---|
1409 | c |
---|
1410 | CALL histdef(nid_ins, "temp", "Temperature", "K", |
---|
1411 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1412 | . "inst(X)", zsto,zout) |
---|
1413 | c |
---|
1414 | CALL histdef(nid_ins, "vitu", "Zonal wind", "m/s", |
---|
1415 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1416 | . "inst(X)", zsto,zout) |
---|
1417 | c |
---|
1418 | CALL histdef(nid_ins, "vitv", "Merid wind", "m/s", |
---|
1419 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1420 | . "inst(X)", zsto,zout) |
---|
1421 | c |
---|
1422 | CALL histdef(nid_ins, "geop", "Geopotential height", "m", |
---|
1423 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1424 | . "inst(X)", zsto,zout) |
---|
1425 | c |
---|
1426 | CALL histdef(nid_ins, "pres", "Air pressure", "Pa", |
---|
1427 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1428 | . "inst(X)", zsto,zout) |
---|
1429 | c |
---|
1430 | CALL histdef(nid_ins, "dtvdf", "Boundary-layer dT", "K/s", |
---|
1431 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1432 | . "inst(X)", zsto,zout) |
---|
1433 | c |
---|
1434 | CALL histdef(nid_ins, "dqvdf", "Boundary-layer dQ", "Kg/Kg/s", |
---|
1435 | . iim,jjmp1,nhori, klev,1,klev,nvert, 32, |
---|
1436 | . "inst(X)", zsto,zout) |
---|
1437 | c |
---|
1438 | |
---|
1439 | CALL histend(nid_ins) |
---|
1440 | c |
---|
1441 | ndex2d = 0 |
---|
1442 | ndex3d = 0 |
---|
1443 | c |
---|
1444 | ENDIF |
---|
1445 | c |
---|
1446 | c |
---|
1447 | c |
---|
1448 | c Prescrire l'ozone dans l'atmosphere |
---|
1449 | c |
---|
1450 | c |
---|
1451 | cc DO i = 1, klon |
---|
1452 | cc DO k = 1, klev |
---|
1453 | cc CALL o3cm (paprs(i,k)/100.,paprs(i,k+1)/100., wo(i,k),20) |
---|
1454 | cc ENDDO |
---|
1455 | cc ENDDO |
---|
1456 | c |
---|
1457 | c |
---|
1458 | ENDIF |
---|
1459 | c |
---|
1460 | c **************** Fin de IF ( debut ) *************** |
---|
1461 | c |
---|
1462 | c |
---|
1463 | c Mettre a zero des variables de sortie (pour securite) |
---|
1464 | c |
---|
1465 | DO i = 1, klon |
---|
1466 | d_ps(i) = 0.0 |
---|
1467 | ENDDO |
---|
1468 | DO k = 1, klev |
---|
1469 | DO i = 1, klon |
---|
1470 | d_t(i,k) = 0.0 |
---|
1471 | d_u(i,k) = 0.0 |
---|
1472 | d_v(i,k) = 0.0 |
---|
1473 | ENDDO |
---|
1474 | ENDDO |
---|
1475 | DO iq = 1, nqmax |
---|
1476 | DO k = 1, klev |
---|
1477 | DO i = 1, klon |
---|
1478 | d_qx(i,k,iq) = 0.0 |
---|
1479 | ENDDO |
---|
1480 | ENDDO |
---|
1481 | ENDDO |
---|
1482 | c |
---|
1483 | c Ne pas affecter les valeurs entrees de u, v, h, et q |
---|
1484 | c |
---|
1485 | DO k = 1, klev |
---|
1486 | DO i = 1, klon |
---|
1487 | t_seri(i,k) = t(i,k) |
---|
1488 | u_seri(i,k) = u(i,k) |
---|
1489 | v_seri(i,k) = v(i,k) |
---|
1490 | q_seri(i,k) = qx(i,k,ivap) |
---|
1491 | ql_seri(i,k) = qx(i,k,iliq) |
---|
1492 | ENDDO |
---|
1493 | ENDDO |
---|
1494 | IF (nqmax.GE.3) THEN |
---|
1495 | DO iq = 3, nqmax |
---|
1496 | DO k = 1, klev |
---|
1497 | DO i = 1, klon |
---|
1498 | tr_seri(i,k,iq-2) = qx(i,k,iq) |
---|
1499 | ENDDO |
---|
1500 | ENDDO |
---|
1501 | ENDDO |
---|
1502 | ELSE |
---|
1503 | DO k = 1, klev |
---|
1504 | DO i = 1, klon |
---|
1505 | tr_seri(i,k,1) = 0.0 |
---|
1506 | ENDDO |
---|
1507 | ENDDO |
---|
1508 | ENDIF |
---|
1509 | c |
---|
1510 | c Diagnostiquer la tendance dynamique |
---|
1511 | c |
---|
1512 | IF (ancien_ok) THEN |
---|
1513 | DO k = 1, klev |
---|
1514 | DO i = 1, klon |
---|
1515 | d_t_dyn(i,k) = (t_seri(i,k)-t_ancien(i,k))/dtime |
---|
1516 | d_q_dyn(i,k) = (q_seri(i,k)-q_ancien(i,k))/dtime |
---|
1517 | ENDDO |
---|
1518 | ENDDO |
---|
1519 | ELSE |
---|
1520 | DO k = 1, klev |
---|
1521 | DO i = 1, klon |
---|
1522 | d_t_dyn(i,k) = 0.0 |
---|
1523 | d_q_dyn(i,k) = 0.0 |
---|
1524 | ENDDO |
---|
1525 | ENDDO |
---|
1526 | ancien_ok = .TRUE. |
---|
1527 | ENDIF |
---|
1528 | c |
---|
1529 | c Ajouter le geopotentiel du sol: |
---|
1530 | c |
---|
1531 | DO k = 1, klev |
---|
1532 | DO i = 1, klon |
---|
1533 | zphi(i,k) = pphi(i,k) + pphis(i) |
---|
1534 | ENDDO |
---|
1535 | ENDDO |
---|
1536 | c |
---|
1537 | c Verifier les temperatures |
---|
1538 | c |
---|
1539 | CALL hgardfou(t_seri,ftsol,'debutphy') |
---|
1540 | c |
---|
1541 | c Incrementer le compteur de la physique |
---|
1542 | c |
---|
1543 | itap = itap + 1 |
---|
1544 | julien = MOD(NINT(xjour),360) |
---|
1545 | c |
---|
1546 | c Mettre en action les conditions aux limites (albedo, sst, etc.). |
---|
1547 | c Prescrire l'ozone et calculer l'albedo sur l'ocean. |
---|
1548 | c |
---|
1549 | IF (MOD(itap-1,lmt_pas) .EQ. 0) THEN |
---|
1550 | idayvrai = NINT(xjour) |
---|
1551 | PRINT *,' PHYS cond julien ',julien,idayvrai |
---|
1552 | CALL ozonecm( FLOAT(julien), rlat, paprs, wo) |
---|
1553 | ENDIF |
---|
1554 | c |
---|
1555 | c Re-evaporer l'eau liquide nuageuse |
---|
1556 | c |
---|
1557 | DO k = 1, klev ! re-evaporation de l'eau liquide nuageuse |
---|
1558 | DO i = 1, klon |
---|
1559 | zlvdcp=RLVTT/RCPD/(1.0+RVTMP2*q_seri(i,k)) |
---|
1560 | zlsdcp=RLSTT/RCPD/(1.0+RVTMP2*q_seri(i,k)) |
---|
1561 | zdelta = MAX(0.,SIGN(1.,RTT-t_seri(i,k))) |
---|
1562 | zb = MAX(0.0,ql_seri(i,k)) |
---|
1563 | za = - MAX(0.0,ql_seri(i,k)) |
---|
1564 | . * (zlvdcp*(1.-zdelta)+zlsdcp*zdelta) |
---|
1565 | t_seri(i,k) = t_seri(i,k) + za |
---|
1566 | q_seri(i,k) = q_seri(i,k) + zb |
---|
1567 | ql_seri(i,k) = 0.0 |
---|
1568 | d_t_eva(i,k) = za |
---|
1569 | d_q_eva(i,k) = zb |
---|
1570 | ENDDO |
---|
1571 | ENDDO |
---|
1572 | c |
---|
1573 | c Appeler la diffusion verticale (programme de couche limite) |
---|
1574 | c |
---|
1575 | DO i = 1, klon |
---|
1576 | c if (.not. ok_veget) then |
---|
1577 | c frugs(i,is_ter) = SQRT(frugs(i,is_ter)**2+rugoro(i)**2) |
---|
1578 | c endif |
---|
1579 | c frugs(i,is_lic) = rugoro(i) |
---|
1580 | c frugs(i,is_oce) = rugmer(i) |
---|
1581 | c frugs(i,is_sic) = 0.001 |
---|
1582 | zxrugs(i) = 0.0 |
---|
1583 | ENDDO |
---|
1584 | DO nsrf = 1, nbsrf |
---|
1585 | DO i = 1, klon |
---|
1586 | frugs(i,nsrf) = MAX(frugs(i,nsrf),0.001) |
---|
1587 | ENDDO |
---|
1588 | ENDDO |
---|
1589 | DO nsrf = 1, nbsrf |
---|
1590 | DO i = 1, klon |
---|
1591 | zxrugs(i) = zxrugs(i) + frugs(i,nsrf)*pctsrf(i,nsrf) |
---|
1592 | ENDDO |
---|
1593 | ENDDO |
---|
1594 | c |
---|
1595 | C calculs necessaires au calcul de l'albedo dans l'interface |
---|
1596 | c |
---|
1597 | CALL orbite(FLOAT(julien),zlongi,dist) |
---|
1598 | IF (cycle_diurne) THEN |
---|
1599 | zdtime=dtime*FLOAT(radpas) ! pas de temps du rayonnement (s) |
---|
1600 | CALL zenang(zlongi,gmtime,zdtime,rlat,rlon,rmu0,fract) |
---|
1601 | ELSE |
---|
1602 | rmu0 = -999.999 |
---|
1603 | ENDIF |
---|
1604 | |
---|
1605 | fder = 0. |
---|
1606 | date0 = day_ini |
---|
1607 | |
---|
1608 | CALL clmain(dtime,itap,date0,pctsrf, |
---|
1609 | e t_seri,q_seri,u_seri,v_seri, |
---|
1610 | e julien, rmu0, |
---|
1611 | e ok_veget, ocean, npas, nexca, ftsol, |
---|
1612 | $ soil_model,ftsoil, |
---|
1613 | $ paprs,pplay,radsol, fsnow,fqsol,fevap,falbe,fluxlat, |
---|
1614 | e rain_fall, snow_fall, solsw, sollw, sollwdown, fder, |
---|
1615 | e rlon, rlat, cufi, cvfi, frugs, |
---|
1616 | e debut, lafin, agesno,rugoro , |
---|
1617 | s d_t_vdf,d_q_vdf,d_u_vdf,d_v_vdf,d_ts, |
---|
1618 | s fluxt,fluxq,fluxu,fluxv,cdragh,cdragm, |
---|
1619 | s dsens, devap, |
---|
1620 | s ycoefh,yu1,yv1) |
---|
1621 | |
---|
1622 | c |
---|
1623 | C§§§ PB |
---|
1624 | C§§§ Incrementation des flux |
---|
1625 | C§§ |
---|
1626 | zxfluxt=0. |
---|
1627 | zxfluxq=0. |
---|
1628 | zxfluxu=0. |
---|
1629 | zxfluxv=0. |
---|
1630 | DO nsrf = 1, nbsrf |
---|
1631 | DO k = 1, klev |
---|
1632 | DO i = 1, klon |
---|
1633 | zxfluxt(i,k) = zxfluxt(i,k) + |
---|
1634 | $ fluxt(i,k,nsrf) * pctsrf( i, nsrf) |
---|
1635 | zxfluxq(i,k) = zxfluxq(i,k) + |
---|
1636 | $ fluxq(i,k,nsrf) * pctsrf( i, nsrf) |
---|
1637 | zxfluxu(i,k) = zxfluxu(i,k) + |
---|
1638 | $ fluxu(i,k,nsrf) * pctsrf( i, nsrf) |
---|
1639 | zxfluxv(i,k) = zxfluxv(i,k) + |
---|
1640 | $ fluxv(i,k,nsrf) * pctsrf( i, nsrf) |
---|
1641 | END DO |
---|
1642 | END DO |
---|
1643 | END DO |
---|
1644 | DO i = 1, klon |
---|
1645 | sens(i) = - zxfluxt(i,1) ! flux de chaleur sensible au sol |
---|
1646 | c evap(i) = - fluxq(i,1) ! flux d'evaporation au sol |
---|
1647 | evap(i) = - zxfluxq(i,1) ! flux d'evaporation au sol |
---|
1648 | C LF test signe flux |
---|
1649 | sens(i) = zxfluxt(i,1) |
---|
1650 | evap(i) = zxfluxq(i,1) |
---|
1651 | fder(i) = dsens(i) + devap(i) |
---|
1652 | ENDDO |
---|
1653 | |
---|
1654 | DO k = 1, klev |
---|
1655 | DO i = 1, klon |
---|
1656 | t_seri(i,k) = t_seri(i,k) + d_t_vdf(i,k) |
---|
1657 | q_seri(i,k) = q_seri(i,k) + d_q_vdf(i,k) |
---|
1658 | u_seri(i,k) = u_seri(i,k) + d_u_vdf(i,k) |
---|
1659 | v_seri(i,k) = v_seri(i,k) + d_v_vdf(i,k) |
---|
1660 | ENDDO |
---|
1661 | ENDDO |
---|
1662 | c |
---|
1663 | c Incrementer la temperature du sol |
---|
1664 | c |
---|
1665 | DO i = 1, klon |
---|
1666 | zxtsol(i) = 0.0 |
---|
1667 | IF ( abs( pctsrf(i, is_ter) + pctsrf(i, is_lic) + |
---|
1668 | $ pctsrf(i, is_oce) + pctsrf(i, is_sic) - 1.) .GT. EPSFRA) |
---|
1669 | $ THEN |
---|
1670 | WRITE(*,*) 'physiq : pb sous surface au point ', i, |
---|
1671 | $ pctsrf(i, 1 : nbsrf) |
---|
1672 | ENDIF |
---|
1673 | ENDDO |
---|
1674 | DO nsrf = 1, nbsrf |
---|
1675 | DO i = 1, klon |
---|
1676 | c$$$ IF (pctsrf(i,nsrf) .GE. EPSFRA) THEN |
---|
1677 | ftsol(i,nsrf) = ftsol(i,nsrf) + d_ts(i,nsrf) |
---|
1678 | zxtsol(i) = zxtsol(i) + ftsol(i,nsrf)*pctsrf(i,nsrf) |
---|
1679 | c$$$ ENDIF |
---|
1680 | ENDDO |
---|
1681 | ENDDO |
---|
1682 | |
---|
1683 | c |
---|
1684 | c Si une sous-fraction n'existe pas, elle prend la temp. moyenne |
---|
1685 | c |
---|
1686 | DO nsrf = 1, nbsrf |
---|
1687 | DO i = 1, klon |
---|
1688 | IF (pctsrf(i,nsrf).LT.epsfra) ftsol(i,nsrf) = zxtsol(i) |
---|
1689 | ENDDO |
---|
1690 | ENDDO |
---|
1691 | |
---|
1692 | c |
---|
1693 | c Calculer la derive du flux infrarouge |
---|
1694 | c |
---|
1695 | DO nsrf = 1, nbsrf |
---|
1696 | DO i = 1, klon |
---|
1697 | fder(i) = fder(i) - 4.0*RSIGMA*zxtsol(i)**3 * |
---|
1698 | . (ftsol(i,nsrf)-zxtsol(i)) |
---|
1699 | . *pctsrf(i,nsrf) |
---|
1700 | ENDDO |
---|
1701 | ENDDO |
---|
1702 | c |
---|
1703 | c Appeler la convection (au choix) |
---|
1704 | c |
---|
1705 | DO k = 1, klev |
---|
1706 | DO i = 1, klon |
---|
1707 | conv_q(i,k) = d_q_dyn(i,k) |
---|
1708 | . + d_q_vdf(i,k)/dtime |
---|
1709 | conv_t(i,k) = d_t_dyn(i,k) |
---|
1710 | . + d_t_vdf(i,k)/dtime |
---|
1711 | ENDDO |
---|
1712 | ENDDO |
---|
1713 | IF (check) THEN |
---|
1714 | za = qcheck(klon,klev,paprs,q_seri,ql_seri,paire) |
---|
1715 | PRINT*, "avantcon=", za |
---|
1716 | ENDIF |
---|
1717 | zx_ajustq = .FALSE. |
---|
1718 | IF (iflag_con.EQ.2) zx_ajustq=.TRUE. |
---|
1719 | IF (zx_ajustq) THEN |
---|
1720 | DO i = 1, klon |
---|
1721 | z_avant(i) = 0.0 |
---|
1722 | ENDDO |
---|
1723 | DO k = 1, klev |
---|
1724 | DO i = 1, klon |
---|
1725 | z_avant(i) = z_avant(i) + (q_seri(i,k)+ql_seri(i,k)) |
---|
1726 | . *(paprs(i,k)-paprs(i,k+1))/RG |
---|
1727 | ENDDO |
---|
1728 | ENDDO |
---|
1729 | ENDIF |
---|
1730 | IF (iflag_con.EQ.1) THEN |
---|
1731 | stop'reactiver le call conlmd dans physiq.F' |
---|
1732 | c CALL conlmd (dtime, paprs, pplay, t_seri, q_seri, conv_q, |
---|
1733 | c . d_t_con, d_q_con, |
---|
1734 | c . rain_con, snow_con, ibas_con, itop_con) |
---|
1735 | ELSE IF (iflag_con.EQ.2) THEN |
---|
1736 | CALL conflx(dtime, paprs, pplay, t_seri, q_seri, |
---|
1737 | e conv_t, conv_q, zxfluxq(1,1), omega, |
---|
1738 | s d_t_con, d_q_con, rain_con, snow_con, |
---|
1739 | s pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, |
---|
1740 | s kcbot, kctop, kdtop, pmflxr, pmflxs) |
---|
1741 | WHERE (rain_con < 0.) rain_con = 0. |
---|
1742 | WHERE (snow_con < 0.) snow_con = 0. |
---|
1743 | DO i = 1, klon |
---|
1744 | ibas_con(i) = klev+1 - kcbot(i) |
---|
1745 | itop_con(i) = klev+1 - kctop(i) |
---|
1746 | ENDDO |
---|
1747 | ELSE IF (iflag_con.EQ.3) THEN |
---|
1748 | stop'reactiver le call conlmd dans physiq.F' |
---|
1749 | c CALL conccm (dtime,paprs,pplay,t_seri,q_seri,conv_q, |
---|
1750 | c s d_t_con, d_q_con, |
---|
1751 | c s rain_con, snow_con, ibas_con, itop_con) |
---|
1752 | ELSE |
---|
1753 | PRINT*, "iflag_con non-prevu", iflag_con |
---|
1754 | CALL abort |
---|
1755 | ENDIF |
---|
1756 | |
---|
1757 | CALL homogene(paprs, q_seri, d_q_con, u_seri,v_seri, |
---|
1758 | . d_u_con, d_v_con) |
---|
1759 | DO k = 1, klev |
---|
1760 | DO i = 1, klon |
---|
1761 | t_seri(i,k) = t_seri(i,k) + d_t_con(i,k) |
---|
1762 | q_seri(i,k) = q_seri(i,k) + d_q_con(i,k) |
---|
1763 | u_seri(i,k) = u_seri(i,k) + d_u_con(i,k) |
---|
1764 | v_seri(i,k) = v_seri(i,k) + d_v_con(i,k) |
---|
1765 | ENDDO |
---|
1766 | ENDDO |
---|
1767 | IF (check) THEN |
---|
1768 | za = qcheck(klon,klev,paprs,q_seri,ql_seri,paire) |
---|
1769 | PRINT*, "aprescon=", za |
---|
1770 | zx_t = 0.0 |
---|
1771 | za = 0.0 |
---|
1772 | DO i = 1, klon |
---|
1773 | za = za + paire(i)/FLOAT(klon) |
---|
1774 | zx_t = zx_t + (rain_con(i)+snow_con(i))*paire(i)/FLOAT(klon) |
---|
1775 | ENDDO |
---|
1776 | zx_t = zx_t/za*dtime |
---|
1777 | PRINT*, "Precip=", zx_t |
---|
1778 | ENDIF |
---|
1779 | IF (zx_ajustq) THEN |
---|
1780 | DO i = 1, klon |
---|
1781 | z_apres(i) = 0.0 |
---|
1782 | ENDDO |
---|
1783 | DO k = 1, klev |
---|
1784 | DO i = 1, klon |
---|
1785 | z_apres(i) = z_apres(i) + (q_seri(i,k)+ql_seri(i,k)) |
---|
1786 | . *(paprs(i,k)-paprs(i,k+1))/RG |
---|
1787 | ENDDO |
---|
1788 | ENDDO |
---|
1789 | DO i = 1, klon |
---|
1790 | z_factor(i) = (z_avant(i)-(rain_con(i)+snow_con(i))*dtime) |
---|
1791 | . /z_apres(i) |
---|
1792 | ENDDO |
---|
1793 | DO k = 1, klev |
---|
1794 | DO i = 1, klon |
---|
1795 | IF (z_factor(i).GT.(1.0+1.0E-08) .OR. |
---|
1796 | . z_factor(i).LT.(1.0-1.0E-08)) THEN |
---|
1797 | q_seri(i,k) = q_seri(i,k) * z_factor(i) |
---|
1798 | ENDIF |
---|
1799 | ENDDO |
---|
1800 | ENDDO |
---|
1801 | ENDIF |
---|
1802 | zx_ajustq=.FALSE. |
---|
1803 | c |
---|
1804 | IF (nqmax.GT.2) THEN !--melange convectif de traceurs |
---|
1805 | c |
---|
1806 | IF (iflag_con.NE.2) THEN |
---|
1807 | PRINT*, "Pour l instant, seul conflx fonctionne avec traceurs" |
---|
1808 | PRINT*,' Mettre iflag_con = 2 dans run.def et repasser !' |
---|
1809 | CALL abort |
---|
1810 | ENDIF |
---|
1811 | c |
---|
1812 | ENDIF !--nqmax.GT.2 |
---|
1813 | c |
---|
1814 | c Appeler l'ajustement sec |
---|
1815 | c |
---|
1816 | CALL ajsec(paprs, pplay, t_seri, q_seri, d_t_ajs, d_q_ajs) |
---|
1817 | DO k = 1, klev |
---|
1818 | DO i = 1, klon |
---|
1819 | t_seri(i,k) = t_seri(i,k) + d_t_ajs(i,k) |
---|
1820 | q_seri(i,k) = q_seri(i,k) + d_q_ajs(i,k) |
---|
1821 | ENDDO |
---|
1822 | ENDDO |
---|
1823 | c |
---|
1824 | c Appeler le processus de condensation a grande echelle |
---|
1825 | c et le processus de precipitation |
---|
1826 | c |
---|
1827 | CALL fisrtilp_tr(dtime,paprs,pplay, |
---|
1828 | . t_seri, q_seri, |
---|
1829 | . d_t_lsc, d_q_lsc, d_ql_lsc, rneb, cldliq, |
---|
1830 | . rain_lsc, snow_lsc, |
---|
1831 | . pfrac_impa, pfrac_nucl, pfrac_1nucl, |
---|
1832 | . frac_impa, frac_nucl, |
---|
1833 | . prfl, psfl) |
---|
1834 | WHERE (rain_lsc < 0) rain_lsc = 0. |
---|
1835 | WHERE (snow_lsc < 0) snow_lsc = 0. |
---|
1836 | DO k = 1, klev |
---|
1837 | DO i = 1, klon |
---|
1838 | t_seri(i,k) = t_seri(i,k) + d_t_lsc(i,k) |
---|
1839 | q_seri(i,k) = q_seri(i,k) + d_q_lsc(i,k) |
---|
1840 | ql_seri(i,k) = ql_seri(i,k) + d_ql_lsc(i,k) |
---|
1841 | cldfra(i,k) = rneb(i,k) |
---|
1842 | IF (.NOT.new_oliq) cldliq(i,k) = ql_seri(i,k) |
---|
1843 | ENDDO |
---|
1844 | ENDDO |
---|
1845 | IF (check) THEN |
---|
1846 | za = qcheck(klon,klev,paprs,q_seri,ql_seri,paire) |
---|
1847 | PRINT*, "apresilp=", za |
---|
1848 | zx_t = 0.0 |
---|
1849 | za = 0.0 |
---|
1850 | DO i = 1, klon |
---|
1851 | za = za + paire(i)/FLOAT(klon) |
---|
1852 | zx_t = zx_t + (rain_lsc(i)+snow_lsc(i))*paire(i)/FLOAT(klon) |
---|
1853 | ENDDO |
---|
1854 | zx_t = zx_t/za*dtime |
---|
1855 | PRINT*, "Precip=", zx_t |
---|
1856 | ENDIF |
---|
1857 | c |
---|
1858 | c Nuages diagnostiques: |
---|
1859 | c |
---|
1860 | IF (iflag_con.EQ.2) THEN ! seulement pour Tiedtke |
---|
1861 | CALL diagcld1(paprs,pplay, |
---|
1862 | . rain_con,snow_con,ibas_con,itop_con, |
---|
1863 | . diafra,dialiq) |
---|
1864 | DO k = 1, klev |
---|
1865 | DO i = 1, klon |
---|
1866 | IF (diafra(i,k).GT.cldfra(i,k)) THEN |
---|
1867 | cldliq(i,k) = dialiq(i,k) |
---|
1868 | cldfra(i,k) = diafra(i,k) |
---|
1869 | ENDIF |
---|
1870 | ENDDO |
---|
1871 | ENDDO |
---|
1872 | ENDIF |
---|
1873 | c |
---|
1874 | c Nuages stratus artificiels: |
---|
1875 | c |
---|
1876 | IF (ok_stratus) THEN |
---|
1877 | CALL diagcld2(paprs,pplay,t_seri,q_seri, diafra,dialiq) |
---|
1878 | DO k = 1, klev |
---|
1879 | DO i = 1, klon |
---|
1880 | IF (diafra(i,k).GT.cldfra(i,k)) THEN |
---|
1881 | cldliq(i,k) = dialiq(i,k) |
---|
1882 | cldfra(i,k) = diafra(i,k) |
---|
1883 | ENDIF |
---|
1884 | ENDDO |
---|
1885 | ENDDO |
---|
1886 | ENDIF |
---|
1887 | c |
---|
1888 | c Precipitation totale |
---|
1889 | c |
---|
1890 | DO i = 1, klon |
---|
1891 | rain_fall(i) = rain_con(i) + rain_lsc(i) |
---|
1892 | snow_fall(i) = snow_con(i) + snow_lsc(i) |
---|
1893 | ENDDO |
---|
1894 | c |
---|
1895 | c Calculer l'humidite relative pour diagnostique |
---|
1896 | c |
---|
1897 | DO k = 1, klev |
---|
1898 | DO i = 1, klon |
---|
1899 | zx_t = t_seri(i,k) |
---|
1900 | IF (thermcep) THEN |
---|
1901 | zdelta = MAX(0.,SIGN(1.,rtt-zx_t)) |
---|
1902 | zx_qs = r2es * FOEEW(zx_t,zdelta)/pplay(i,k) |
---|
1903 | zx_qs = MIN(0.5,zx_qs) |
---|
1904 | zcor = 1./(1.-retv*zx_qs) |
---|
1905 | zx_qs = zx_qs*zcor |
---|
1906 | ELSE |
---|
1907 | IF (zx_t.LT.t_coup) THEN |
---|
1908 | zx_qs = qsats(zx_t)/pplay(i,k) |
---|
1909 | ELSE |
---|
1910 | zx_qs = qsatl(zx_t)/pplay(i,k) |
---|
1911 | ENDIF |
---|
1912 | ENDIF |
---|
1913 | zx_rh(i,k) = q_seri(i,k)/zx_qs |
---|
1914 | ENDDO |
---|
1915 | ENDDO |
---|
1916 | c |
---|
1917 | c Calculer les parametres optiques des nuages et quelques |
---|
1918 | c parametres pour diagnostiques: |
---|
1919 | c |
---|
1920 | CALL nuage (paprs, pplay, |
---|
1921 | . t_seri, cldliq, cldfra, cldtau, cldemi, |
---|
1922 | . cldh, cldl, cldm, cldt, cldq) |
---|
1923 | c |
---|
1924 | c Appeler le rayonnement mais calculer tout d'abord l'albedo du sol. |
---|
1925 | c |
---|
1926 | IF (MOD(itaprad,radpas).EQ.0) THEN |
---|
1927 | DO i = 1, klon |
---|
1928 | albsol(i) = falbe(i,is_oce) * pctsrf(i,is_oce) |
---|
1929 | . + falbe(i,is_lic) * pctsrf(i,is_lic) |
---|
1930 | . + falbe(i,is_ter) * pctsrf(i,is_ter) |
---|
1931 | . + falbe(i,is_sic) * pctsrf(i,is_sic) |
---|
1932 | ENDDO |
---|
1933 | CALL radlwsw ! nouveau rayonnement (compatible Arpege-IFS) |
---|
1934 | e (dist, rmu0, fract, co2_ppm, solaire, |
---|
1935 | e paprs, pplay,zxtsol,albsol, t_seri,q_seri,wo, |
---|
1936 | e cldfra, cldemi, cldtau, |
---|
1937 | s heat,heat0,cool,cool0,radsol,albpla, |
---|
1938 | s topsw,toplw,solsw,sollw, |
---|
1939 | s sollwdown, |
---|
1940 | s topsw0,toplw0,solsw0,sollw0) |
---|
1941 | itaprad = 0 |
---|
1942 | ENDIF |
---|
1943 | itaprad = itaprad + 1 |
---|
1944 | c |
---|
1945 | c Ajouter la tendance des rayonnements (tous les pas) |
---|
1946 | c |
---|
1947 | DO k = 1, klev |
---|
1948 | DO i = 1, klon |
---|
1949 | t_seri(i,k) = t_seri(i,k) |
---|
1950 | . + (heat(i,k)-cool(i,k)) * dtime/86400. |
---|
1951 | ENDDO |
---|
1952 | ENDDO |
---|
1953 | c |
---|
1954 | c Calculer l'hydrologie de la surface |
---|
1955 | c |
---|
1956 | c CALL hydrol(dtime,pctsrf,rain_fall, snow_fall, zxevap, |
---|
1957 | c . agesno, ftsol,fqsol,fsnow, ruis) |
---|
1958 | c |
---|
1959 | DO i = 1, klon |
---|
1960 | zxqsol(i) = 0.0 |
---|
1961 | zxsnow(i) = 0.0 |
---|
1962 | ENDDO |
---|
1963 | DO nsrf = 1, nbsrf |
---|
1964 | DO i = 1, klon |
---|
1965 | zxqsol(i) = zxqsol(i) + fqsol(i,nsrf)*pctsrf(i,nsrf) |
---|
1966 | zxsnow(i) = zxsnow(i) + fsnow(i,nsrf)*pctsrf(i,nsrf) |
---|
1967 | ENDDO |
---|
1968 | ENDDO |
---|
1969 | c |
---|
1970 | c Si une sous-fraction n'existe pas, elle prend la valeur moyenne |
---|
1971 | c |
---|
1972 | c$$$ DO nsrf = 1, nbsrf |
---|
1973 | c$$$ DO i = 1, klon |
---|
1974 | c$$$ IF (pctsrf(i,nsrf).LT.epsfra) THEN |
---|
1975 | c$$$ fqsol(i,nsrf) = zxqsol(i) |
---|
1976 | c$$$ fsnow(i,nsrf) = zxsnow(i) |
---|
1977 | c$$$ ENDIF |
---|
1978 | c$$$ ENDDO |
---|
1979 | c$$$ ENDDO |
---|
1980 | c |
---|
1981 | c Calculer le bilan du sol et la derive de temperature (couplage) |
---|
1982 | c |
---|
1983 | DO i = 1, klon |
---|
1984 | bils(i) = radsol(i) - sens(i) - evap(i)*RLVTT |
---|
1985 | ENDDO |
---|
1986 | c |
---|
1987 | cmoddeblott(jan95) |
---|
1988 | c Appeler le programme de parametrisation de l'orographie |
---|
1989 | c a l'echelle sous-maille: |
---|
1990 | c |
---|
1991 | IF (ok_orodr) THEN |
---|
1992 | c |
---|
1993 | c selection des points pour lesquels le shema est actif: |
---|
1994 | igwd=0 |
---|
1995 | DO i=1,klon |
---|
1996 | itest(i)=0 |
---|
1997 | c IF ((zstd(i).gt.10.0)) THEN |
---|
1998 | IF (((zpic(i)-zmea(i)).GT.100.).AND.(zstd(i).GT.10.0)) THEN |
---|
1999 | itest(i)=1 |
---|
2000 | igwd=igwd+1 |
---|
2001 | idx(igwd)=i |
---|
2002 | ENDIF |
---|
2003 | ENDDO |
---|
2004 | c igwdim=MAX(1,igwd) |
---|
2005 | c |
---|
2006 | CALL drag_noro(klon,klev,dtime,paprs,pplay, |
---|
2007 | e zmea,zstd, zsig, zgam, zthe,zpic,zval, |
---|
2008 | e igwd,idx,itest, |
---|
2009 | e t_seri, u_seri, v_seri, |
---|
2010 | s zulow, zvlow, zustr, zvstr, |
---|
2011 | s d_t_oro, d_u_oro, d_v_oro) |
---|
2012 | c |
---|
2013 | c ajout des tendances |
---|
2014 | DO k = 1, klev |
---|
2015 | DO i = 1, klon |
---|
2016 | t_seri(i,k) = t_seri(i,k) + d_t_oro(i,k) |
---|
2017 | u_seri(i,k) = u_seri(i,k) + d_u_oro(i,k) |
---|
2018 | v_seri(i,k) = v_seri(i,k) + d_v_oro(i,k) |
---|
2019 | ENDDO |
---|
2020 | ENDDO |
---|
2021 | c |
---|
2022 | ENDIF ! fin de test sur ok_orodr |
---|
2023 | c |
---|
2024 | IF (ok_orolf) THEN |
---|
2025 | c |
---|
2026 | c selection des points pour lesquels le shema est actif: |
---|
2027 | igwd=0 |
---|
2028 | DO i=1,klon |
---|
2029 | itest(i)=0 |
---|
2030 | IF ((zpic(i)-zmea(i)).GT.100.) THEN |
---|
2031 | itest(i)=1 |
---|
2032 | igwd=igwd+1 |
---|
2033 | idx(igwd)=i |
---|
2034 | ENDIF |
---|
2035 | ENDDO |
---|
2036 | c igwdim=MAX(1,igwd) |
---|
2037 | c |
---|
2038 | CALL lift_noro(klon,klev,dtime,paprs,pplay, |
---|
2039 | e rlat,zmea,zstd,zpic, |
---|
2040 | e itest, |
---|
2041 | e t_seri, u_seri, v_seri, |
---|
2042 | s zulow, zvlow, zustr, zvstr, |
---|
2043 | s d_t_lif, d_u_lif, d_v_lif) |
---|
2044 | c |
---|
2045 | c ajout des tendances |
---|
2046 | DO k = 1, klev |
---|
2047 | DO i = 1, klon |
---|
2048 | t_seri(i,k) = t_seri(i,k) + d_t_lif(i,k) |
---|
2049 | u_seri(i,k) = u_seri(i,k) + d_u_lif(i,k) |
---|
2050 | v_seri(i,k) = v_seri(i,k) + d_v_lif(i,k) |
---|
2051 | ENDDO |
---|
2052 | ENDDO |
---|
2053 | c |
---|
2054 | ENDIF ! fin de test sur ok_orolf |
---|
2055 | c |
---|
2056 | cAA |
---|
2057 | cAA Installation de l'interface online-offline pour traceurs |
---|
2058 | cAA |
---|
2059 | c==================================================================== |
---|
2060 | c Calcul des tendances traceurs |
---|
2061 | c==================================================================== |
---|
2062 | CMAF modif pour garder info du nombre de traceurs auxquels |
---|
2063 | C la physique s'applique |
---|
2064 | C |
---|
2065 | call phytrac (rnpb, |
---|
2066 | I debut, |
---|
2067 | I nqmax-2, |
---|
2068 | I nlon,nlev,dtime, |
---|
2069 | I t,paprs,pplay, |
---|
2070 | I pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, |
---|
2071 | I ycoefh,yu1,yv1,ftsol,pctsrf,rlat, |
---|
2072 | I frac_impa, frac_nucl, |
---|
2073 | I rlon,presnivs,paire,pphis, |
---|
2074 | O tr_seri) |
---|
2075 | |
---|
2076 | IF (offline) THEN |
---|
2077 | |
---|
2078 | call phystokenc ( |
---|
2079 | I nlon,nlev,pdtphys,rlon,rlat, |
---|
2080 | I pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, |
---|
2081 | I ycoefh,yu1,yv1,ftsol,pctsrf, |
---|
2082 | I frac_impa, frac_nucl, |
---|
2083 | I pphis,paire,dtime,itap, |
---|
2084 | O physid) |
---|
2085 | |
---|
2086 | ENDIF |
---|
2087 | |
---|
2088 | c |
---|
2089 | c Calculer le transport de l'eau et de l'energie (diagnostique) |
---|
2090 | c |
---|
2091 | CALL transp (paprs,zxtsol, |
---|
2092 | e t_seri, q_seri, u_seri, v_seri, zphi, |
---|
2093 | s ve, vq, ue, uq) |
---|
2094 | c |
---|
2095 | c Accumuler les variables a stocker dans les fichiers histoire: |
---|
2096 | c |
---|
2097 | c |
---|
2098 | c |
---|
2099 | |
---|
2100 | IF (ok_journe) THEN |
---|
2101 | c |
---|
2102 | ndex2d = 0 |
---|
2103 | ndex3d = 0 |
---|
2104 | c |
---|
2105 | c Champs 2D: |
---|
2106 | c |
---|
2107 | zsto = dtime |
---|
2108 | zout = dtime * FLOAT(ecrit_day) |
---|
2109 | |
---|
2110 | i = NINT(zout/zsto) |
---|
2111 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,pphis,zx_tmp_2d) |
---|
2112 | CALL histwrite(nid_day,"phis",i,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2113 | c |
---|
2114 | i = NINT(zout/zsto) |
---|
2115 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,paire,zx_tmp_2d) |
---|
2116 | CALL histwrite(nid_day,"aire",i,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2117 | C |
---|
2118 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d) |
---|
2119 | CALL histwrite(nid_day,"tsol",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2120 | c |
---|
2121 | C |
---|
2122 | zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_ter) |
---|
2123 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d ,zx_tmp_2d) |
---|
2124 | CALL histwrite(nid_day,"tter",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2125 | C |
---|
2126 | zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_lic) |
---|
2127 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d) |
---|
2128 | CALL histwrite(nid_day,"tlic",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2129 | C |
---|
2130 | zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_oce) |
---|
2131 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d) |
---|
2132 | CALL histwrite(nid_day,"toce",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2133 | C |
---|
2134 | zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_sic) |
---|
2135 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d) |
---|
2136 | CALL histwrite(nid_day,"tsic",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2137 | C |
---|
2138 | DO i = 1, klon |
---|
2139 | zx_tmp_fi2d(i) = paprs(i,1) |
---|
2140 | ENDDO |
---|
2141 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
2142 | CALL histwrite(nid_day,"psol",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2143 | c |
---|
2144 | DO i = 1, klon |
---|
2145 | zx_tmp_fi2d(i) = rain_fall(i) + snow_fall(i) |
---|
2146 | ENDDO |
---|
2147 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
2148 | CALL histwrite(nid_day,"rain",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2149 | c |
---|
2150 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_fall,zx_tmp_2d) |
---|
2151 | CALL histwrite(nid_day,"snow",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2152 | c |
---|
2153 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxsnow,zx_tmp_2d) |
---|
2154 | CALL histwrite(nid_day,"snow_cov",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2155 | c |
---|
2156 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, evap,zx_tmp_2d) |
---|
2157 | CALL histwrite(nid_day,"evap",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2158 | c |
---|
2159 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw,zx_tmp_2d) |
---|
2160 | CALL histwrite(nid_day,"tops",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2161 | c |
---|
2162 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw,zx_tmp_2d) |
---|
2163 | CALL histwrite(nid_day,"topl",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2164 | c |
---|
2165 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw,zx_tmp_2d) |
---|
2166 | CALL histwrite(nid_day,"sols",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2167 | c |
---|
2168 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw,zx_tmp_2d) |
---|
2169 | CALL histwrite(nid_day,"soll",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2170 | c |
---|
2171 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollwdown,zx_tmp_2d) |
---|
2172 | CALL histwrite(nid_day,"solldown",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2173 | c |
---|
2174 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, bils,zx_tmp_2d) |
---|
2175 | CALL histwrite(nid_day,"bils",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2176 | c |
---|
2177 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sens,zx_tmp_2d) |
---|
2178 | CALL histwrite(nid_day,"sens",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2179 | c |
---|
2180 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, fder,zx_tmp_2d) |
---|
2181 | CALL histwrite(nid_day,"fder",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2182 | c |
---|
2183 | c |
---|
2184 | DO nsrf = 1, nbsrf |
---|
2185 | C§§§ |
---|
2186 | zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf) |
---|
2187 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2188 | CALL histwrite(nid_day,"pourc_"//clnsurf(nsrf),itap, |
---|
2189 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2190 | C |
---|
2191 | zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf) |
---|
2192 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2193 | CALL histwrite(nid_day,"tsol_"//clnsurf(nsrf),itap, |
---|
2194 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2195 | C |
---|
2196 | zx_tmp_fi2d(1 : klon) = fluxt( 1 : klon, 1, nsrf) |
---|
2197 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2198 | CALL histwrite(nid_day,"sens_"//clnsurf(nsrf),itap, |
---|
2199 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2200 | C |
---|
2201 | zx_tmp_fi2d(1 : klon) = fluxlat( 1 : klon, nsrf) |
---|
2202 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2203 | CALL histwrite(nid_day,"lat_"//clnsurf(nsrf),itap, |
---|
2204 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2205 | C |
---|
2206 | zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf) |
---|
2207 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2208 | CALL histwrite(nid_day,"taux_"//clnsurf(nsrf),itap, |
---|
2209 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2210 | C |
---|
2211 | zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf) |
---|
2212 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2213 | CALL histwrite(nid_day,"tauy_"//clnsurf(nsrf),itap, |
---|
2214 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2215 | C |
---|
2216 | zx_tmp_fi2d(1 : klon) = falbe( 1 : klon, nsrf) |
---|
2217 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2218 | CALL histwrite(nid_day,"albe_"//clnsurf(nsrf),itap, |
---|
2219 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2220 | C |
---|
2221 | zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf) |
---|
2222 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2223 | CALL histwrite(nid_day,"rugs_"//clnsurf(nsrf),itap, |
---|
2224 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2225 | C |
---|
2226 | END DO |
---|
2227 | C |
---|
2228 | c$$$ DO i = 1, klon |
---|
2229 | c$$$ zx_tmp_fi2d(i) = pctsrf(i,is_sic) |
---|
2230 | c$$$ ENDDO |
---|
2231 | c$$$ CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
2232 | c$$$ CALL histwrite(nid_day,"sicf",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2233 | c |
---|
2234 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldl,zx_tmp_2d) |
---|
2235 | CALL histwrite(nid_day,"cldl",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2236 | c |
---|
2237 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldm,zx_tmp_2d) |
---|
2238 | CALL histwrite(nid_day,"cldm",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2239 | c |
---|
2240 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldh,zx_tmp_2d) |
---|
2241 | CALL histwrite(nid_day,"cldh",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2242 | c |
---|
2243 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldt,zx_tmp_2d) |
---|
2244 | CALL histwrite(nid_day,"cldt",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2245 | c |
---|
2246 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldq,zx_tmp_2d) |
---|
2247 | CALL histwrite(nid_day,"cldq",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2248 | c |
---|
2249 | c Champs 3D: |
---|
2250 | c |
---|
2251 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, t_seri, zx_tmp_3d) |
---|
2252 | CALL histwrite(nid_day,"temp",itap,zx_tmp_3d, |
---|
2253 | . iim*jjmp1*klev,ndex3d) |
---|
2254 | c |
---|
2255 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, qx(1,1,ivap), zx_tmp_3d) |
---|
2256 | CALL histwrite(nid_day,"ovap",itap,zx_tmp_3d, |
---|
2257 | . iim*jjmp1*klev,ndex3d) |
---|
2258 | c |
---|
2259 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, zphi, zx_tmp_3d) |
---|
2260 | CALL histwrite(nid_day,"geop",itap,zx_tmp_3d, |
---|
2261 | . iim*jjmp1*klev,ndex3d) |
---|
2262 | c |
---|
2263 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, u_seri, zx_tmp_3d) |
---|
2264 | CALL histwrite(nid_day,"vitu",itap,zx_tmp_3d, |
---|
2265 | . iim*jjmp1*klev,ndex3d) |
---|
2266 | c |
---|
2267 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, v_seri, zx_tmp_3d) |
---|
2268 | CALL histwrite(nid_day,"vitv",itap,zx_tmp_3d, |
---|
2269 | . iim*jjmp1*klev,ndex3d) |
---|
2270 | c |
---|
2271 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, omega, zx_tmp_3d) |
---|
2272 | CALL histwrite(nid_day,"vitw",itap,zx_tmp_3d, |
---|
2273 | . iim*jjmp1*klev,ndex3d) |
---|
2274 | c |
---|
2275 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, pplay, zx_tmp_3d) |
---|
2276 | CALL histwrite(nid_day,"pres",itap,zx_tmp_3d, |
---|
2277 | . iim*jjmp1*klev,ndex3d) |
---|
2278 | c |
---|
2279 | if (ok_sync) then |
---|
2280 | call histsync(nid_day) |
---|
2281 | endif |
---|
2282 | ENDIF |
---|
2283 | C |
---|
2284 | IF (ok_mensuel) THEN |
---|
2285 | c |
---|
2286 | ndex2d = 0 |
---|
2287 | ndex3d = 0 |
---|
2288 | c |
---|
2289 | c Champs 2D: |
---|
2290 | c |
---|
2291 | zsto = dtime |
---|
2292 | zout = dtime * ecrit_mth |
---|
2293 | |
---|
2294 | i = NINT(zout/zsto) |
---|
2295 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,pphis,zx_tmp_2d) |
---|
2296 | CALL histwrite(nid_mth,"phis",i,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2297 | C |
---|
2298 | i = NINT(zout/zsto) |
---|
2299 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,paire,zx_tmp_2d) |
---|
2300 | CALL histwrite(nid_mth,"aire",i,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2301 | |
---|
2302 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d) |
---|
2303 | CALL histwrite(nid_mth,"tsol",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2304 | c |
---|
2305 | DO i = 1, klon |
---|
2306 | zx_tmp_fi2d(i) = paprs(i,1) |
---|
2307 | ENDDO |
---|
2308 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
2309 | CALL histwrite(nid_mth,"psol",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2310 | c |
---|
2311 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxqsol,zx_tmp_2d) |
---|
2312 | CALL histwrite(nid_mth,"qsol",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2313 | c |
---|
2314 | DO i = 1, klon |
---|
2315 | zx_tmp_fi2d(i) = rain_fall(i) + snow_fall(i) |
---|
2316 | ENDDO |
---|
2317 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
2318 | CALL histwrite(nid_mth,"rain",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2319 | c |
---|
2320 | DO i = 1, klon |
---|
2321 | zx_tmp_fi2d(i) = rain_lsc(i) + snow_lsc(i) |
---|
2322 | ENDDO |
---|
2323 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
2324 | CALL histwrite(nid_mth,"plul",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2325 | c |
---|
2326 | DO i = 1, klon |
---|
2327 | zx_tmp_fi2d(i) = rain_con(i) + snow_con(i) |
---|
2328 | ENDDO |
---|
2329 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
2330 | CALL histwrite(nid_mth,"pluc",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2331 | c |
---|
2332 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_fall,zx_tmp_2d) |
---|
2333 | CALL histwrite(nid_mth,"snow",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2334 | c |
---|
2335 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxsnow,zx_tmp_2d) |
---|
2336 | CALL histwrite(nid_mth,"snow_cov",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2337 | c |
---|
2338 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, agesno,zx_tmp_2d) |
---|
2339 | CALL histwrite(nid_mth,"ages",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2340 | c |
---|
2341 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, evap,zx_tmp_2d) |
---|
2342 | CALL histwrite(nid_mth,"evap",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2343 | c |
---|
2344 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw,zx_tmp_2d) |
---|
2345 | CALL histwrite(nid_mth,"tops",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2346 | c |
---|
2347 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw,zx_tmp_2d) |
---|
2348 | CALL histwrite(nid_mth,"topl",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2349 | c |
---|
2350 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw,zx_tmp_2d) |
---|
2351 | CALL histwrite(nid_mth,"sols",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2352 | c |
---|
2353 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw,zx_tmp_2d) |
---|
2354 | CALL histwrite(nid_mth,"soll",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2355 | c |
---|
2356 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollwdown,zx_tmp_2d) |
---|
2357 | CALL histwrite(nid_mth,"solldown",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2358 | c |
---|
2359 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw0,zx_tmp_2d) |
---|
2360 | CALL histwrite(nid_mth,"tops0",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2361 | c |
---|
2362 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw0,zx_tmp_2d) |
---|
2363 | CALL histwrite(nid_mth,"topl0",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2364 | c |
---|
2365 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw0,zx_tmp_2d) |
---|
2366 | CALL histwrite(nid_mth,"sols0",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2367 | c |
---|
2368 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw0,zx_tmp_2d) |
---|
2369 | CALL histwrite(nid_mth,"soll0",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2370 | c |
---|
2371 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, bils,zx_tmp_2d) |
---|
2372 | CALL histwrite(nid_mth,"bils",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2373 | c |
---|
2374 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sens,zx_tmp_2d) |
---|
2375 | CALL histwrite(nid_mth,"sens",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2376 | c |
---|
2377 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, fder,zx_tmp_2d) |
---|
2378 | CALL histwrite(nid_mth,"fder",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2379 | c |
---|
2380 | c |
---|
2381 | c DO i = 1, klon |
---|
2382 | c zx_tmp_fi2d(i) = fluxu(i,1) |
---|
2383 | c ENDDO |
---|
2384 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
2385 | c CALL histwrite(nid_mth,"frtu",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2386 | c |
---|
2387 | c DO i = 1, klon |
---|
2388 | c zx_tmp_fi2d(i) = fluxv(i,1) |
---|
2389 | c ENDDO |
---|
2390 | c CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
2391 | c CALL histwrite(nid_mth,"frtv",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2392 | c |
---|
2393 | DO nsrf = 1, nbsrf |
---|
2394 | C§§§ |
---|
2395 | zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf) |
---|
2396 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2397 | CALL histwrite(nid_mth,"pourc_"//clnsurf(nsrf),itap, |
---|
2398 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2399 | C |
---|
2400 | zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf) |
---|
2401 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2402 | CALL histwrite(nid_mth,"tsol_"//clnsurf(nsrf),itap, |
---|
2403 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2404 | C |
---|
2405 | zx_tmp_fi2d(1 : klon) = fluxt( 1 : klon, 1, nsrf) |
---|
2406 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2407 | CALL histwrite(nid_mth,"sens_"//clnsurf(nsrf),itap, |
---|
2408 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2409 | C |
---|
2410 | zx_tmp_fi2d(1 : klon) = fluxlat( 1 : klon, nsrf) |
---|
2411 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2412 | CALL histwrite(nid_mth,"lat_"//clnsurf(nsrf),itap, |
---|
2413 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2414 | C |
---|
2415 | zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf) |
---|
2416 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2417 | CALL histwrite(nid_mth,"taux_"//clnsurf(nsrf),itap, |
---|
2418 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2419 | C |
---|
2420 | zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf) |
---|
2421 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2422 | CALL histwrite(nid_mth,"tauy_"//clnsurf(nsrf),itap, |
---|
2423 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2424 | C |
---|
2425 | zx_tmp_fi2d(1 : klon) = falbe( 1 : klon, nsrf) |
---|
2426 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2427 | CALL histwrite(nid_mth,"albe_"//clnsurf(nsrf),itap, |
---|
2428 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2429 | C |
---|
2430 | zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf) |
---|
2431 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2432 | CALL histwrite(nid_mth,"rugs_"//clnsurf(nsrf),itap, |
---|
2433 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2434 | |
---|
2435 | END DO |
---|
2436 | c$$$ DO i = 1, klon |
---|
2437 | c$$$ zx_tmp_fi2d(i) = pctsrf(i,is_sic) |
---|
2438 | c$$$ ENDDO |
---|
2439 | c$$$ CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
2440 | c$$$ CALL histwrite(nid_mth,"sicf",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2441 | c |
---|
2442 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, albsol,zx_tmp_2d) |
---|
2443 | CALL histwrite(nid_mth,"albs",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2444 | c |
---|
2445 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragm,zx_tmp_2d) |
---|
2446 | CALL histwrite(nid_mth,"cdrm",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2447 | c |
---|
2448 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cdragh,zx_tmp_2d) |
---|
2449 | CALL histwrite(nid_mth,"cdrh",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2450 | c |
---|
2451 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldl,zx_tmp_2d) |
---|
2452 | CALL histwrite(nid_mth,"cldl",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2453 | c |
---|
2454 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldm,zx_tmp_2d) |
---|
2455 | CALL histwrite(nid_mth,"cldm",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2456 | c |
---|
2457 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldh,zx_tmp_2d) |
---|
2458 | CALL histwrite(nid_mth,"cldh",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2459 | c |
---|
2460 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldt,zx_tmp_2d) |
---|
2461 | CALL histwrite(nid_mth,"cldt",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2462 | c |
---|
2463 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldq,zx_tmp_2d) |
---|
2464 | CALL histwrite(nid_mth,"cldq",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2465 | c |
---|
2466 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, ue,zx_tmp_2d) |
---|
2467 | CALL histwrite(nid_mth,"ue",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2468 | c |
---|
2469 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, ve,zx_tmp_2d) |
---|
2470 | CALL histwrite(nid_mth,"ve",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2471 | c |
---|
2472 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, uq,zx_tmp_2d) |
---|
2473 | CALL histwrite(nid_mth,"uq",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2474 | c |
---|
2475 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, vq,zx_tmp_2d) |
---|
2476 | CALL histwrite(nid_mth,"vq",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2477 | c |
---|
2478 | c Champs 3D: |
---|
2479 | C |
---|
2480 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, t_seri, zx_tmp_3d) |
---|
2481 | CALL histwrite(nid_mth,"temp",itap,zx_tmp_3d, |
---|
2482 | . iim*jjmp1*klev,ndex3d) |
---|
2483 | c |
---|
2484 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, qx(1,1,ivap), zx_tmp_3d) |
---|
2485 | CALL histwrite(nid_mth,"ovap",itap,zx_tmp_3d, |
---|
2486 | . iim*jjmp1*klev,ndex3d) |
---|
2487 | c |
---|
2488 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, zphi, zx_tmp_3d) |
---|
2489 | CALL histwrite(nid_mth,"geop",itap,zx_tmp_3d, |
---|
2490 | . iim*jjmp1*klev,ndex3d) |
---|
2491 | c |
---|
2492 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, u_seri, zx_tmp_3d) |
---|
2493 | CALL histwrite(nid_mth,"vitu",itap,zx_tmp_3d, |
---|
2494 | . iim*jjmp1*klev,ndex3d) |
---|
2495 | c |
---|
2496 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, v_seri, zx_tmp_3d) |
---|
2497 | CALL histwrite(nid_mth,"vitv",itap,zx_tmp_3d, |
---|
2498 | . iim*jjmp1*klev,ndex3d) |
---|
2499 | c |
---|
2500 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, omega, zx_tmp_3d) |
---|
2501 | CALL histwrite(nid_mth,"vitw",itap,zx_tmp_3d, |
---|
2502 | . iim*jjmp1*klev,ndex3d) |
---|
2503 | c |
---|
2504 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, pplay, zx_tmp_3d) |
---|
2505 | CALL histwrite(nid_mth,"pres",itap,zx_tmp_3d, |
---|
2506 | . iim*jjmp1*klev,ndex3d) |
---|
2507 | c |
---|
2508 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldfra, zx_tmp_3d) |
---|
2509 | CALL histwrite(nid_mth,"rneb",itap,zx_tmp_3d, |
---|
2510 | . iim*jjmp1*klev,ndex3d) |
---|
2511 | c |
---|
2512 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, zx_rh, zx_tmp_3d) |
---|
2513 | CALL histwrite(nid_mth,"rhum",itap,zx_tmp_3d, |
---|
2514 | . iim*jjmp1*klev,ndex3d) |
---|
2515 | c |
---|
2516 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldliq, zx_tmp_3d) |
---|
2517 | CALL histwrite(nid_mth,"oliq",itap,zx_tmp_3d, |
---|
2518 | . iim*jjmp1*klev,ndex3d) |
---|
2519 | c |
---|
2520 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_dyn, zx_tmp_3d) |
---|
2521 | CALL histwrite(nid_mth,"dtdyn",itap,zx_tmp_3d, |
---|
2522 | . iim*jjmp1*klev,ndex3d) |
---|
2523 | c |
---|
2524 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_dyn, zx_tmp_3d) |
---|
2525 | CALL histwrite(nid_mth,"dqdyn",itap,zx_tmp_3d, |
---|
2526 | . iim*jjmp1*klev,ndex3d) |
---|
2527 | c |
---|
2528 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_con, zx_tmp_3d) |
---|
2529 | CALL histwrite(nid_mth,"dtcon",itap,zx_tmp_3d, |
---|
2530 | . iim*jjmp1*klev,ndex3d) |
---|
2531 | c |
---|
2532 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_con, zx_tmp_3d) |
---|
2533 | CALL histwrite(nid_mth,"dqcon",itap,zx_tmp_3d, |
---|
2534 | . iim*jjmp1*klev,ndex3d) |
---|
2535 | c |
---|
2536 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_lsc, zx_tmp_3d) |
---|
2537 | CALL histwrite(nid_mth,"dtlsc",itap,zx_tmp_3d, |
---|
2538 | . iim*jjmp1*klev,ndex3d) |
---|
2539 | c |
---|
2540 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_lsc, zx_tmp_3d) |
---|
2541 | CALL histwrite(nid_mth,"dqlsc",itap,zx_tmp_3d, |
---|
2542 | . iim*jjmp1*klev,ndex3d) |
---|
2543 | c |
---|
2544 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_vdf, zx_tmp_3d) |
---|
2545 | CALL histwrite(nid_mth,"dtvdf",itap,zx_tmp_3d, |
---|
2546 | . iim*jjmp1*klev,ndex3d) |
---|
2547 | c |
---|
2548 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_vdf, zx_tmp_3d) |
---|
2549 | CALL histwrite(nid_mth,"dqvdf",itap,zx_tmp_3d, |
---|
2550 | . iim*jjmp1*klev,ndex3d) |
---|
2551 | c |
---|
2552 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_eva, zx_tmp_3d) |
---|
2553 | CALL histwrite(nid_mth,"dteva",itap,zx_tmp_3d, |
---|
2554 | . iim*jjmp1*klev,ndex3d) |
---|
2555 | c |
---|
2556 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_eva, zx_tmp_3d) |
---|
2557 | CALL histwrite(nid_mth,"dqeva",itap,zx_tmp_3d, |
---|
2558 | . iim*jjmp1*klev,ndex3d) |
---|
2559 | c |
---|
2560 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_ajs, zx_tmp_3d) |
---|
2561 | CALL histwrite(nid_mth,"dtajs",itap,zx_tmp_3d, |
---|
2562 | . iim*jjmp1*klev,ndex3d) |
---|
2563 | c |
---|
2564 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_ajs, zx_tmp_3d) |
---|
2565 | CALL histwrite(nid_mth,"dqajs",itap,zx_tmp_3d, |
---|
2566 | . iim*jjmp1*klev,ndex3d) |
---|
2567 | c |
---|
2568 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, heat, zx_tmp_3d) |
---|
2569 | CALL histwrite(nid_mth,"dtswr",itap,zx_tmp_3d, |
---|
2570 | . iim*jjmp1*klev,ndex3d) |
---|
2571 | c |
---|
2572 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, heat0, zx_tmp_3d) |
---|
2573 | CALL histwrite(nid_mth,"dtsw0",itap,zx_tmp_3d, |
---|
2574 | . iim*jjmp1*klev,ndex3d) |
---|
2575 | c |
---|
2576 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cool, zx_tmp_3d) |
---|
2577 | CALL histwrite(nid_mth,"dtlwr",itap,zx_tmp_3d, |
---|
2578 | . iim*jjmp1*klev,ndex3d) |
---|
2579 | c |
---|
2580 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cool0, zx_tmp_3d) |
---|
2581 | CALL histwrite(nid_mth,"dtlw0",itap,zx_tmp_3d, |
---|
2582 | . iim*jjmp1*klev,ndex3d) |
---|
2583 | c |
---|
2584 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_vdf, zx_tmp_3d) |
---|
2585 | CALL histwrite(nid_mth,"duvdf",itap,zx_tmp_3d, |
---|
2586 | . iim*jjmp1*klev,ndex3d) |
---|
2587 | c |
---|
2588 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_v_vdf, zx_tmp_3d) |
---|
2589 | CALL histwrite(nid_mth,"dvvdf",itap,zx_tmp_3d, |
---|
2590 | . iim*jjmp1*klev,ndex3d) |
---|
2591 | c |
---|
2592 | IF (ok_orodr) THEN |
---|
2593 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_oro, zx_tmp_3d) |
---|
2594 | CALL histwrite(nid_mth,"duoro",itap,zx_tmp_3d, |
---|
2595 | . iim*jjmp1*klev,ndex3d) |
---|
2596 | c |
---|
2597 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_v_oro, zx_tmp_3d) |
---|
2598 | CALL histwrite(nid_mth,"dvoro",itap,zx_tmp_3d, |
---|
2599 | . iim*jjmp1*klev,ndex3d) |
---|
2600 | c |
---|
2601 | ENDIF |
---|
2602 | C |
---|
2603 | IF (ok_orolf) THEN |
---|
2604 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_u_lif, zx_tmp_3d) |
---|
2605 | CALL histwrite(nid_mth,"dulif",itap,zx_tmp_3d, |
---|
2606 | . iim*jjmp1*klev,ndex3d) |
---|
2607 | c |
---|
2608 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_v_lif, zx_tmp_3d) |
---|
2609 | CALL histwrite(nid_mth,"dvlif",itap,zx_tmp_3d, |
---|
2610 | . iim*jjmp1*klev,ndex3d) |
---|
2611 | ENDIF |
---|
2612 | C |
---|
2613 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, wo, zx_tmp_3d) |
---|
2614 | CALL histwrite(nid_mth,"ozone",itap,zx_tmp_3d, |
---|
2615 | . iim*jjmp1*klev,ndex3d) |
---|
2616 | c |
---|
2617 | IF (nqmax.GE.3) THEN |
---|
2618 | DO iq=1,nqmax-2 |
---|
2619 | IF (iq.LE.99) THEN |
---|
2620 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, qx(1,1,iq+2), zx_tmp_3d) |
---|
2621 | WRITE(str2,'(i2.2)') iq |
---|
2622 | CALL histwrite(nid_mth,"trac"//str2,itap,zx_tmp_3d, |
---|
2623 | . iim*jjmp1*klev,ndex3d) |
---|
2624 | ELSE |
---|
2625 | PRINT*, "Trop de traceurs" |
---|
2626 | CALL abort |
---|
2627 | ENDIF |
---|
2628 | ENDDO |
---|
2629 | ENDIF |
---|
2630 | c |
---|
2631 | if (ok_sync) then |
---|
2632 | call histsync(nid_mth) |
---|
2633 | endif |
---|
2634 | ENDIF |
---|
2635 | c |
---|
2636 | IF (ok_instan) THEN |
---|
2637 | c |
---|
2638 | ndex2d = 0 |
---|
2639 | ndex3d = 0 |
---|
2640 | c |
---|
2641 | c Champs 2D: |
---|
2642 | c |
---|
2643 | zsto = dtime * ecrit_ins |
---|
2644 | zout = dtime * ecrit_ins |
---|
2645 | |
---|
2646 | i = NINT(zout/zsto) |
---|
2647 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,pphis,zx_tmp_2d) |
---|
2648 | CALL histwrite(nid_ins,"phis",i,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2649 | c |
---|
2650 | i = NINT(zout/zsto) |
---|
2651 | CALL gr_fi_ecrit(1,klon,iim,jjmp1,paire,zx_tmp_2d) |
---|
2652 | CALL histwrite(nid_ins,"aire",i,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2653 | |
---|
2654 | DO i = 1, klon |
---|
2655 | zx_tmp_fi2d(i) = paprs(i,1) |
---|
2656 | ENDDO |
---|
2657 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d) |
---|
2658 | CALL histwrite(nid_ins,"psol",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2659 | c |
---|
2660 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d) |
---|
2661 | CALL histwrite(nid_ins,"tsol",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2662 | c |
---|
2663 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw,zx_tmp_2d) |
---|
2664 | CALL histwrite(nid_ins,"topl",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2665 | c |
---|
2666 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, evap,zx_tmp_2d) |
---|
2667 | CALL histwrite(nid_ins,"evap",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2668 | c |
---|
2669 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw,zx_tmp_2d) |
---|
2670 | CALL histwrite(nid_ins,"sols",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2671 | c |
---|
2672 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw,zx_tmp_2d) |
---|
2673 | CALL histwrite(nid_ins,"soll",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2674 | c |
---|
2675 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollwdown,zx_tmp_2d) |
---|
2676 | CALL histwrite(nid_ins,"solldown",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2677 | c |
---|
2678 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, bils,zx_tmp_2d) |
---|
2679 | CALL histwrite(nid_ins,"bils",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2680 | c |
---|
2681 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, sens,zx_tmp_2d) |
---|
2682 | CALL histwrite(nid_ins,"sens",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2683 | c |
---|
2684 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, fder,zx_tmp_2d) |
---|
2685 | CALL histwrite(nid_ins,"fder",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2686 | c |
---|
2687 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, d_ts(1,is_oce),zx_tmp_2d) |
---|
2688 | CALL histwrite(nid_ins,"dtsvdfo",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2689 | c |
---|
2690 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, d_ts(1,is_ter),zx_tmp_2d) |
---|
2691 | CALL histwrite(nid_ins,"dtsvdft",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2692 | c |
---|
2693 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, d_ts(1,is_lic),zx_tmp_2d) |
---|
2694 | CALL histwrite(nid_ins,"dtsvdfg",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2695 | c |
---|
2696 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, d_ts(1,is_sic),zx_tmp_2d) |
---|
2697 | CALL histwrite(nid_ins,"dtsvdfi",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2698 | |
---|
2699 | DO nsrf = 1, nbsrf |
---|
2700 | C§§§ |
---|
2701 | zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf) |
---|
2702 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2703 | CALL histwrite(nid_ins,"pourc_"//clnsurf(nsrf),itap, |
---|
2704 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2705 | C |
---|
2706 | zx_tmp_fi2d(1 : klon) = fluxt( 1 : klon, 1, nsrf) |
---|
2707 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2708 | CALL histwrite(nid_ins,"sens_"//clnsurf(nsrf),itap, |
---|
2709 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2710 | C |
---|
2711 | zx_tmp_fi2d(1 : klon) = fluxlat( 1 : klon, nsrf) |
---|
2712 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2713 | CALL histwrite(nid_ins,"lat_"//clnsurf(nsrf),itap, |
---|
2714 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2715 | C |
---|
2716 | zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf) |
---|
2717 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2718 | CALL histwrite(nid_ins,"tsol_"//clnsurf(nsrf),itap, |
---|
2719 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2720 | C |
---|
2721 | zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf) |
---|
2722 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2723 | CALL histwrite(nid_ins,"taux_"//clnsurf(nsrf),itap, |
---|
2724 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2725 | C |
---|
2726 | zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf) |
---|
2727 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2728 | CALL histwrite(nid_ins,"tauy_"//clnsurf(nsrf),itap, |
---|
2729 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2730 | C |
---|
2731 | zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf) |
---|
2732 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2733 | CALL histwrite(nid_ins,"rugs_"//clnsurf(nsrf),itap, |
---|
2734 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2735 | C |
---|
2736 | zx_tmp_fi2d(1 : klon) = falbe( 1 : klon, nsrf) |
---|
2737 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d) |
---|
2738 | CALL histwrite(nid_ins,"albe_"//clnsurf(nsrf),itap, |
---|
2739 | $ zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2740 | C |
---|
2741 | END DO |
---|
2742 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, albsol,zx_tmp_2d) |
---|
2743 | CALL histwrite(nid_ins,"albs",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2744 | c |
---|
2745 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxsnow,zx_tmp_2d) |
---|
2746 | CALL histwrite(nid_ins,"snow_cov",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2747 | c |
---|
2748 | CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxrugs,zx_tmp_2d) |
---|
2749 | CALL histwrite(nid_ins,"rugs",itap,zx_tmp_2d,iim*jjmp1,ndex2d) |
---|
2750 | c |
---|
2751 | c Champs 3D: |
---|
2752 | c |
---|
2753 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, t_seri, zx_tmp_3d) |
---|
2754 | CALL histwrite(nid_ins,"temp",itap,zx_tmp_3d, |
---|
2755 | . iim*jjmp1*klev,ndex3d) |
---|
2756 | c |
---|
2757 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, u_seri, zx_tmp_3d) |
---|
2758 | CALL histwrite(nid_ins,"vitu",itap,zx_tmp_3d, |
---|
2759 | . iim*jjmp1*klev,ndex3d) |
---|
2760 | c |
---|
2761 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, v_seri, zx_tmp_3d) |
---|
2762 | CALL histwrite(nid_ins,"vitv",itap,zx_tmp_3d, |
---|
2763 | . iim*jjmp1*klev,ndex3d) |
---|
2764 | c |
---|
2765 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, zphi, zx_tmp_3d) |
---|
2766 | CALL histwrite(nid_ins,"geop",itap,zx_tmp_3d, |
---|
2767 | . iim*jjmp1*klev,ndex3d) |
---|
2768 | c |
---|
2769 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, pplay, zx_tmp_3d) |
---|
2770 | CALL histwrite(nid_ins,"pres",itap,zx_tmp_3d, |
---|
2771 | . iim*jjmp1*klev,ndex3d) |
---|
2772 | c |
---|
2773 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_vdf, zx_tmp_3d) |
---|
2774 | CALL histwrite(nid_ins,"dtvdf",itap,zx_tmp_3d, |
---|
2775 | . iim*jjmp1*klev,ndex3d) |
---|
2776 | c |
---|
2777 | CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_q_vdf, zx_tmp_3d) |
---|
2778 | CALL histwrite(nid_ins,"dqvdf",itap,zx_tmp_3d, |
---|
2779 | . iim*jjmp1*klev,ndex3d) |
---|
2780 | |
---|
2781 | c |
---|
2782 | if (ok_sync) then |
---|
2783 | call histsync(nid_ins) |
---|
2784 | endif |
---|
2785 | ENDIF |
---|
2786 | c |
---|
2787 | c |
---|
2788 | c Ecrire la bande regionale (binaire grads) |
---|
2789 | IF (ok_region .AND. mod(itap,ecrit_reg).eq.0) THEN |
---|
2790 | CALL ecriregs(84,zxtsol) |
---|
2791 | CALL ecriregs(84,paprs(1,1)) |
---|
2792 | CALL ecriregs(84,topsw) |
---|
2793 | CALL ecriregs(84,toplw) |
---|
2794 | CALL ecriregs(84,solsw) |
---|
2795 | CALL ecriregs(84,sollw) |
---|
2796 | CALL ecriregs(84,rain_fall) |
---|
2797 | CALL ecriregs(84,snow_fall) |
---|
2798 | CALL ecriregs(84,evap) |
---|
2799 | CALL ecriregs(84,sens) |
---|
2800 | CALL ecriregs(84,bils) |
---|
2801 | CALL ecriregs(84,pctsrf(1,is_sic)) |
---|
2802 | CALL ecriregs(84,zxfluxu(1,1)) |
---|
2803 | CALL ecriregs(84,zxfluxv(1,1)) |
---|
2804 | CALL ecriregs(84,ue) |
---|
2805 | CALL ecriregs(84,ve) |
---|
2806 | CALL ecriregs(84,uq) |
---|
2807 | CALL ecriregs(84,vq) |
---|
2808 | c |
---|
2809 | CALL ecrirega(84,u_seri) |
---|
2810 | CALL ecrirega(84,v_seri) |
---|
2811 | CALL ecrirega(84,omega) |
---|
2812 | CALL ecrirega(84,t_seri) |
---|
2813 | CALL ecrirega(84,zphi) |
---|
2814 | CALL ecrirega(84,q_seri) |
---|
2815 | CALL ecrirega(84,cldfra) |
---|
2816 | CALL ecrirega(84,cldliq) |
---|
2817 | CALL ecrirega(84,pplay) |
---|
2818 | |
---|
2819 | |
---|
2820 | cc CALL ecrirega(84,d_t_dyn) |
---|
2821 | cc CALL ecrirega(84,d_q_dyn) |
---|
2822 | cc CALL ecrirega(84,heat) |
---|
2823 | cc CALL ecrirega(84,cool) |
---|
2824 | cc CALL ecrirega(84,d_t_con) |
---|
2825 | cc CALL ecrirega(84,d_q_con) |
---|
2826 | cc CALL ecrirega(84,d_t_lsc) |
---|
2827 | cc CALL ecrirega(84,d_q_lsc) |
---|
2828 | ENDIF |
---|
2829 | c |
---|
2830 | c Convertir les incrementations en tendances |
---|
2831 | c |
---|
2832 | DO k = 1, klev |
---|
2833 | DO i = 1, klon |
---|
2834 | d_u(i,k) = ( u_seri(i,k) - u(i,k) ) / dtime |
---|
2835 | d_v(i,k) = ( v_seri(i,k) - v(i,k) ) / dtime |
---|
2836 | d_t(i,k) = ( t_seri(i,k)-t(i,k) ) / dtime |
---|
2837 | d_qx(i,k,ivap) = ( q_seri(i,k) - qx(i,k,ivap) ) / dtime |
---|
2838 | d_qx(i,k,iliq) = ( ql_seri(i,k) - qx(i,k,iliq) ) / dtime |
---|
2839 | ENDDO |
---|
2840 | ENDDO |
---|
2841 | c |
---|
2842 | IF (nqmax.GE.3) THEN |
---|
2843 | DO iq = 3, nqmax |
---|
2844 | DO k = 1, klev |
---|
2845 | DO i = 1, klon |
---|
2846 | d_qx(i,k,iq) = ( tr_seri(i,k,iq-2) - qx(i,k,iq) ) / dtime |
---|
2847 | ENDDO |
---|
2848 | ENDDO |
---|
2849 | ENDDO |
---|
2850 | ENDIF |
---|
2851 | c |
---|
2852 | c Sauvegarder les valeurs de t et q a la fin de la physique: |
---|
2853 | c |
---|
2854 | DO k = 1, klev |
---|
2855 | DO i = 1, klon |
---|
2856 | t_ancien(i,k) = t_seri(i,k) |
---|
2857 | q_ancien(i,k) = q_seri(i,k) |
---|
2858 | ENDDO |
---|
2859 | ENDDO |
---|
2860 | c |
---|
2861 | c==================================================================== |
---|
2862 | c Si c'est la fin, il faut conserver l'etat de redemarrage |
---|
2863 | c==================================================================== |
---|
2864 | c |
---|
2865 | IF (lafin) THEN |
---|
2866 | ccc IF (ok_oasis) CALL quitcpl |
---|
2867 | CALL phyredem ("restartphy.nc",dtime,radpas,co2_ppm,solaire, |
---|
2868 | . rlat, rlon, pctsrf, ftsol, ftsoil, deltat, fqsol, fsnow, |
---|
2869 | . falbe, fevap, rain_fall, snow_fall, |
---|
2870 | . solsw, sollwdown,fder, |
---|
2871 | . radsol,frugs,agesno, |
---|
2872 | . zmea,zstd,zsig,zgam,zthe,zpic,zval,rugoro, |
---|
2873 | . t_ancien, q_ancien) |
---|
2874 | ENDIF |
---|
2875 | |
---|
2876 | RETURN |
---|
2877 | END |
---|
2878 | FUNCTION qcheck(klon,klev,paprs,q,ql,aire) |
---|
2879 | IMPLICIT none |
---|
2880 | c |
---|
2881 | c Calculer et imprimer l'eau totale. A utiliser pour verifier |
---|
2882 | c la conservation de l'eau |
---|
2883 | c |
---|
2884 | #include "YOMCST.h" |
---|
2885 | INTEGER klon,klev |
---|
2886 | REAL paprs(klon,klev+1), q(klon,klev), ql(klon,klev) |
---|
2887 | REAL aire(klon) |
---|
2888 | REAL qtotal, zx, qcheck |
---|
2889 | INTEGER i, k |
---|
2890 | c |
---|
2891 | zx = 0.0 |
---|
2892 | DO i = 1, klon |
---|
2893 | zx = zx + aire(i) |
---|
2894 | ENDDO |
---|
2895 | qtotal = 0.0 |
---|
2896 | DO k = 1, klev |
---|
2897 | DO i = 1, klon |
---|
2898 | qtotal = qtotal + (q(i,k)+ql(i,k)) * aire(i) |
---|
2899 | . *(paprs(i,k)-paprs(i,k+1))/RG |
---|
2900 | ENDDO |
---|
2901 | ENDDO |
---|
2902 | c |
---|
2903 | qcheck = qtotal/zx |
---|
2904 | c |
---|
2905 | RETURN |
---|
2906 | END |
---|
2907 | SUBROUTINE gr_fi_ecrit(nfield,nlon,iim,jjmp1,fi,ecrit) |
---|
2908 | IMPLICIT none |
---|
2909 | c |
---|
2910 | c Tranformer une variable de la grille physique a |
---|
2911 | c la grille d'ecriture |
---|
2912 | c |
---|
2913 | INTEGER nfield,nlon,iim,jjmp1, jjm |
---|
2914 | REAL fi(nlon,nfield), ecrit(iim*jjmp1,nfield) |
---|
2915 | c |
---|
2916 | INTEGER i, n, ig |
---|
2917 | c |
---|
2918 | jjm = jjmp1 - 1 |
---|
2919 | DO n = 1, nfield |
---|
2920 | DO i=1,iim |
---|
2921 | ecrit(i,n) = fi(1,n) |
---|
2922 | ecrit(i+jjm*iim,n) = fi(nlon,n) |
---|
2923 | ENDDO |
---|
2924 | DO ig = 1, nlon - 2 |
---|
2925 | ecrit(iim+ig,n) = fi(1+ig,n) |
---|
2926 | ENDDO |
---|
2927 | ENDDO |
---|
2928 | RETURN |
---|
2929 | END |
---|
2930 | |
---|