1 | c $Header$ |
---|
2 | c |
---|
3 | SUBROUTINE phyredem (fichnom,dtime,radpas, |
---|
4 | . rlat,rlon, pctsrf,tsol,tsoil,deltat,qsol,snow, |
---|
5 | . albedo, evap, rain_fall, snow_fall, |
---|
6 | . solsw, sollw,fder, |
---|
7 | . radsol,frugs,agesno, |
---|
8 | . zmea,zstd,zsig,zgam,zthe,zpic,zval,rugsrel, |
---|
9 | . t_ancien, q_ancien, rnebcon, ratqs, clwcon) |
---|
10 | IMPLICIT none |
---|
11 | c====================================================================== |
---|
12 | c Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818 |
---|
13 | c Objet: Ecriture de l'etat de redemarrage pour la physique |
---|
14 | c====================================================================== |
---|
15 | #include "dimensions.h" |
---|
16 | #include "dimphy.h" |
---|
17 | #include "netcdf.inc" |
---|
18 | #include "indicesol.h" |
---|
19 | #include "dimsoil.h" |
---|
20 | #include "clesphys.h" |
---|
21 | #include "control.h" |
---|
22 | #include "temps.h" |
---|
23 | c====================================================================== |
---|
24 | CHARACTER*(*) fichnom |
---|
25 | REAL dtime |
---|
26 | INTEGER radpas |
---|
27 | REAL rlat(klon), rlon(klon) |
---|
28 | REAL tsol(klon,nbsrf) |
---|
29 | REAL tsoil(klon,nsoilmx,nbsrf) |
---|
30 | REAL deltat(klon) |
---|
31 | REAL qsol(klon,nbsrf) |
---|
32 | REAL snow(klon,nbsrf) |
---|
33 | REAL albedo(klon,nbsrf) |
---|
34 | REAL evap(klon,nbsrf) |
---|
35 | REAL rain_fall(klon) |
---|
36 | REAL snow_fall(klon) |
---|
37 | real solsw(klon) |
---|
38 | real sollw(klon) |
---|
39 | real fder(klon) |
---|
40 | REAL radsol(klon) |
---|
41 | REAL frugs(klon,nbsrf) |
---|
42 | REAL agesno(klon,nbsrf) |
---|
43 | REAL zmea(klon) |
---|
44 | REAL zstd(klon) |
---|
45 | REAL zsig(klon) |
---|
46 | REAL zgam(klon) |
---|
47 | REAL zthe(klon) |
---|
48 | REAL zpic(klon) |
---|
49 | REAL zval(klon) |
---|
50 | REAL rugsrel(klon) |
---|
51 | REAL pctsrf(klon, nbsrf) |
---|
52 | REAL t_ancien(klon,klev), q_ancien(klon,klev) |
---|
53 | real clwcon(klon,klev),rnebcon(klon,klev),ratqs(klon,klev) |
---|
54 | c |
---|
55 | INTEGER nid, nvarid, idim1, idim2, idim3 |
---|
56 | INTEGER ierr |
---|
57 | INTEGER length |
---|
58 | PARAMETER (length=100) |
---|
59 | REAL tab_cntrl(length) |
---|
60 | c |
---|
61 | INTEGER isoil, nsrf |
---|
62 | CHARACTER*7 str7 |
---|
63 | CHARACTER*2 str2 |
---|
64 | c |
---|
65 | ierr = NF_CREATE(fichnom, NF_CLOBBER, nid) |
---|
66 | IF (ierr.NE.NF_NOERR) THEN |
---|
67 | write(6,*)' Pb d''ouverture du fichier '//fichnom |
---|
68 | write(6,*)' ierr = ', ierr |
---|
69 | CALL ABORT |
---|
70 | ENDIF |
---|
71 | c |
---|
72 | ierr = NF_PUT_ATT_TEXT (nid, NF_GLOBAL, "title", 28, |
---|
73 | . "Fichier redemmarage physique") |
---|
74 | c |
---|
75 | ierr = NF_DEF_DIM (nid, "index", length, idim1) |
---|
76 | ierr = NF_DEF_DIM (nid, "points_physiques", klon, idim2) |
---|
77 | ierr = NF_DEF_DIM (nid, "horizon_vertical", klon*klev, idim3) |
---|
78 | c |
---|
79 | ierr = NF_ENDDEF(nid) |
---|
80 | c |
---|
81 | DO ierr = 1, length |
---|
82 | tab_cntrl(ierr) = 0.0 |
---|
83 | ENDDO |
---|
84 | tab_cntrl(1) = dtime |
---|
85 | tab_cntrl(2) = radpas |
---|
86 | tab_cntrl(3) = co2_ppm |
---|
87 | tab_cntrl(4) = solaire |
---|
88 | tab_cntrl(5) = iflag_con |
---|
89 | tab_cntrl(6) = nbapp_rad |
---|
90 | |
---|
91 | IF( cycle_diurne ) tab_cntrl( 7 ) = 1. |
---|
92 | IF( soil_model ) tab_cntrl( 8 ) = 1. |
---|
93 | IF( new_oliq ) tab_cntrl( 9 ) = 1. |
---|
94 | IF( ok_orodr ) tab_cntrl(10 ) = 1. |
---|
95 | IF( ok_orolf ) tab_cntrl(11 ) = 1. |
---|
96 | |
---|
97 | tab_cntrl(13) = day_end |
---|
98 | tab_cntrl(14) = annee_ref |
---|
99 | tab_cntrl(15) = itau_phy |
---|
100 | c |
---|
101 | ierr = NF_REDEF (nid) |
---|
102 | #ifdef NC_DOUBLE |
---|
103 | ierr = NF_DEF_VAR (nid, "controle", NF_DOUBLE, 1, idim1,nvarid) |
---|
104 | #else |
---|
105 | ierr = NF_DEF_VAR (nid, "controle", NF_FLOAT, 1, idim1,nvarid) |
---|
106 | #endif |
---|
107 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22, |
---|
108 | . "Parametres de controle") |
---|
109 | ierr = NF_ENDDEF(nid) |
---|
110 | #ifdef NC_DOUBLE |
---|
111 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tab_cntrl) |
---|
112 | #else |
---|
113 | ierr = NF_PUT_VAR_REAL (nid,nvarid,tab_cntrl) |
---|
114 | #endif |
---|
115 | c |
---|
116 | ierr = NF_REDEF (nid) |
---|
117 | #ifdef NC_DOUBLE |
---|
118 | ierr = NF_DEF_VAR (nid, "longitude", NF_DOUBLE, 1, idim2,nvarid) |
---|
119 | #else |
---|
120 | ierr = NF_DEF_VAR (nid, "longitude", NF_FLOAT, 1, idim2,nvarid) |
---|
121 | #endif |
---|
122 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 32, |
---|
123 | . "Longitudes de la grille physique") |
---|
124 | ierr = NF_ENDDEF(nid) |
---|
125 | #ifdef NC_DOUBLE |
---|
126 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlon) |
---|
127 | #else |
---|
128 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rlon) |
---|
129 | #endif |
---|
130 | c |
---|
131 | ierr = NF_REDEF (nid) |
---|
132 | #ifdef NC_DOUBLE |
---|
133 | ierr = NF_DEF_VAR (nid, "latitude", NF_DOUBLE, 1, idim2,nvarid) |
---|
134 | #else |
---|
135 | ierr = NF_DEF_VAR (nid, "latitude", NF_FLOAT, 1, idim2,nvarid) |
---|
136 | #endif |
---|
137 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 31, |
---|
138 | . "Latitudes de la grille physique") |
---|
139 | ierr = NF_ENDDEF(nid) |
---|
140 | #ifdef NC_DOUBLE |
---|
141 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlat) |
---|
142 | #else |
---|
143 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rlat) |
---|
144 | #endif |
---|
145 | c |
---|
146 | C PB ajout du masque terre/mer |
---|
147 | C |
---|
148 | ierr = NF_REDEF (nid) |
---|
149 | #ifdef NC_DOUBLE |
---|
150 | ierr = NF_DEF_VAR (nid, "masque", NF_DOUBLE, 1, idim2,nvarid) |
---|
151 | #else |
---|
152 | ierr = NF_DEF_VAR (nid, "masque", NF_FLOAT, 1, idim2,nvarid) |
---|
153 | #endif |
---|
154 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 16, |
---|
155 | . "masque terre mer") |
---|
156 | ierr = NF_ENDDEF(nid) |
---|
157 | #ifdef NC_DOUBLE |
---|
158 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zmasq) |
---|
159 | #else |
---|
160 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zmasq) |
---|
161 | #endif |
---|
162 | c BP ajout des fraction de chaque sous-surface |
---|
163 | C |
---|
164 | C 1. fraction de terre |
---|
165 | C |
---|
166 | ierr = NF_REDEF (nid) |
---|
167 | #ifdef NC_DOUBLE |
---|
168 | ierr = NF_DEF_VAR (nid, "FTER", NF_DOUBLE, 1, idim2,nvarid) |
---|
169 | #else |
---|
170 | ierr = NF_DEF_VAR (nid, "FTER", NF_FLOAT, 1, idim2,nvarid) |
---|
171 | #endif |
---|
172 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 21, |
---|
173 | . "fraction de continent") |
---|
174 | ierr = NF_ENDDEF(nid) |
---|
175 | #ifdef NC_DOUBLE |
---|
176 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon, is_ter)) |
---|
177 | #else |
---|
178 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_ter)) |
---|
179 | #endif |
---|
180 | C |
---|
181 | C 2. Fraction de glace de terre |
---|
182 | C |
---|
183 | ierr = NF_REDEF (nid) |
---|
184 | #ifdef NC_DOUBLE |
---|
185 | ierr = NF_DEF_VAR (nid, "FLIC", NF_DOUBLE, 1, idim2,nvarid) |
---|
186 | #else |
---|
187 | ierr = NF_DEF_VAR (nid, "FLIC", NF_FLOAT, 1, idim2,nvarid) |
---|
188 | #endif |
---|
189 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 24, |
---|
190 | . "fraction glace de terre") |
---|
191 | ierr = NF_ENDDEF(nid) |
---|
192 | #ifdef NC_DOUBLE |
---|
193 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon,is_lic)) |
---|
194 | #else |
---|
195 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_lic)) |
---|
196 | #endif |
---|
197 | C |
---|
198 | C 3. fraction ocean |
---|
199 | C |
---|
200 | ierr = NF_REDEF (nid) |
---|
201 | #ifdef NC_DOUBLE |
---|
202 | ierr = NF_DEF_VAR (nid, "FOCE", NF_DOUBLE, 1, idim2,nvarid) |
---|
203 | #else |
---|
204 | ierr = NF_DEF_VAR (nid, "FOCE", NF_FLOAT, 1, idim2,nvarid) |
---|
205 | #endif |
---|
206 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 14, |
---|
207 | . "fraction ocean") |
---|
208 | ierr = NF_ENDDEF(nid) |
---|
209 | #ifdef NC_DOUBLE |
---|
210 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon, is_oce)) |
---|
211 | #else |
---|
212 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_oce)) |
---|
213 | #endif |
---|
214 | C |
---|
215 | C 4. Fraction glace de mer |
---|
216 | C |
---|
217 | ierr = NF_REDEF (nid) |
---|
218 | #ifdef NC_DOUBLE |
---|
219 | ierr = NF_DEF_VAR (nid, "FSIC", NF_DOUBLE, 1, idim2,nvarid) |
---|
220 | #else |
---|
221 | ierr = NF_DEF_VAR (nid, "FSIC", NF_FLOAT, 1, idim2,nvarid) |
---|
222 | #endif |
---|
223 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 18, |
---|
224 | . "fraction glace mer") |
---|
225 | ierr = NF_ENDDEF(nid) |
---|
226 | #ifdef NC_DOUBLE |
---|
227 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon, is_sic)) |
---|
228 | #else |
---|
229 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_sic)) |
---|
230 | #endif |
---|
231 | C |
---|
232 | C |
---|
233 | c |
---|
234 | DO nsrf = 1, nbsrf |
---|
235 | IF (nsrf.LE.99) THEN |
---|
236 | WRITE(str2,'(i2.2)') nsrf |
---|
237 | ierr = NF_REDEF (nid) |
---|
238 | #ifdef NC_DOUBLE |
---|
239 | ierr = NF_DEF_VAR (nid, "TS"//str2, NF_DOUBLE, 1, idim2,nvarid) |
---|
240 | #else |
---|
241 | ierr = NF_DEF_VAR (nid, "TS"//str2, NF_FLOAT, 1, idim2,nvarid) |
---|
242 | #endif |
---|
243 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
244 | . "Temperature de surface No."//str2) |
---|
245 | ierr = NF_ENDDEF(nid) |
---|
246 | ELSE |
---|
247 | PRINT*, "Trop de sous-mailles" |
---|
248 | CALL abort |
---|
249 | ENDIF |
---|
250 | #ifdef NC_DOUBLE |
---|
251 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tsol(1,nsrf)) |
---|
252 | #else |
---|
253 | ierr = NF_PUT_VAR_REAL (nid,nvarid,tsol(1,nsrf)) |
---|
254 | #endif |
---|
255 | ENDDO |
---|
256 | c |
---|
257 | DO nsrf = 1, nbsrf |
---|
258 | DO isoil=1, nsoilmx |
---|
259 | IF (isoil.LE.99 .AND. nsrf.LE.99) THEN |
---|
260 | WRITE(str7,'(i2.2,"srf",i2.2)') isoil,nsrf |
---|
261 | ierr = NF_REDEF (nid) |
---|
262 | #ifdef NC_DOUBLE |
---|
263 | ierr = NF_DEF_VAR (nid, "Tsoil"//str7,NF_DOUBLE,1,idim2,nvarid) |
---|
264 | #else |
---|
265 | ierr = NF_DEF_VAR (nid, "Tsoil"//str7,NF_FLOAT,1,idim2,nvarid) |
---|
266 | #endif |
---|
267 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 29, |
---|
268 | . "Temperature du sol No."//str7) |
---|
269 | ierr = NF_ENDDEF(nid) |
---|
270 | ELSE |
---|
271 | PRINT*, "Trop de couches" |
---|
272 | CALL abort |
---|
273 | ENDIF |
---|
274 | #ifdef NC_DOUBLE |
---|
275 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tsoil(1,isoil,nsrf)) |
---|
276 | #else |
---|
277 | ierr = NF_PUT_VAR_REAL (nid,nvarid,tsoil(1,isoil,nsrf)) |
---|
278 | #endif |
---|
279 | ENDDO |
---|
280 | ENDDO |
---|
281 | c |
---|
282 | c |
---|
283 | ierr = NF_REDEF (nid) |
---|
284 | #ifdef NC_DOUBLE |
---|
285 | ierr = NF_DEF_VAR (nid, "DELTAT", NF_DOUBLE, 1, idim2,nvarid) |
---|
286 | #else |
---|
287 | ierr = NF_DEF_VAR (nid, "DELTAT", NF_FLOAT, 1, idim2,nvarid) |
---|
288 | #endif |
---|
289 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 33, |
---|
290 | . "Ecart de la SST (pour slab-ocean)") |
---|
291 | ierr = NF_ENDDEF(nid) |
---|
292 | #ifdef NC_DOUBLE |
---|
293 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,deltat) |
---|
294 | #else |
---|
295 | ierr = NF_PUT_VAR_REAL (nid,nvarid,deltat) |
---|
296 | #endif |
---|
297 | c |
---|
298 | DO nsrf = 1, nbsrf |
---|
299 | IF (nsrf.LE.99) THEN |
---|
300 | WRITE(str2,'(i2.2)') nsrf |
---|
301 | ierr = NF_REDEF (nid) |
---|
302 | #ifdef NC_DOUBLE |
---|
303 | ierr = NF_DEF_VAR (nid,"QS"//str2,NF_DOUBLE,1,idim2,nvarid) |
---|
304 | #else |
---|
305 | ierr = NF_DEF_VAR (nid,"QS"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
306 | #endif |
---|
307 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 25, |
---|
308 | . "Humidite de surface No."//str2) |
---|
309 | ierr = NF_ENDDEF(nid) |
---|
310 | ELSE |
---|
311 | PRINT*, "Trop de sous-mailles" |
---|
312 | CALL abort |
---|
313 | ENDIF |
---|
314 | #ifdef NC_DOUBLE |
---|
315 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,qsol(1,nsrf)) |
---|
316 | #else |
---|
317 | ierr = NF_PUT_VAR_REAL (nid,nvarid,qsol(1,nsrf)) |
---|
318 | #endif |
---|
319 | ENDDO |
---|
320 | c |
---|
321 | DO nsrf = 1, nbsrf |
---|
322 | IF (nsrf.LE.99) THEN |
---|
323 | WRITE(str2,'(i2.2)') nsrf |
---|
324 | ierr = NF_REDEF (nid) |
---|
325 | #ifdef NC_DOUBLE |
---|
326 | ierr = NF_DEF_VAR (nid,"ALBE"//str2,NF_DOUBLE,1,idim2,nvarid) |
---|
327 | #else |
---|
328 | ierr = NF_DEF_VAR (nid,"ALBE"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
329 | #endif |
---|
330 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 23, |
---|
331 | . "albedo de surface No."//str2) |
---|
332 | ierr = NF_ENDDEF(nid) |
---|
333 | ELSE |
---|
334 | PRINT*, "Trop de sous-mailles" |
---|
335 | CALL abort |
---|
336 | ENDIF |
---|
337 | #ifdef NC_DOUBLE |
---|
338 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,albedo(1,nsrf)) |
---|
339 | #else |
---|
340 | ierr = NF_PUT_VAR_REAL (nid,nvarid,albedo(1,nsrf)) |
---|
341 | #endif |
---|
342 | ENDDO |
---|
343 | c |
---|
344 | DO nsrf = 1, nbsrf |
---|
345 | IF (nsrf.LE.99) THEN |
---|
346 | WRITE(str2,'(i2.2)') nsrf |
---|
347 | ierr = NF_REDEF (nid) |
---|
348 | #ifdef NC_DOUBLE |
---|
349 | ierr = NF_DEF_VAR (nid,"EVAP"//str2,NF_DOUBLE,1,idim2,nvarid) |
---|
350 | #else |
---|
351 | ierr = NF_DEF_VAR (nid,"EVAP"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
352 | #endif |
---|
353 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
354 | . "Evaporation de surface No."//str2) |
---|
355 | ierr = NF_ENDDEF(nid) |
---|
356 | ELSE |
---|
357 | PRINT*, "Trop de sous-mailles" |
---|
358 | CALL abort |
---|
359 | ENDIF |
---|
360 | #ifdef NC_DOUBLE |
---|
361 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,evap(1,nsrf)) |
---|
362 | #else |
---|
363 | ierr = NF_PUT_VAR_REAL (nid,nvarid,evap(1,nsrf)) |
---|
364 | #endif |
---|
365 | ENDDO |
---|
366 | |
---|
367 | c |
---|
368 | DO nsrf = 1, nbsrf |
---|
369 | IF (nsrf.LE.99) THEN |
---|
370 | WRITE(str2,'(i2.2)') nsrf |
---|
371 | ierr = NF_REDEF (nid) |
---|
372 | #ifdef NC_DOUBLE |
---|
373 | ierr = NF_DEF_VAR (nid,"SNOW"//str2,NF_DOUBLE,1,idim2,nvarid) |
---|
374 | #else |
---|
375 | ierr = NF_DEF_VAR (nid,"SNOW"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
376 | #endif |
---|
377 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22, |
---|
378 | . "Neige de surface No."//str2) |
---|
379 | ierr = NF_ENDDEF(nid) |
---|
380 | ELSE |
---|
381 | PRINT*, "Trop de sous-mailles" |
---|
382 | CALL abort |
---|
383 | ENDIF |
---|
384 | #ifdef NC_DOUBLE |
---|
385 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,snow(1,nsrf)) |
---|
386 | #else |
---|
387 | ierr = NF_PUT_VAR_REAL (nid,nvarid,snow(1,nsrf)) |
---|
388 | #endif |
---|
389 | ENDDO |
---|
390 | |
---|
391 | c |
---|
392 | ierr = NF_REDEF (nid) |
---|
393 | #ifdef NC_DOUBLE |
---|
394 | ierr = NF_DEF_VAR (nid, "RADS", NF_DOUBLE, 1, idim2,nvarid) |
---|
395 | #else |
---|
396 | ierr = NF_DEF_VAR (nid, "RADS", NF_FLOAT, 1, idim2,nvarid) |
---|
397 | #endif |
---|
398 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
399 | . "Rayonnement net a la surface") |
---|
400 | ierr = NF_ENDDEF(nid) |
---|
401 | #ifdef NC_DOUBLE |
---|
402 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,radsol) |
---|
403 | #else |
---|
404 | ierr = NF_PUT_VAR_REAL (nid,nvarid,radsol) |
---|
405 | #endif |
---|
406 | c |
---|
407 | ierr = NF_REDEF (nid) |
---|
408 | #ifdef NC_DOUBLE |
---|
409 | ierr = NF_DEF_VAR (nid, "solsw", NF_DOUBLE, 1, idim2,nvarid) |
---|
410 | #else |
---|
411 | ierr = NF_DEF_VAR (nid, "solsw", NF_FLOAT, 1, idim2,nvarid) |
---|
412 | #endif |
---|
413 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 32, |
---|
414 | . "Rayonnement solaire a la surface") |
---|
415 | ierr = NF_ENDDEF(nid) |
---|
416 | #ifdef NC_DOUBLE |
---|
417 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,solsw) |
---|
418 | #else |
---|
419 | ierr = NF_PUT_VAR_REAL (nid,nvarid,solsw) |
---|
420 | #endif |
---|
421 | c |
---|
422 | ierr = NF_REDEF (nid) |
---|
423 | #ifdef NC_DOUBLE |
---|
424 | ierr = NF_DEF_VAR (nid, "sollw", NF_DOUBLE, 1, idim2,nvarid) |
---|
425 | #else |
---|
426 | ierr = NF_DEF_VAR (nid, "sollw", NF_FLOAT, 1, idim2,nvarid) |
---|
427 | #endif |
---|
428 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 27, |
---|
429 | . "Rayonnement IF a la surface") |
---|
430 | ierr = NF_ENDDEF(nid) |
---|
431 | #ifdef NC_DOUBLE |
---|
432 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,sollw) |
---|
433 | #else |
---|
434 | ierr = NF_PUT_VAR_REAL (nid,nvarid,sollw) |
---|
435 | #endif |
---|
436 | c |
---|
437 | ierr = NF_REDEF (nid) |
---|
438 | #ifdef NC_DOUBLE |
---|
439 | ierr = NF_DEF_VAR (nid, "fder", NF_DOUBLE, 1, idim2,nvarid) |
---|
440 | #else |
---|
441 | ierr = NF_DEF_VAR (nid, "fder", NF_FLOAT, 1, idim2,nvarid) |
---|
442 | #endif |
---|
443 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 14, |
---|
444 | . "Derive de flux") |
---|
445 | ierr = NF_ENDDEF(nid) |
---|
446 | #ifdef NC_DOUBLE |
---|
447 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,fder) |
---|
448 | #else |
---|
449 | ierr = NF_PUT_VAR_REAL (nid,nvarid,fder) |
---|
450 | #endif |
---|
451 | c |
---|
452 | ierr = NF_REDEF (nid) |
---|
453 | #ifdef NC_DOUBLE |
---|
454 | ierr = NF_DEF_VAR (nid, "rain_f", NF_DOUBLE, 1, idim2,nvarid) |
---|
455 | #else |
---|
456 | ierr = NF_DEF_VAR (nid, "rain_f", NF_FLOAT, 1, idim2,nvarid) |
---|
457 | #endif |
---|
458 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 21, |
---|
459 | . "precipitation liquide") |
---|
460 | ierr = NF_ENDDEF(nid) |
---|
461 | #ifdef NC_DOUBLE |
---|
462 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rain_fall) |
---|
463 | #else |
---|
464 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rain_fall) |
---|
465 | #endif |
---|
466 | c |
---|
467 | ierr = NF_REDEF (nid) |
---|
468 | #ifdef NC_DOUBLE |
---|
469 | ierr = NF_DEF_VAR (nid, "snow_f", NF_DOUBLE, 1, idim2,nvarid) |
---|
470 | #else |
---|
471 | ierr = NF_DEF_VAR (nid, "snow_f", NF_FLOAT, 1, idim2,nvarid) |
---|
472 | #endif |
---|
473 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 20, |
---|
474 | . "precipitation solide") |
---|
475 | ierr = NF_ENDDEF(nid) |
---|
476 | #ifdef NC_DOUBLE |
---|
477 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,snow_fall) |
---|
478 | #else |
---|
479 | ierr = NF_PUT_VAR_REAL (nid,nvarid,snow_fall) |
---|
480 | #endif |
---|
481 | c |
---|
482 | DO nsrf = 1, nbsrf |
---|
483 | IF (nsrf.LE.99) THEN |
---|
484 | WRITE(str2,'(i2.2)') nsrf |
---|
485 | ierr = NF_REDEF (nid) |
---|
486 | #ifdef NC_DOUBLE |
---|
487 | ierr = NF_DEF_VAR (nid,"RUG"//str2,NF_DOUBLE,1,idim2,nvarid) |
---|
488 | #else |
---|
489 | ierr = NF_DEF_VAR (nid,"RUG"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
490 | #endif |
---|
491 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 23, |
---|
492 | . "rugosite de surface No."//str2) |
---|
493 | ierr = NF_ENDDEF(nid) |
---|
494 | ELSE |
---|
495 | PRINT*, "Trop de sous-mailles" |
---|
496 | CALL abort |
---|
497 | ENDIF |
---|
498 | #ifdef NC_DOUBLE |
---|
499 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,frugs(1,nsrf)) |
---|
500 | #else |
---|
501 | ierr = NF_PUT_VAR_REAL (nid,nvarid,frugs(1,nsrf)) |
---|
502 | #endif |
---|
503 | ENDDO |
---|
504 | c |
---|
505 | DO nsrf = 1, nbsrf |
---|
506 | IF (nsrf.LE.99) THEN |
---|
507 | WRITE(str2,'(i2.2)') nsrf |
---|
508 | ierr = NF_REDEF (nid) |
---|
509 | #ifdef NC_DOUBLE |
---|
510 | ierr = NF_DEF_VAR (nid,"AGESNO"//str2,NF_DOUBLE,1,idim2 |
---|
511 | $ ,nvarid) |
---|
512 | #else |
---|
513 | ierr = NF_DEF_VAR (nid,"AGESNO"//str2,NF_FLOAT,1,idim2 |
---|
514 | $ ,nvarid) |
---|
515 | #endif |
---|
516 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 15, |
---|
517 | . "Age de la neige surface No."//str2) |
---|
518 | ierr = NF_ENDDEF(nid) |
---|
519 | ELSE |
---|
520 | PRINT*, "Trop de sous-mailles" |
---|
521 | CALL abort |
---|
522 | ENDIF |
---|
523 | #ifdef NC_DOUBLE |
---|
524 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,agesno(1,nsrf)) |
---|
525 | #else |
---|
526 | ierr = NF_PUT_VAR_REAL (nid,nvarid,agesno(1,nsrf)) |
---|
527 | #endif |
---|
528 | ENDDO |
---|
529 | c |
---|
530 | ierr = NF_REDEF (nid) |
---|
531 | #ifdef NC_DOUBLE |
---|
532 | ierr = NF_DEF_VAR (nid, "ZMEA", NF_DOUBLE, 1, idim2,nvarid) |
---|
533 | #else |
---|
534 | ierr = NF_DEF_VAR (nid, "ZMEA", NF_FLOAT, 1, idim2,nvarid) |
---|
535 | #endif |
---|
536 | ierr = NF_ENDDEF(nid) |
---|
537 | #ifdef NC_DOUBLE |
---|
538 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zmea) |
---|
539 | #else |
---|
540 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zmea) |
---|
541 | #endif |
---|
542 | c |
---|
543 | ierr = NF_REDEF (nid) |
---|
544 | #ifdef NC_DOUBLE |
---|
545 | ierr = NF_DEF_VAR (nid, "ZSTD", NF_DOUBLE, 1, idim2,nvarid) |
---|
546 | #else |
---|
547 | ierr = NF_DEF_VAR (nid, "ZSTD", NF_FLOAT, 1, idim2,nvarid) |
---|
548 | #endif |
---|
549 | ierr = NF_ENDDEF(nid) |
---|
550 | #ifdef NC_DOUBLE |
---|
551 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zstd) |
---|
552 | #else |
---|
553 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zstd) |
---|
554 | #endif |
---|
555 | ierr = NF_REDEF (nid) |
---|
556 | #ifdef NC_DOUBLE |
---|
557 | ierr = NF_DEF_VAR (nid, "ZSIG", NF_DOUBLE, 1, idim2,nvarid) |
---|
558 | #else |
---|
559 | ierr = NF_DEF_VAR (nid, "ZSIG", NF_FLOAT, 1, idim2,nvarid) |
---|
560 | #endif |
---|
561 | ierr = NF_ENDDEF(nid) |
---|
562 | #ifdef NC_DOUBLE |
---|
563 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zsig) |
---|
564 | #else |
---|
565 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zsig) |
---|
566 | #endif |
---|
567 | ierr = NF_REDEF (nid) |
---|
568 | #ifdef NC_DOUBLE |
---|
569 | ierr = NF_DEF_VAR (nid, "ZGAM", NF_DOUBLE, 1, idim2,nvarid) |
---|
570 | #else |
---|
571 | ierr = NF_DEF_VAR (nid, "ZGAM", NF_FLOAT, 1, idim2,nvarid) |
---|
572 | #endif |
---|
573 | ierr = NF_ENDDEF(nid) |
---|
574 | #ifdef NC_DOUBLE |
---|
575 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zgam) |
---|
576 | #else |
---|
577 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zgam) |
---|
578 | #endif |
---|
579 | ierr = NF_REDEF (nid) |
---|
580 | #ifdef NC_DOUBLE |
---|
581 | ierr = NF_DEF_VAR (nid, "ZTHE", NF_DOUBLE, 1, idim2,nvarid) |
---|
582 | #else |
---|
583 | ierr = NF_DEF_VAR (nid, "ZTHE", NF_FLOAT, 1, idim2,nvarid) |
---|
584 | #endif |
---|
585 | ierr = NF_ENDDEF(nid) |
---|
586 | #ifdef NC_DOUBLE |
---|
587 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zthe) |
---|
588 | #else |
---|
589 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zthe) |
---|
590 | #endif |
---|
591 | ierr = NF_REDEF (nid) |
---|
592 | #ifdef NC_DOUBLE |
---|
593 | ierr = NF_DEF_VAR (nid, "ZPIC", NF_DOUBLE, 1, idim2,nvarid) |
---|
594 | #else |
---|
595 | ierr = NF_DEF_VAR (nid, "ZPIC", NF_FLOAT, 1, idim2,nvarid) |
---|
596 | #endif |
---|
597 | ierr = NF_ENDDEF(nid) |
---|
598 | #ifdef NC_DOUBLE |
---|
599 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zpic) |
---|
600 | #else |
---|
601 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zpic) |
---|
602 | #endif |
---|
603 | ierr = NF_REDEF (nid) |
---|
604 | #ifdef NC_DOUBLE |
---|
605 | ierr = NF_DEF_VAR (nid, "ZVAL", NF_DOUBLE, 1, idim2,nvarid) |
---|
606 | #else |
---|
607 | ierr = NF_DEF_VAR (nid, "ZVAL", NF_FLOAT, 1, idim2,nvarid) |
---|
608 | #endif |
---|
609 | ierr = NF_ENDDEF(nid) |
---|
610 | #ifdef NC_DOUBLE |
---|
611 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zval) |
---|
612 | #else |
---|
613 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zval) |
---|
614 | #endif |
---|
615 | ierr = NF_REDEF (nid) |
---|
616 | #ifdef NC_DOUBLE |
---|
617 | ierr = NF_DEF_VAR (nid, "RUGSREL", NF_DOUBLE, 1, idim2,nvarid) |
---|
618 | #else |
---|
619 | ierr = NF_DEF_VAR (nid, "RUGSREL", NF_FLOAT, 1, idim2,nvarid) |
---|
620 | #endif |
---|
621 | ierr = NF_ENDDEF(nid) |
---|
622 | #ifdef NC_DOUBLE |
---|
623 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rugsrel) |
---|
624 | #else |
---|
625 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rugsrel) |
---|
626 | #endif |
---|
627 | c |
---|
628 | ierr = NF_REDEF (nid) |
---|
629 | #ifdef NC_DOUBLE |
---|
630 | ierr = NF_DEF_VAR (nid, "TANCIEN", NF_DOUBLE, 1, idim3,nvarid) |
---|
631 | #else |
---|
632 | ierr = NF_DEF_VAR (nid, "TANCIEN", NF_FLOAT, 1, idim3,nvarid) |
---|
633 | #endif |
---|
634 | ierr = NF_ENDDEF(nid) |
---|
635 | #ifdef NC_DOUBLE |
---|
636 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,t_ancien) |
---|
637 | #else |
---|
638 | ierr = NF_PUT_VAR_REAL (nid,nvarid,t_ancien) |
---|
639 | #endif |
---|
640 | c |
---|
641 | ierr = NF_REDEF (nid) |
---|
642 | #ifdef NC_DOUBLE |
---|
643 | ierr = NF_DEF_VAR (nid, "QANCIEN", NF_DOUBLE, 1, idim3,nvarid) |
---|
644 | #else |
---|
645 | ierr = NF_DEF_VAR (nid, "QANCIEN", NF_FLOAT, 1, idim3,nvarid) |
---|
646 | #endif |
---|
647 | ierr = NF_ENDDEF(nid) |
---|
648 | #ifdef NC_DOUBLE |
---|
649 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,q_ancien) |
---|
650 | #else |
---|
651 | ierr = NF_PUT_VAR_REAL (nid,nvarid,q_ancien) |
---|
652 | #endif |
---|
653 | c |
---|
654 | ierr = NF_REDEF (nid) |
---|
655 | #ifdef NC_DOUBLE |
---|
656 | ierr = NF_DEF_VAR (nid, "RUGMER", NF_DOUBLE, 1, idim2,nvarid) |
---|
657 | #else |
---|
658 | ierr = NF_DEF_VAR (nid, "RUGMER", NF_FLOAT, 1, idim2,nvarid) |
---|
659 | #endif |
---|
660 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
661 | . "Longueur de rugosite sur mer") |
---|
662 | ierr = NF_ENDDEF(nid) |
---|
663 | #ifdef NC_DOUBLE |
---|
664 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,frugs(1,is_oce)) |
---|
665 | #else |
---|
666 | ierr = NF_PUT_VAR_REAL (nid,nvarid,frugs(1,is_oce)) |
---|
667 | #endif |
---|
668 | c |
---|
669 | ierr = NF_REDEF (nid) |
---|
670 | #ifdef NC_DOUBLE |
---|
671 | ierr = NF_DEF_VAR (nid, "CLWCON", NF_DOUBLE, 1, idim2,nvarid) |
---|
672 | #else |
---|
673 | ierr = NF_DEF_VAR (nid, "CLWCON", NF_FLOAT, 1, idim2,nvarid) |
---|
674 | #endif |
---|
675 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
676 | . "Eau liquide convective") |
---|
677 | ierr = NF_ENDDEF(nid) |
---|
678 | #ifdef NC_DOUBLE |
---|
679 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,clwcon) |
---|
680 | #else |
---|
681 | ierr = NF_PUT_VAR_REAL (nid,nvarid,clwcon) |
---|
682 | #endif |
---|
683 | c |
---|
684 | ierr = NF_REDEF (nid) |
---|
685 | #ifdef NC_DOUBLE |
---|
686 | ierr = NF_DEF_VAR (nid, "RNEBCON", NF_DOUBLE, 1, idim2,nvarid) |
---|
687 | #else |
---|
688 | ierr = NF_DEF_VAR (nid, "RNEBCON", NF_FLOAT, 1, idim2,nvarid) |
---|
689 | #endif |
---|
690 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
691 | . "Nebulosite convective") |
---|
692 | ierr = NF_ENDDEF(nid) |
---|
693 | #ifdef NC_DOUBLE |
---|
694 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rnebcon) |
---|
695 | #else |
---|
696 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rnebcon) |
---|
697 | #endif |
---|
698 | c |
---|
699 | ierr = NF_REDEF (nid) |
---|
700 | #ifdef NC_DOUBLE |
---|
701 | ierr = NF_DEF_VAR (nid, "RATQS", NF_DOUBLE, 1, idim2,nvarid) |
---|
702 | #else |
---|
703 | ierr = NF_DEF_VAR (nid, "RATQS", NF_FLOAT, 1, idim2,nvarid) |
---|
704 | #endif |
---|
705 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
706 | . "Ratqs") |
---|
707 | ierr = NF_ENDDEF(nid) |
---|
708 | #ifdef NC_DOUBLE |
---|
709 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,ratqs) |
---|
710 | #else |
---|
711 | ierr = NF_PUT_VAR_REAL (nid,nvarid,ratqs) |
---|
712 | #endif |
---|
713 | c |
---|
714 | c |
---|
715 | ierr = NF_CLOSE(nid) |
---|
716 | c |
---|
717 | RETURN |
---|
718 | END |
---|