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) |
---|
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 | c |
---|
56 | INTEGER nid, nvarid, idim1, idim2, idim3 |
---|
57 | INTEGER ierr |
---|
58 | INTEGER length |
---|
59 | PARAMETER (length=100) |
---|
60 | REAL tab_cntrl(length) |
---|
61 | c |
---|
62 | INTEGER isoil, nsrf |
---|
63 | CHARACTER*7 str7 |
---|
64 | CHARACTER*2 str2 |
---|
65 | c |
---|
66 | ierr = NF_CREATE(fichnom, NF_CLOBBER, nid) |
---|
67 | IF (ierr.NE.NF_NOERR) THEN |
---|
68 | write(6,*)' Pb d''ouverture du fichier '//fichnom |
---|
69 | write(6,*)' ierr = ', ierr |
---|
70 | CALL ABORT |
---|
71 | ENDIF |
---|
72 | c |
---|
73 | ierr = NF_PUT_ATT_TEXT (nid, NF_GLOBAL, "title", 28, |
---|
74 | . "Fichier redemmarage physique") |
---|
75 | c |
---|
76 | ierr = NF_DEF_DIM (nid, "index", length, idim1) |
---|
77 | ierr = NF_DEF_DIM (nid, "points_physiques", klon, idim2) |
---|
78 | ierr = NF_DEF_DIM (nid, "horizon_vertical", klon*klev, idim3) |
---|
79 | c |
---|
80 | ierr = NF_ENDDEF(nid) |
---|
81 | c |
---|
82 | DO ierr = 1, length |
---|
83 | tab_cntrl(ierr) = 0.0 |
---|
84 | ENDDO |
---|
85 | tab_cntrl(1) = dtime |
---|
86 | tab_cntrl(2) = radpas |
---|
87 | tab_cntrl(3) = co2_ppm |
---|
88 | tab_cntrl(4) = solaire |
---|
89 | tab_cntrl(5) = iflag_con |
---|
90 | tab_cntrl(6) = nbapp_rad |
---|
91 | |
---|
92 | IF( cycle_diurne ) tab_cntrl( 7 ) = 1. |
---|
93 | IF( soil_model ) tab_cntrl( 8 ) = 1. |
---|
94 | IF( new_oliq ) tab_cntrl( 9 ) = 1. |
---|
95 | IF( ok_orodr ) tab_cntrl(10 ) = 1. |
---|
96 | IF( ok_orolf ) tab_cntrl(11 ) = 1. |
---|
97 | |
---|
98 | tab_cntrl(13) = dayref |
---|
99 | tab_cntrl(14) = anneeref |
---|
100 | tab_cntrl(13) = day_end |
---|
101 | tab_cntrl(14) = anne_ini |
---|
102 | c |
---|
103 | ierr = NF_REDEF (nid) |
---|
104 | ierr = NF_DEF_VAR (nid, "controle", NF_FLOAT, 1, idim1,nvarid) |
---|
105 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22, |
---|
106 | . "Parametres de controle") |
---|
107 | ierr = NF_ENDDEF(nid) |
---|
108 | #ifdef NC_DOUBLE |
---|
109 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tab_cntrl) |
---|
110 | #else |
---|
111 | ierr = NF_PUT_VAR_REAL (nid,nvarid,tab_cntrl) |
---|
112 | #endif |
---|
113 | c |
---|
114 | ierr = NF_REDEF (nid) |
---|
115 | ierr = NF_DEF_VAR (nid, "longitude", NF_FLOAT, 1, idim2,nvarid) |
---|
116 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 32, |
---|
117 | . "Longitudes de la grille physique") |
---|
118 | ierr = NF_ENDDEF(nid) |
---|
119 | #ifdef NC_DOUBLE |
---|
120 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlon) |
---|
121 | #else |
---|
122 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rlon) |
---|
123 | #endif |
---|
124 | c |
---|
125 | ierr = NF_REDEF (nid) |
---|
126 | ierr = NF_DEF_VAR (nid, "latitude", NF_FLOAT, 1, idim2,nvarid) |
---|
127 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 31, |
---|
128 | . "Latitudes de la grille physique") |
---|
129 | ierr = NF_ENDDEF(nid) |
---|
130 | #ifdef NC_DOUBLE |
---|
131 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlat) |
---|
132 | #else |
---|
133 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rlat) |
---|
134 | #endif |
---|
135 | c |
---|
136 | C PB ajout du masque terre/mer |
---|
137 | C |
---|
138 | ierr = NF_REDEF (nid) |
---|
139 | ierr = NF_DEF_VAR (nid, "masque", NF_FLOAT, 1, idim2,nvarid) |
---|
140 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 16, |
---|
141 | . "masque terre mer") |
---|
142 | ierr = NF_ENDDEF(nid) |
---|
143 | #ifdef NC_DOUBLE |
---|
144 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zmasq) |
---|
145 | #else |
---|
146 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zmasq) |
---|
147 | #endif |
---|
148 | c BP ajout des fraction de chaque sous-surface |
---|
149 | C |
---|
150 | C 1. fraction de terre |
---|
151 | C |
---|
152 | ierr = NF_REDEF (nid) |
---|
153 | ierr = NF_DEF_VAR (nid, "FTER", NF_FLOAT, 1, idim2,nvarid) |
---|
154 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 21, |
---|
155 | . "fraction de continent") |
---|
156 | ierr = NF_ENDDEF(nid) |
---|
157 | #ifdef NC_DOUBLE |
---|
158 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon, is_ter)) |
---|
159 | #else |
---|
160 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_ter)) |
---|
161 | #endif |
---|
162 | C |
---|
163 | C 2. Fraction de glace de terre |
---|
164 | C |
---|
165 | ierr = NF_REDEF (nid) |
---|
166 | ierr = NF_DEF_VAR (nid, "FLIC", NF_FLOAT, 1, idim2,nvarid) |
---|
167 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 24, |
---|
168 | . "fraction glace de terre") |
---|
169 | ierr = NF_ENDDEF(nid) |
---|
170 | #ifdef NC_DOUBLE |
---|
171 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon,is_lic)) |
---|
172 | #else |
---|
173 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_lic)) |
---|
174 | #endif |
---|
175 | C |
---|
176 | C 3. fraction ocean |
---|
177 | C |
---|
178 | ierr = NF_REDEF (nid) |
---|
179 | ierr = NF_DEF_VAR (nid, "FOCE", NF_FLOAT, 1, idim2,nvarid) |
---|
180 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 14, |
---|
181 | . "fraction ocean") |
---|
182 | ierr = NF_ENDDEF(nid) |
---|
183 | #ifdef NC_DOUBLE |
---|
184 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon, is_oce)) |
---|
185 | #else |
---|
186 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_oce)) |
---|
187 | #endif |
---|
188 | C |
---|
189 | C 4. Fraction glace de mer |
---|
190 | C |
---|
191 | ierr = NF_REDEF (nid) |
---|
192 | ierr = NF_DEF_VAR (nid, "FSIC", NF_FLOAT, 1, idim2,nvarid) |
---|
193 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 18, |
---|
194 | . "fraction glace mer") |
---|
195 | ierr = NF_ENDDEF(nid) |
---|
196 | #ifdef NC_DOUBLE |
---|
197 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon, is_sic)) |
---|
198 | #else |
---|
199 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon, is_sic)) |
---|
200 | #endif |
---|
201 | C |
---|
202 | C |
---|
203 | c |
---|
204 | DO nsrf = 1, nbsrf |
---|
205 | IF (nsrf.LE.99) THEN |
---|
206 | WRITE(str2,'(i2.2)') nsrf |
---|
207 | ierr = NF_REDEF (nid) |
---|
208 | ierr = NF_DEF_VAR (nid, "TS"//str2, NF_FLOAT, 1, idim2,nvarid) |
---|
209 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
210 | . "Temperature de surface No."//str2) |
---|
211 | ierr = NF_ENDDEF(nid) |
---|
212 | ELSE |
---|
213 | PRINT*, "Trop de sous-mailles" |
---|
214 | CALL abort |
---|
215 | ENDIF |
---|
216 | #ifdef NC_DOUBLE |
---|
217 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tsol(1,nsrf)) |
---|
218 | #else |
---|
219 | ierr = NF_PUT_VAR_REAL (nid,nvarid,tsol(1,nsrf)) |
---|
220 | #endif |
---|
221 | ENDDO |
---|
222 | c |
---|
223 | DO nsrf = 1, nbsrf |
---|
224 | DO isoil=1, nsoilmx |
---|
225 | IF (isoil.LE.99 .AND. nsrf.LE.99) THEN |
---|
226 | WRITE(str7,'(i2.2,"srf",i2.2)') isoil,nsrf |
---|
227 | ierr = NF_REDEF (nid) |
---|
228 | ierr = NF_DEF_VAR (nid, "Tsoil"//str7,NF_FLOAT,1,idim2,nvarid) |
---|
229 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 29, |
---|
230 | . "Temperature du sol No."//str7) |
---|
231 | ierr = NF_ENDDEF(nid) |
---|
232 | ELSE |
---|
233 | PRINT*, "Trop de couches" |
---|
234 | CALL abort |
---|
235 | ENDIF |
---|
236 | #ifdef NC_DOUBLE |
---|
237 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tsoil(1,isoil,nsrf)) |
---|
238 | #else |
---|
239 | ierr = NF_PUT_VAR_REAL (nid,nvarid,tsoil(1,isoil,nsrf)) |
---|
240 | #endif |
---|
241 | ENDDO |
---|
242 | ENDDO |
---|
243 | c |
---|
244 | c |
---|
245 | ierr = NF_REDEF (nid) |
---|
246 | ierr = NF_DEF_VAR (nid, "DELTAT", NF_FLOAT, 1, idim2,nvarid) |
---|
247 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 33, |
---|
248 | . "Ecart de la SST (pour slab-ocean)") |
---|
249 | ierr = NF_ENDDEF(nid) |
---|
250 | #ifdef NC_DOUBLE |
---|
251 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,deltat) |
---|
252 | #else |
---|
253 | ierr = NF_PUT_VAR_REAL (nid,nvarid,deltat) |
---|
254 | #endif |
---|
255 | c |
---|
256 | DO nsrf = 1, nbsrf |
---|
257 | IF (nsrf.LE.99) THEN |
---|
258 | WRITE(str2,'(i2.2)') nsrf |
---|
259 | ierr = NF_REDEF (nid) |
---|
260 | ierr = NF_DEF_VAR (nid,"QS"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
261 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 25, |
---|
262 | . "Humidite de surface No."//str2) |
---|
263 | ierr = NF_ENDDEF(nid) |
---|
264 | ELSE |
---|
265 | PRINT*, "Trop de sous-mailles" |
---|
266 | CALL abort |
---|
267 | ENDIF |
---|
268 | #ifdef NC_DOUBLE |
---|
269 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,qsol(1,nsrf)) |
---|
270 | #else |
---|
271 | ierr = NF_PUT_VAR_REAL (nid,nvarid,qsol(1,nsrf)) |
---|
272 | #endif |
---|
273 | ENDDO |
---|
274 | c |
---|
275 | DO nsrf = 1, nbsrf |
---|
276 | IF (nsrf.LE.99) THEN |
---|
277 | WRITE(str2,'(i2.2)') nsrf |
---|
278 | ierr = NF_REDEF (nid) |
---|
279 | ierr = NF_DEF_VAR (nid,"ALBE"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
280 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 23, |
---|
281 | . "albedo de surface No."//str2) |
---|
282 | ierr = NF_ENDDEF(nid) |
---|
283 | ELSE |
---|
284 | PRINT*, "Trop de sous-mailles" |
---|
285 | CALL abort |
---|
286 | ENDIF |
---|
287 | #ifdef NC_DOUBLE |
---|
288 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,albedo(1,nsrf)) |
---|
289 | #else |
---|
290 | ierr = NF_PUT_VAR_REAL (nid,nvarid,albedo(1,nsrf)) |
---|
291 | #endif |
---|
292 | ENDDO |
---|
293 | c |
---|
294 | DO nsrf = 1, nbsrf |
---|
295 | IF (nsrf.LE.99) THEN |
---|
296 | WRITE(str2,'(i2.2)') nsrf |
---|
297 | ierr = NF_REDEF (nid) |
---|
298 | ierr = NF_DEF_VAR (nid,"EVAP"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
299 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
300 | . "Evaporation de surface No."//str2) |
---|
301 | ierr = NF_ENDDEF(nid) |
---|
302 | ELSE |
---|
303 | PRINT*, "Trop de sous-mailles" |
---|
304 | CALL abort |
---|
305 | ENDIF |
---|
306 | #ifdef NC_DOUBLE |
---|
307 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,evap(1,nsrf)) |
---|
308 | #else |
---|
309 | ierr = NF_PUT_VAR_REAL (nid,nvarid,evap(1,nsrf)) |
---|
310 | #endif |
---|
311 | ENDDO |
---|
312 | |
---|
313 | c |
---|
314 | DO nsrf = 1, nbsrf |
---|
315 | IF (nsrf.LE.99) THEN |
---|
316 | WRITE(str2,'(i2.2)') nsrf |
---|
317 | ierr = NF_REDEF (nid) |
---|
318 | ierr = NF_DEF_VAR (nid,"SNOW"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
319 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22, |
---|
320 | . "Neige de surface No."//str2) |
---|
321 | ierr = NF_ENDDEF(nid) |
---|
322 | ELSE |
---|
323 | PRINT*, "Trop de sous-mailles" |
---|
324 | CALL abort |
---|
325 | ENDIF |
---|
326 | #ifdef NC_DOUBLE |
---|
327 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,snow(1,nsrf)) |
---|
328 | #else |
---|
329 | ierr = NF_PUT_VAR_REAL (nid,nvarid,snow(1,nsrf)) |
---|
330 | #endif |
---|
331 | ENDDO |
---|
332 | |
---|
333 | c |
---|
334 | ierr = NF_REDEF (nid) |
---|
335 | ierr = NF_DEF_VAR (nid, "RADS", NF_FLOAT, 1, idim2,nvarid) |
---|
336 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
337 | . "Rayonnement net a la surface") |
---|
338 | ierr = NF_ENDDEF(nid) |
---|
339 | #ifdef NC_DOUBLE |
---|
340 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,radsol) |
---|
341 | #else |
---|
342 | ierr = NF_PUT_VAR_REAL (nid,nvarid,radsol) |
---|
343 | #endif |
---|
344 | c |
---|
345 | ierr = NF_REDEF (nid) |
---|
346 | ierr = NF_DEF_VAR (nid, "solsw", NF_FLOAT, 1, idim2,nvarid) |
---|
347 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 32, |
---|
348 | . "Rayonnement solaire a la surface") |
---|
349 | ierr = NF_ENDDEF(nid) |
---|
350 | #ifdef NC_DOUBLE |
---|
351 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,solsw) |
---|
352 | #else |
---|
353 | ierr = NF_PUT_VAR_REAL (nid,nvarid,solsw) |
---|
354 | #endif |
---|
355 | c |
---|
356 | ierr = NF_REDEF (nid) |
---|
357 | ierr = NF_DEF_VAR (nid, "sollw", NF_FLOAT, 1, idim2,nvarid) |
---|
358 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 27, |
---|
359 | . "Rayonnement IF a la surface") |
---|
360 | ierr = NF_ENDDEF(nid) |
---|
361 | #ifdef NC_DOUBLE |
---|
362 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,sollw) |
---|
363 | #else |
---|
364 | ierr = NF_PUT_VAR_REAL (nid,nvarid,sollw) |
---|
365 | #endif |
---|
366 | c |
---|
367 | ierr = NF_REDEF (nid) |
---|
368 | ierr = NF_DEF_VAR (nid, "fder", NF_FLOAT, 1, idim2,nvarid) |
---|
369 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 14, |
---|
370 | . "Derive de flux") |
---|
371 | ierr = NF_ENDDEF(nid) |
---|
372 | #ifdef NC_DOUBLE |
---|
373 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,fder) |
---|
374 | #else |
---|
375 | ierr = NF_PUT_VAR_REAL (nid,nvarid,fder) |
---|
376 | #endif |
---|
377 | c |
---|
378 | ierr = NF_REDEF (nid) |
---|
379 | ierr = NF_DEF_VAR (nid, "rain_f", NF_FLOAT, 1, idim2,nvarid) |
---|
380 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 21, |
---|
381 | . "precipitation liquide") |
---|
382 | ierr = NF_ENDDEF(nid) |
---|
383 | #ifdef NC_DOUBLE |
---|
384 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rain_fall) |
---|
385 | #else |
---|
386 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rain_fall) |
---|
387 | #endif |
---|
388 | c |
---|
389 | ierr = NF_REDEF (nid) |
---|
390 | ierr = NF_DEF_VAR (nid, "snow_f", NF_FLOAT, 1, idim2,nvarid) |
---|
391 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 20, |
---|
392 | . "precipitation solide") |
---|
393 | ierr = NF_ENDDEF(nid) |
---|
394 | #ifdef NC_DOUBLE |
---|
395 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,snow_fall) |
---|
396 | #else |
---|
397 | ierr = NF_PUT_VAR_REAL (nid,nvarid,snow_fall) |
---|
398 | #endif |
---|
399 | c |
---|
400 | DO nsrf = 1, nbsrf |
---|
401 | IF (nsrf.LE.99) THEN |
---|
402 | WRITE(str2,'(i2.2)') nsrf |
---|
403 | ierr = NF_REDEF (nid) |
---|
404 | ierr = NF_DEF_VAR (nid,"RUG"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
405 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 23, |
---|
406 | . "rugosite de surface No."//str2) |
---|
407 | ierr = NF_ENDDEF(nid) |
---|
408 | ELSE |
---|
409 | PRINT*, "Trop de sous-mailles" |
---|
410 | CALL abort |
---|
411 | ENDIF |
---|
412 | #ifdef NC_DOUBLE |
---|
413 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,frugs(1,nsrf)) |
---|
414 | #else |
---|
415 | ierr = NF_PUT_VAR_REAL (nid,nvarid,frugs(1,nsrf)) |
---|
416 | #endif |
---|
417 | ENDDO |
---|
418 | c |
---|
419 | DO nsrf = 1, nbsrf |
---|
420 | IF (nsrf.LE.99) THEN |
---|
421 | WRITE(str2,'(i2.2)') nsrf |
---|
422 | ierr = NF_REDEF (nid) |
---|
423 | ierr = NF_DEF_VAR (nid,"AGESNO"//str2,NF_FLOAT,1,idim2 |
---|
424 | $ ,nvarid) |
---|
425 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 15, |
---|
426 | . "Age de la neige surface No."//str2) |
---|
427 | ierr = NF_ENDDEF(nid) |
---|
428 | ELSE |
---|
429 | PRINT*, "Trop de sous-mailles" |
---|
430 | CALL abort |
---|
431 | ENDIF |
---|
432 | #ifdef NC_DOUBLE |
---|
433 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,agesno(1,nsrf)) |
---|
434 | #else |
---|
435 | ierr = NF_PUT_VAR_REAL (nid,nvarid,agesno(1,nsrf)) |
---|
436 | #endif |
---|
437 | ENDDO |
---|
438 | c |
---|
439 | ierr = NF_REDEF (nid) |
---|
440 | ierr = NF_DEF_VAR (nid, "ZMEA", NF_FLOAT, 1, idim2,nvarid) |
---|
441 | ierr = NF_ENDDEF(nid) |
---|
442 | #ifdef NC_DOUBLE |
---|
443 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zmea) |
---|
444 | #else |
---|
445 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zmea) |
---|
446 | #endif |
---|
447 | c |
---|
448 | ierr = NF_REDEF (nid) |
---|
449 | ierr = NF_DEF_VAR (nid, "ZSTD", NF_FLOAT, 1, idim2,nvarid) |
---|
450 | ierr = NF_ENDDEF(nid) |
---|
451 | #ifdef NC_DOUBLE |
---|
452 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zstd) |
---|
453 | #else |
---|
454 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zstd) |
---|
455 | #endif |
---|
456 | c |
---|
457 | ierr = NF_REDEF (nid) |
---|
458 | ierr = NF_DEF_VAR (nid, "ZSIG", NF_FLOAT, 1, idim2,nvarid) |
---|
459 | ierr = NF_ENDDEF(nid) |
---|
460 | #ifdef NC_DOUBLE |
---|
461 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zsig) |
---|
462 | #else |
---|
463 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zsig) |
---|
464 | #endif |
---|
465 | c |
---|
466 | ierr = NF_REDEF (nid) |
---|
467 | ierr = NF_DEF_VAR (nid, "ZGAM", NF_FLOAT, 1, idim2,nvarid) |
---|
468 | ierr = NF_ENDDEF(nid) |
---|
469 | #ifdef NC_DOUBLE |
---|
470 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zgam) |
---|
471 | #else |
---|
472 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zgam) |
---|
473 | #endif |
---|
474 | c |
---|
475 | ierr = NF_REDEF (nid) |
---|
476 | ierr = NF_DEF_VAR (nid, "ZTHE", NF_FLOAT, 1, idim2,nvarid) |
---|
477 | ierr = NF_ENDDEF(nid) |
---|
478 | #ifdef NC_DOUBLE |
---|
479 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zthe) |
---|
480 | #else |
---|
481 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zthe) |
---|
482 | #endif |
---|
483 | c |
---|
484 | ierr = NF_REDEF (nid) |
---|
485 | ierr = NF_DEF_VAR (nid, "ZPIC", NF_FLOAT, 1, idim2,nvarid) |
---|
486 | ierr = NF_ENDDEF(nid) |
---|
487 | #ifdef NC_DOUBLE |
---|
488 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zpic) |
---|
489 | #else |
---|
490 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zpic) |
---|
491 | #endif |
---|
492 | c |
---|
493 | ierr = NF_REDEF (nid) |
---|
494 | ierr = NF_DEF_VAR (nid, "ZVAL", NF_FLOAT, 1, idim2,nvarid) |
---|
495 | ierr = NF_ENDDEF(nid) |
---|
496 | #ifdef NC_DOUBLE |
---|
497 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zval) |
---|
498 | #else |
---|
499 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zval) |
---|
500 | #endif |
---|
501 | c |
---|
502 | ierr = NF_REDEF (nid) |
---|
503 | ierr = NF_DEF_VAR (nid, "RUGSREL", NF_FLOAT, 1, idim2,nvarid) |
---|
504 | ierr = NF_ENDDEF(nid) |
---|
505 | #ifdef NC_DOUBLE |
---|
506 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rugsrel) |
---|
507 | #else |
---|
508 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rugsrel) |
---|
509 | #endif |
---|
510 | c |
---|
511 | ierr = NF_REDEF (nid) |
---|
512 | ierr = NF_DEF_VAR (nid, "TANCIEN", NF_FLOAT, 1, idim3,nvarid) |
---|
513 | ierr = NF_ENDDEF(nid) |
---|
514 | #ifdef NC_DOUBLE |
---|
515 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,t_ancien) |
---|
516 | #else |
---|
517 | ierr = NF_PUT_VAR_REAL (nid,nvarid,t_ancien) |
---|
518 | #endif |
---|
519 | c |
---|
520 | ierr = NF_REDEF (nid) |
---|
521 | ierr = NF_DEF_VAR (nid, "QANCIEN", NF_FLOAT, 1, idim3,nvarid) |
---|
522 | ierr = NF_ENDDEF(nid) |
---|
523 | #ifdef NC_DOUBLE |
---|
524 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,q_ancien) |
---|
525 | #else |
---|
526 | ierr = NF_PUT_VAR_REAL (nid,nvarid,q_ancien) |
---|
527 | #endif |
---|
528 | c |
---|
529 | ierr = NF_REDEF (nid) |
---|
530 | ierr = NF_DEF_VAR (nid, "RUGMER", NF_FLOAT, 1, idim2,nvarid) |
---|
531 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
532 | . "Longueur de rugosite sur mer") |
---|
533 | ierr = NF_ENDDEF(nid) |
---|
534 | #ifdef NC_DOUBLE |
---|
535 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,frugs(1,is_oce)) |
---|
536 | #else |
---|
537 | ierr = NF_PUT_VAR_REAL (nid,nvarid,frugs(1,is_oce)) |
---|
538 | #endif |
---|
539 | c |
---|
540 | c |
---|
541 | ierr = NF_CLOSE(nid) |
---|
542 | c |
---|
543 | RETURN |
---|
544 | END |
---|