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