1 | ! |
---|
2 | ! $Header$ |
---|
3 | ! |
---|
4 | c |
---|
5 | SUBROUTINE phyredem (fichnom,dtime,radpas, |
---|
6 | . rlat_p,rlon_p, pctsrf_p,tsol_p,tsoil_p, |
---|
7 | cIM "slab" ocean |
---|
8 | . tslab,seaice, |
---|
9 | . qsurf_p,qsol_p,snow_p,albedo_p, alblw_p, evap_p, |
---|
10 | . rain_fall_p, snow_fall_p,solsw_p, sollw_p,fder_p, |
---|
11 | . radsol_p,frugs_p,agesno_p,zmea_p,zstd_p,zsig_p, |
---|
12 | . zgam_p,zthe_p,zpic_p,zval_p,rugsrel_p, |
---|
13 | . t_ancien_p, q_ancien_p, rnebcon_p, ratqs_p, clwcon_p, |
---|
14 | . run_off_lic_0_p) |
---|
15 | USE dimphy |
---|
16 | IMPLICIT none |
---|
17 | c====================================================================== |
---|
18 | c Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818 |
---|
19 | c Objet: Ecriture de l'etat de redemarrage pour la physique |
---|
20 | c====================================================================== |
---|
21 | cym#include "dimensions.h" |
---|
22 | cym#include "dimphy.h" |
---|
23 | #include "netcdf.inc" |
---|
24 | #include "indicesol.h" |
---|
25 | #include "dimsoil.h" |
---|
26 | #include "clesphys.h" |
---|
27 | #include "control.h" |
---|
28 | #include "temps.h" |
---|
29 | c====================================================================== |
---|
30 | CHARACTER*(*) fichnom |
---|
31 | REAL dtime |
---|
32 | INTEGER radpas |
---|
33 | REAL rlat_p(klon), rlon_p(klon) |
---|
34 | REAL tsol_p(klon,nbsrf) |
---|
35 | REAL tsoil_p(klon,nsoilmx,nbsrf) |
---|
36 | cIM "slab" ocean |
---|
37 | REAL tslab_p(klon), seaice_p(klon) |
---|
38 | REAL qsurf_p(klon,nbsrf) |
---|
39 | REAL qsol_p(klon) |
---|
40 | REAL snow_p(klon,nbsrf) |
---|
41 | REAL albedo_p(klon,nbsrf) |
---|
42 | cIM BEG |
---|
43 | REAL alblw_p(klon,nbsrf) |
---|
44 | cIM END |
---|
45 | REAL evap_p(klon,nbsrf) |
---|
46 | REAL rain_fall_p(klon) |
---|
47 | REAL snow_fall_p(klon) |
---|
48 | real solsw_p(klon) |
---|
49 | real sollw_p(klon) |
---|
50 | real fder_p(klon) |
---|
51 | REAL radsol_p(klon) |
---|
52 | REAL frugs_p(klon,nbsrf) |
---|
53 | REAL agesno_p(klon,nbsrf) |
---|
54 | REAL zmea_p(klon) |
---|
55 | REAL zstd_p(klon) |
---|
56 | REAL zsig_p(klon) |
---|
57 | REAL zgam_p(klon) |
---|
58 | REAL zthe_p(klon) |
---|
59 | REAL zpic_p(klon) |
---|
60 | REAL zval_p(klon) |
---|
61 | REAL rugsrel_p(klon) |
---|
62 | REAL pctsrf_p(klon, nbsrf) |
---|
63 | REAL t_ancien_p(klon,klev), q_ancien_p(klon,klev) |
---|
64 | real clwcon_p(klon,klev),rnebcon_p(klon,klev),ratqs_p(klon,klev) |
---|
65 | REAL run_off_lic_0_p(klon) |
---|
66 | |
---|
67 | REAL rlat(klon2), rlon(klon2) |
---|
68 | REAL tsol(klon2,nbsrf) |
---|
69 | REAL tsoil(klon2,nsoilmx,nbsrf) |
---|
70 | REAL tslab(klon2), seaice(klon2) |
---|
71 | REAL qsurf(klon2,nbsrf) |
---|
72 | REAL qsol(klon2) |
---|
73 | REAL snow(klon2,nbsrf) |
---|
74 | REAL albedo(klon2,nbsrf) |
---|
75 | REAL alblw(klon2,nbsrf) |
---|
76 | REAL evap(klon2,nbsrf) |
---|
77 | REAL rain_fall(klon2) |
---|
78 | REAL snow_fall(klon2) |
---|
79 | real solsw(klon2) |
---|
80 | real sollw(klon2) |
---|
81 | real fder(klon2) |
---|
82 | REAL radsol(klon2) |
---|
83 | REAL frugs(klon2,nbsrf) |
---|
84 | REAL agesno(klon2,nbsrf) |
---|
85 | REAL zmea(klon2) |
---|
86 | REAL zstd(klon2) |
---|
87 | REAL zsig(klon2) |
---|
88 | REAL zgam(klon2) |
---|
89 | REAL zthe(klon2) |
---|
90 | REAL zpic(klon2) |
---|
91 | REAL zval(klon2) |
---|
92 | REAL rugsrel(klon2) |
---|
93 | REAL pctsrf(klon2, nbsrf) |
---|
94 | REAL t_ancien(klon2,klev), q_ancien(klon2,klev) |
---|
95 | real clwcon(klon2,klev),rnebcon(klon2,klev),ratqs(klon2,klev) |
---|
96 | REAL run_off_lic_0(klon2) |
---|
97 | REAL masq(klon2) |
---|
98 | c |
---|
99 | INTEGER nid, nvarid, idim1, idim2, idim3 |
---|
100 | INTEGER ierr |
---|
101 | INTEGER length |
---|
102 | PARAMETER (length=100) |
---|
103 | REAL tab_cntrl(length) |
---|
104 | c |
---|
105 | INTEGER isoil, nsrf |
---|
106 | CHARACTER*7 str7 |
---|
107 | CHARACTER*2 str2 |
---|
108 | c |
---|
109 | REAL,SAVE,ALLOCATABLE :: rlat_mpi(:), rlon_mpi(:) |
---|
110 | REAL,SAVE,ALLOCATABLE :: tsol_mpi(:,:) |
---|
111 | REAL,SAVE,ALLOCATABLE :: tsoil_mpi(:,:,:) |
---|
112 | REAL,SAVE,ALLOCATABLE :: tslab_mpi(:) |
---|
113 | REAL,SAVE,ALLOCATABLE :: seaice_mpi(:) |
---|
114 | REAL,SAVE,ALLOCATABLE :: qsurf_mpi(:,:) |
---|
115 | REAL,SAVE,ALLOCATABLE :: qsol_mpi(:) |
---|
116 | REAL,SAVE,ALLOCATABLE :: snow_mpi(:,:) |
---|
117 | REAL,SAVE,ALLOCATABLE :: albedo_mpi(:,:) |
---|
118 | REAL,SAVE,ALLOCATABLE :: alblw_mpi(:,:) |
---|
119 | REAL,SAVE,ALLOCATABLE :: evap_mpi(:,:) |
---|
120 | REAL,SAVE,ALLOCATABLE :: rain_fall_mpi(:) |
---|
121 | REAL,SAVE,ALLOCATABLE :: snow_fall_mpi(:) |
---|
122 | REAL,SAVE,ALLOCATABLE :: solsw_mpi(:) |
---|
123 | REAL,SAVE,ALLOCATABLE :: sollw_mpi(:) |
---|
124 | REAL,SAVE,ALLOCATABLE :: fder_mpi(:) |
---|
125 | REAL,SAVE,ALLOCATABLE :: radsol_mpi(:) |
---|
126 | REAL,SAVE,ALLOCATABLE :: frugs_mpi(:,:) |
---|
127 | REAL,SAVE,ALLOCATABLE :: agesno_mpi(:,:) |
---|
128 | REAL,SAVE,ALLOCATABLE :: zmea_mpi(:) |
---|
129 | REAL,SAVE,ALLOCATABLE :: zstd_mpi(:) |
---|
130 | REAL,SAVE,ALLOCATABLE :: zsig_mpi(:) |
---|
131 | REAL,SAVE,ALLOCATABLE :: zgam_mpi(:) |
---|
132 | REAL,SAVE,ALLOCATABLE :: zthe_mpi(:) |
---|
133 | REAL,SAVE,ALLOCATABLE :: zpic_mpi(:) |
---|
134 | REAL,SAVE,ALLOCATABLE :: zval_mpi(:) |
---|
135 | REAL,SAVE,ALLOCATABLE :: rugsrel_mpi(:) |
---|
136 | REAL,SAVE,ALLOCATABLE :: pctsrf_mpi(:, :) |
---|
137 | REAL,SAVE,ALLOCATABLE :: t_ancien_mpi(:,:), q_ancien_mpi(:,:) |
---|
138 | REAL,SAVE,ALLOCATABLE :: clwcon_mpi(:,:),rnebcon_mpi(:,:) |
---|
139 | REAL,SAVE,ALLOCATABLE :: ratqs_mpi(:,:) |
---|
140 | REAL,SAVE,ALLOCATABLE :: run_off_lic_0_mpi(:) |
---|
141 | REAL,SAVE,ALLOCATABLE :: masq_mpi(:) |
---|
142 | |
---|
143 | c$OMP MASTER |
---|
144 | ALLOCATE( rlat_mpi(klon_mpi), rlon_mpi(klon_mpi)) |
---|
145 | ALLOCATE( tsol_mpi(klon_mpi,nbsrf)) |
---|
146 | ALLOCATE( tsoil_mpi(klon_mpi,nsoilmx,nbsrf)) |
---|
147 | ALLOCATE( tslab_mpi(klon_mpi)) |
---|
148 | ALLOCATE( seaice_mpi(klon_mpi)) |
---|
149 | ALLOCATE( qsurf_mpi(klon_mpi,nbsrf)) |
---|
150 | ALLOCATE( qsol_mpi(klon_mpi)) |
---|
151 | ALLOCATE( snow_mpi(klon_mpi,nbsrf)) |
---|
152 | ALLOCATE( albedo_mpi(klon_mpi,nbsrf)) |
---|
153 | ALLOCATE( alblw_mpi(klon_mpi,nbsrf)) |
---|
154 | ALLOCATE( evap_mpi(klon_mpi,nbsrf)) |
---|
155 | ALLOCATE( rain_fall_mpi(klon_mpi)) |
---|
156 | ALLOCATE( snow_fall_mpi(klon_mpi)) |
---|
157 | ALLOCATE( solsw_mpi(klon_mpi)) |
---|
158 | ALLOCATE( sollw_mpi(klon_mpi)) |
---|
159 | ALLOCATE( fder_mpi(klon_mpi)) |
---|
160 | ALLOCATE( radsol_mpi(klon_mpi)) |
---|
161 | ALLOCATE( frugs_mpi(klon_mpi,nbsrf)) |
---|
162 | ALLOCATE( agesno_mpi(klon_mpi,nbsrf)) |
---|
163 | ALLOCATE( zmea_mpi(klon_mpi)) |
---|
164 | ALLOCATE( zstd_mpi(klon_mpi)) |
---|
165 | ALLOCATE( zsig_mpi(klon_mpi)) |
---|
166 | ALLOCATE( zgam_mpi(klon_mpi)) |
---|
167 | ALLOCATE( zthe_mpi(klon_mpi)) |
---|
168 | ALLOCATE( zpic_mpi(klon_mpi)) |
---|
169 | ALLOCATE( zval_mpi(klon_mpi)) |
---|
170 | ALLOCATE( rugsrel_mpi(klon_mpi)) |
---|
171 | ALLOCATE( pctsrf_mpi(klon_mpi, nbsrf)) |
---|
172 | ALLOCATE( t_ancien_mpi(klon_mpi,klev)) |
---|
173 | ALLOCATE( q_ancien_mpi(klon_mpi,klev)) |
---|
174 | ALLOCATE( clwcon_mpi(klon_mpi,klev),rnebcon_mpi(klon_mpi,klev)) |
---|
175 | ALLOCATE( ratqs_mpi(klon_mpi,klev)) |
---|
176 | ALLOCATE( run_off_lic_0_mpi(klon_mpi)) |
---|
177 | ALLOCATE( masq_mpi(klon_mpi)) |
---|
178 | c$OMP END MASTER |
---|
179 | c$OMP BARRIER |
---|
180 | |
---|
181 | call GatherField_omp( rlat_p,rlat_mpi,1) |
---|
182 | call GatherField_omp( rlon_p,rlon_mpi,1) |
---|
183 | call GatherField_omp( tsol_p,tsol_mpi,nbsrf) |
---|
184 | call GatherField_omp( tsoil_p,tsoil_mpi,nsoilmx*nbsrf) |
---|
185 | call GatherField_omp( tslab_p,tslab_mpi,1) |
---|
186 | call GatherField_omp( seaice_p,seaice_mpi,1) |
---|
187 | call GatherField_omp( qsurf_p,qsurf_mpi,nbsrf) |
---|
188 | call GatherField_omp( qsol_p,qsol_mpi,1) |
---|
189 | call GatherField_omp( snow_p,snow_mpi,nbsrf) |
---|
190 | call GatherField_omp( albedo_p,albedo_mpi,nbsrf) |
---|
191 | call GatherField_omp( alblw_p,alblw_mpi,nbsrf) |
---|
192 | call GatherField_omp( evap_p,evap_mpi,nbsrf) |
---|
193 | call GatherField_omp( radsol_p,radsol_mpi,1) |
---|
194 | call GatherField_omp( rain_fall_p,rain_fall_mpi,1) |
---|
195 | call GatherField_omp( snow_fall_p,snow_fall_mpi,1) |
---|
196 | call GatherField_omp( sollw_p,sollw_mpi,1) |
---|
197 | call GatherField_omp( solsw_p,solsw_mpi,1) |
---|
198 | call GatherField_omp( fder_p,fder_mpi,1) |
---|
199 | call GatherField_omp( frugs_p,frugs_mpi,nbsrf) |
---|
200 | call GatherField_omp( agesno_p,agesno_mpi,nbsrf) |
---|
201 | call GatherField_omp( zmea_p,zmea_mpi,1) |
---|
202 | call GatherField_omp( zstd_p,zstd_mpi,1) |
---|
203 | call GatherField_omp( zsig_p,zsig_mpi,1) |
---|
204 | call GatherField_omp( zgam_p,zgam_mpi,1) |
---|
205 | call GatherField_omp( zthe_p,zthe_mpi,1) |
---|
206 | call GatherField_omp( zpic_p,zpic_mpi,1) |
---|
207 | call GatherField_omp( zval_p,zval_mpi,1) |
---|
208 | call GatherField_omp( rugsrel_p,rugsrel_mpi,1) |
---|
209 | call GatherField_omp( pctsrf_p,pctsrf_mpi, nbsrf) |
---|
210 | call GatherField_omp( run_off_lic_0_p,run_off_lic_0_mpi,1) |
---|
211 | call GatherField_omp( t_ancien_p,t_ancien_mpi,klev) |
---|
212 | call GatherField_omp( q_ancien_p,q_ancien_mpi,klev) |
---|
213 | call GatherField_omp( rnebcon_p,rnebcon_mpi,klev) |
---|
214 | call GatherField_omp( clwcon_p,clwcon_mpi,klev) |
---|
215 | call GatherField_omp( ratqs_p,ratqs_mpi,klev) |
---|
216 | call GatherField_omp( zmasq,masq_mpi,1) |
---|
217 | |
---|
218 | c$OMP MASTER |
---|
219 | call GatherField( rlat_mpi,rlat,1) |
---|
220 | call GatherField( rlon_mpi,rlon,1) |
---|
221 | call GatherField( tsol_mpi,tsol,nbsrf) |
---|
222 | call GatherField( tsoil_mpi,tsoil,nsoilmx*nbsrf) |
---|
223 | call GatherField( tslab_mpi,tslab,1) |
---|
224 | call GatherField( seaice_mpi,seaice,1) |
---|
225 | call GatherField( qsurf_mpi,qsurf,nbsrf) |
---|
226 | call GatherField( qsol_mpi,qsol,1) |
---|
227 | call GatherField( snow_mpi,snow,nbsrf) |
---|
228 | call GatherField( albedo_mpi,albedo,nbsrf) |
---|
229 | call GatherField( alblw_mpi,alblw,nbsrf) |
---|
230 | call GatherField( evap_mpi,evap,nbsrf) |
---|
231 | call GatherField( radsol_mpi,radsol,1) |
---|
232 | call GatherField( rain_fall_mpi,rain_fall,1) |
---|
233 | call GatherField( snow_fall_mpi,snow_fall,1) |
---|
234 | call GatherField( sollw_mpi,sollw,1) |
---|
235 | call GatherField( solsw_mpi,solsw,1) |
---|
236 | call GatherField( fder_mpi,fder,1) |
---|
237 | call GatherField( frugs_mpi,frugs,nbsrf) |
---|
238 | call GatherField( agesno_mpi,agesno,nbsrf) |
---|
239 | call GatherField( zmea_mpi,zmea,1) |
---|
240 | call GatherField( zstd_mpi,zstd,1) |
---|
241 | call GatherField( zsig_mpi,zsig,1) |
---|
242 | call GatherField( zgam_mpi,zgam,1) |
---|
243 | call GatherField( zthe_mpi,zthe,1) |
---|
244 | call GatherField( zpic_mpi,zpic,1) |
---|
245 | call GatherField( zval_mpi,zval,1) |
---|
246 | call GatherField( rugsrel_mpi,rugsrel,1) |
---|
247 | call GatherField( pctsrf_mpi,pctsrf, nbsrf) |
---|
248 | call GatherField( run_off_lic_0_mpi,run_off_lic_0,1) |
---|
249 | call GatherField( t_ancien_mpi,t_ancien,klev) |
---|
250 | call GatherField( q_ancien_mpi,q_ancien,klev) |
---|
251 | call GatherField( rnebcon_mpi,rnebcon,klev) |
---|
252 | call GatherField( clwcon_mpi,clwcon,klev) |
---|
253 | call GatherField( ratqs_mpi,ratqs,klev) |
---|
254 | call GatherField( masq_mpi,masq,1) |
---|
255 | |
---|
256 | DEALLOCATE( rlat_mpi, rlon_mpi) |
---|
257 | DEALLOCATE( tsol_mpi) |
---|
258 | DEALLOCATE( tsoil_mpi) |
---|
259 | DEALLOCATE( tslab_mpi) |
---|
260 | DEALLOCATE( seaice_mpi) |
---|
261 | DEALLOCATE( qsurf_mpi) |
---|
262 | DEALLOCATE( qsol_mpi) |
---|
263 | DEALLOCATE( snow_mpi) |
---|
264 | DEALLOCATE( albedo_mpi) |
---|
265 | DEALLOCATE( alblw_mpi) |
---|
266 | DEALLOCATE( evap_mpi) |
---|
267 | DEALLOCATE( rain_fall_mpi) |
---|
268 | DEALLOCATE( snow_fall_mpi) |
---|
269 | DEALLOCATE( solsw_mpi) |
---|
270 | DEALLOCATE( sollw_mpi) |
---|
271 | DEALLOCATE( fder_mpi) |
---|
272 | DEALLOCATE( radsol_mpi) |
---|
273 | DEALLOCATE( frugs_mpi) |
---|
274 | DEALLOCATE( agesno_mpi) |
---|
275 | DEALLOCATE( zmea_mpi) |
---|
276 | DEALLOCATE( zstd_mpi) |
---|
277 | DEALLOCATE( zsig_mpi) |
---|
278 | DEALLOCATE( zgam_mpi) |
---|
279 | DEALLOCATE( zthe_mpi) |
---|
280 | DEALLOCATE( zpic_mpi) |
---|
281 | DEALLOCATE( zval_mpi) |
---|
282 | DEALLOCATE( rugsrel_mpi) |
---|
283 | DEALLOCATE( pctsrf_mpi) |
---|
284 | DEALLOCATE( t_ancien_mpi) |
---|
285 | DEALLOCATE( q_ancien_mpi) |
---|
286 | DEALLOCATE( clwcon_mpi,rnebcon_mpi) |
---|
287 | DEALLOCATE( ratqs_mpi) |
---|
288 | DEALLOCATE( run_off_lic_0_mpi) |
---|
289 | DEALLOCATE( masq_mpi) |
---|
290 | |
---|
291 | if (phy_rank==0) then |
---|
292 | |
---|
293 | ierr = NF_CREATE(fichnom, NF_CLOBBER, nid) |
---|
294 | IF (ierr.NE.NF_NOERR) THEN |
---|
295 | write(6,*)' Pb d''ouverture du fichier '//fichnom |
---|
296 | write(6,*)' ierr = ', ierr |
---|
297 | CALL ABORT |
---|
298 | ENDIF |
---|
299 | c |
---|
300 | ierr = NF_PUT_ATT_TEXT (nid, NF_GLOBAL, "title", 28, |
---|
301 | . "Fichier redemmarage physique") |
---|
302 | c |
---|
303 | ierr = NF_DEF_DIM (nid, "index", length, idim1) |
---|
304 | ierr = NF_DEF_DIM (nid, "points_physiques", klon2, idim2) |
---|
305 | ierr = NF_DEF_DIM (nid, "horizon_vertical", klon2*klev, idim3) |
---|
306 | c |
---|
307 | ierr = NF_ENDDEF(nid) |
---|
308 | c |
---|
309 | DO ierr = 1, length |
---|
310 | tab_cntrl(ierr) = 0.0 |
---|
311 | ENDDO |
---|
312 | tab_cntrl(1) = dtime |
---|
313 | tab_cntrl(2) = radpas |
---|
314 | tab_cntrl(3) = co2_ppm |
---|
315 | tab_cntrl(4) = solaire |
---|
316 | tab_cntrl(5) = iflag_con |
---|
317 | tab_cntrl(6) = nbapp_rad |
---|
318 | |
---|
319 | IF( cycle_diurne ) tab_cntrl( 7 ) = 1. |
---|
320 | IF( soil_model ) tab_cntrl( 8 ) = 1. |
---|
321 | IF( new_oliq ) tab_cntrl( 9 ) = 1. |
---|
322 | IF( ok_orodr ) tab_cntrl(10 ) = 1. |
---|
323 | IF( ok_orolf ) tab_cntrl(11 ) = 1. |
---|
324 | |
---|
325 | tab_cntrl(13) = day_end |
---|
326 | tab_cntrl(14) = annee_ref |
---|
327 | tab_cntrl(15) = itau_phy |
---|
328 | c |
---|
329 | ierr = NF_REDEF (nid) |
---|
330 | #ifdef NC_DOUBLE |
---|
331 | ierr = NF_DEF_VAR (nid, "controle", NF_DOUBLE, 1, idim1,nvarid) |
---|
332 | #else |
---|
333 | ierr = NF_DEF_VAR (nid, "controle", NF_FLOAT, 1, idim1,nvarid) |
---|
334 | #endif |
---|
335 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22, |
---|
336 | . "Parametres de controle") |
---|
337 | ierr = NF_ENDDEF(nid) |
---|
338 | #ifdef NC_DOUBLE |
---|
339 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tab_cntrl) |
---|
340 | #else |
---|
341 | ierr = NF_PUT_VAR_REAL (nid,nvarid,tab_cntrl) |
---|
342 | #endif |
---|
343 | c |
---|
344 | ierr = NF_REDEF (nid) |
---|
345 | #ifdef NC_DOUBLE |
---|
346 | ierr = NF_DEF_VAR (nid, "longitude", NF_DOUBLE, 1, idim2,nvarid) |
---|
347 | #else |
---|
348 | ierr = NF_DEF_VAR (nid, "longitude", NF_FLOAT, 1, idim2,nvarid) |
---|
349 | #endif |
---|
350 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 32, |
---|
351 | . "Longitudes de la grille physique") |
---|
352 | ierr = NF_ENDDEF(nid) |
---|
353 | #ifdef NC_DOUBLE |
---|
354 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlon) |
---|
355 | #else |
---|
356 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rlon) |
---|
357 | #endif |
---|
358 | c |
---|
359 | ierr = NF_REDEF (nid) |
---|
360 | #ifdef NC_DOUBLE |
---|
361 | ierr = NF_DEF_VAR (nid, "latitude", NF_DOUBLE, 1, idim2,nvarid) |
---|
362 | #else |
---|
363 | ierr = NF_DEF_VAR (nid, "latitude", NF_FLOAT, 1, idim2,nvarid) |
---|
364 | #endif |
---|
365 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 31, |
---|
366 | . "Latitudes de la grille physique") |
---|
367 | ierr = NF_ENDDEF(nid) |
---|
368 | #ifdef NC_DOUBLE |
---|
369 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlat) |
---|
370 | #else |
---|
371 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rlat) |
---|
372 | #endif |
---|
373 | c |
---|
374 | C PB ajout du masque terre/mer |
---|
375 | C |
---|
376 | ierr = NF_REDEF (nid) |
---|
377 | #ifdef NC_DOUBLE |
---|
378 | ierr = NF_DEF_VAR (nid, "masque", NF_DOUBLE, 1, idim2,nvarid) |
---|
379 | #else |
---|
380 | ierr = NF_DEF_VAR (nid, "masque", NF_FLOAT, 1, idim2,nvarid) |
---|
381 | #endif |
---|
382 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 16, |
---|
383 | . "masque terre mer") |
---|
384 | ierr = NF_ENDDEF(nid) |
---|
385 | #ifdef NC_DOUBLE |
---|
386 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,masq) |
---|
387 | #else |
---|
388 | ierr = NF_PUT_VAR_REAL (nid,nvarid,masq) |
---|
389 | #endif |
---|
390 | c BP ajout des fraction de chaque sous-surface |
---|
391 | C |
---|
392 | C 1. fraction de terre |
---|
393 | C |
---|
394 | ierr = NF_REDEF (nid) |
---|
395 | #ifdef NC_DOUBLE |
---|
396 | ierr = NF_DEF_VAR (nid, "FTER", NF_DOUBLE, 1, idim2,nvarid) |
---|
397 | #else |
---|
398 | ierr = NF_DEF_VAR (nid, "FTER", NF_FLOAT, 1, idim2,nvarid) |
---|
399 | #endif |
---|
400 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 21, |
---|
401 | . "fraction de continent") |
---|
402 | ierr = NF_ENDDEF(nid) |
---|
403 | #ifdef NC_DOUBLE |
---|
404 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon2, is_ter)) |
---|
405 | #else |
---|
406 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon2, is_ter)) |
---|
407 | #endif |
---|
408 | C |
---|
409 | C 2. Fraction de glace de terre |
---|
410 | C |
---|
411 | ierr = NF_REDEF (nid) |
---|
412 | #ifdef NC_DOUBLE |
---|
413 | ierr = NF_DEF_VAR (nid, "FLIC", NF_DOUBLE, 1, idim2,nvarid) |
---|
414 | #else |
---|
415 | ierr = NF_DEF_VAR (nid, "FLIC", NF_FLOAT, 1, idim2,nvarid) |
---|
416 | #endif |
---|
417 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 24, |
---|
418 | . "fraction glace de terre") |
---|
419 | ierr = NF_ENDDEF(nid) |
---|
420 | #ifdef NC_DOUBLE |
---|
421 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon2,is_lic)) |
---|
422 | #else |
---|
423 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon2, is_lic)) |
---|
424 | #endif |
---|
425 | C |
---|
426 | C 3. fraction ocean |
---|
427 | C |
---|
428 | ierr = NF_REDEF (nid) |
---|
429 | #ifdef NC_DOUBLE |
---|
430 | ierr = NF_DEF_VAR (nid, "FOCE", NF_DOUBLE, 1, idim2,nvarid) |
---|
431 | #else |
---|
432 | ierr = NF_DEF_VAR (nid, "FOCE", NF_FLOAT, 1, idim2,nvarid) |
---|
433 | #endif |
---|
434 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 14, |
---|
435 | . "fraction ocean") |
---|
436 | ierr = NF_ENDDEF(nid) |
---|
437 | #ifdef NC_DOUBLE |
---|
438 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon2, is_oce)) |
---|
439 | #else |
---|
440 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon2, is_oce)) |
---|
441 | #endif |
---|
442 | C |
---|
443 | C 4. Fraction glace de mer |
---|
444 | C |
---|
445 | ierr = NF_REDEF (nid) |
---|
446 | #ifdef NC_DOUBLE |
---|
447 | ierr = NF_DEF_VAR (nid, "FSIC", NF_DOUBLE, 1, idim2,nvarid) |
---|
448 | #else |
---|
449 | ierr = NF_DEF_VAR (nid, "FSIC", NF_FLOAT, 1, idim2,nvarid) |
---|
450 | #endif |
---|
451 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 18, |
---|
452 | . "fraction glace mer") |
---|
453 | ierr = NF_ENDDEF(nid) |
---|
454 | #ifdef NC_DOUBLE |
---|
455 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon2, is_sic)) |
---|
456 | #else |
---|
457 | ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon2, is_sic)) |
---|
458 | #endif |
---|
459 | C |
---|
460 | C |
---|
461 | c |
---|
462 | DO nsrf = 1, nbsrf |
---|
463 | IF (nsrf.LE.99) THEN |
---|
464 | WRITE(str2,'(i2.2)') nsrf |
---|
465 | ierr = NF_REDEF (nid) |
---|
466 | #ifdef NC_DOUBLE |
---|
467 | ierr = NF_DEF_VAR (nid, "TS"//str2, NF_DOUBLE, 1, idim2,nvarid) |
---|
468 | #else |
---|
469 | ierr = NF_DEF_VAR (nid, "TS"//str2, NF_FLOAT, 1, idim2,nvarid) |
---|
470 | #endif |
---|
471 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
472 | . "Temperature de surface No."//str2) |
---|
473 | ierr = NF_ENDDEF(nid) |
---|
474 | ELSE |
---|
475 | PRINT*, "Trop de sous-mailles" |
---|
476 | CALL abort |
---|
477 | ENDIF |
---|
478 | #ifdef NC_DOUBLE |
---|
479 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tsol(1,nsrf)) |
---|
480 | #else |
---|
481 | ierr = NF_PUT_VAR_REAL (nid,nvarid,tsol(1,nsrf)) |
---|
482 | #endif |
---|
483 | ENDDO |
---|
484 | c |
---|
485 | DO nsrf = 1, nbsrf |
---|
486 | DO isoil=1, nsoilmx |
---|
487 | IF (isoil.LE.99 .AND. nsrf.LE.99) THEN |
---|
488 | WRITE(str7,'(i2.2,"srf",i2.2)') isoil,nsrf |
---|
489 | ierr = NF_REDEF (nid) |
---|
490 | #ifdef NC_DOUBLE |
---|
491 | ierr = NF_DEF_VAR (nid, "Tsoil"//str7,NF_DOUBLE,1,idim2,nvarid) |
---|
492 | #else |
---|
493 | ierr = NF_DEF_VAR (nid, "Tsoil"//str7,NF_FLOAT,1,idim2,nvarid) |
---|
494 | #endif |
---|
495 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 29, |
---|
496 | . "Temperature du sol No."//str7) |
---|
497 | ierr = NF_ENDDEF(nid) |
---|
498 | ELSE |
---|
499 | PRINT*, "Trop de couches" |
---|
500 | CALL abort |
---|
501 | ENDIF |
---|
502 | #ifdef NC_DOUBLE |
---|
503 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tsoil(1,isoil,nsrf)) |
---|
504 | #else |
---|
505 | ierr = NF_PUT_VAR_REAL (nid,nvarid,tsoil(1,isoil,nsrf)) |
---|
506 | #endif |
---|
507 | ENDDO |
---|
508 | ENDDO |
---|
509 | c |
---|
510 | cIM "slab" ocean |
---|
511 | ierr = NF_REDEF (nid) |
---|
512 | #ifdef NC_DOUBLE |
---|
513 | ierr = NF_DEF_VAR (nid, "TSLAB", NF_DOUBLE, 1, idim2,nvarid) |
---|
514 | #else |
---|
515 | ierr = NF_DEF_VAR (nid, "TSLAB", NF_FLOAT, 1, idim2,nvarid) |
---|
516 | #endif |
---|
517 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 33, |
---|
518 | . "Ecart de la SST (pour slab-ocean)") |
---|
519 | ierr = NF_ENDDEF(nid) |
---|
520 | #ifdef NC_DOUBLE |
---|
521 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tslab) |
---|
522 | #else |
---|
523 | ierr = NF_PUT_VAR_REAL (nid,nvarid,tslab) |
---|
524 | #endif |
---|
525 | c |
---|
526 | ierr = NF_REDEF (nid) |
---|
527 | #ifdef NC_DOUBLE |
---|
528 | ierr = NF_DEF_VAR (nid, "SEAICE", NF_DOUBLE, 1, idim2,nvarid) |
---|
529 | #else |
---|
530 | ierr = NF_DEF_VAR (nid, "SEAICE", NF_FLOAT, 1, idim2,nvarid) |
---|
531 | #endif |
---|
532 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 33, |
---|
533 | . "Glace de mer kg/m2 (pour slab-ocean)") |
---|
534 | ierr = NF_ENDDEF(nid) |
---|
535 | #ifdef NC_DOUBLE |
---|
536 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,seaice) |
---|
537 | #else |
---|
538 | ierr = NF_PUT_VAR_REAL (nid,nvarid,seaice) |
---|
539 | #endif |
---|
540 | c |
---|
541 | DO nsrf = 1, nbsrf |
---|
542 | IF (nsrf.LE.99) THEN |
---|
543 | WRITE(str2,'(i2.2)') nsrf |
---|
544 | ierr = NF_REDEF (nid) |
---|
545 | #ifdef NC_DOUBLE |
---|
546 | ierr = NF_DEF_VAR (nid,"QS"//str2,NF_DOUBLE,1,idim2,nvarid) |
---|
547 | #else |
---|
548 | ierr = NF_DEF_VAR (nid,"QS"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
549 | #endif |
---|
550 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 25, |
---|
551 | . "Humidite de surface No."//str2) |
---|
552 | ierr = NF_ENDDEF(nid) |
---|
553 | ELSE |
---|
554 | PRINT*, "Trop de sous-mailles" |
---|
555 | CALL abort |
---|
556 | ENDIF |
---|
557 | #ifdef NC_DOUBLE |
---|
558 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,qsurf(1,nsrf)) |
---|
559 | #else |
---|
560 | ierr = NF_PUT_VAR_REAL (nid,nvarid,qsurf(1,nsrf)) |
---|
561 | #endif |
---|
562 | END DO |
---|
563 | C |
---|
564 | ierr = NF_REDEF (nid) |
---|
565 | #ifdef NC_DOUBLE |
---|
566 | ierr = NF_DEF_VAR (nid,"QSOL",NF_DOUBLE,1,idim2,nvarid) |
---|
567 | #else |
---|
568 | ierr = NF_DEF_VAR (nid,"QSOL",NF_FLOAT,1,idim2,nvarid) |
---|
569 | #endif |
---|
570 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 20, |
---|
571 | . "Eau dans le sol (mm)") |
---|
572 | ierr = NF_ENDDEF(nid) |
---|
573 | #ifdef NC_DOUBLE |
---|
574 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,qsol) |
---|
575 | #else |
---|
576 | ierr = NF_PUT_VAR_REAL (nid,nvarid,qsol) |
---|
577 | #endif |
---|
578 | c |
---|
579 | DO nsrf = 1, nbsrf |
---|
580 | IF (nsrf.LE.99) THEN |
---|
581 | WRITE(str2,'(i2.2)') nsrf |
---|
582 | ierr = NF_REDEF (nid) |
---|
583 | #ifdef NC_DOUBLE |
---|
584 | ierr = NF_DEF_VAR (nid,"ALBE"//str2,NF_DOUBLE,1,idim2,nvarid) |
---|
585 | #else |
---|
586 | ierr = NF_DEF_VAR (nid,"ALBE"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
587 | #endif |
---|
588 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 23, |
---|
589 | . "albedo de surface No."//str2) |
---|
590 | ierr = NF_ENDDEF(nid) |
---|
591 | ELSE |
---|
592 | PRINT*, "Trop de sous-mailles" |
---|
593 | CALL abort |
---|
594 | ENDIF |
---|
595 | #ifdef NC_DOUBLE |
---|
596 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,albedo(1,nsrf)) |
---|
597 | #else |
---|
598 | ierr = NF_PUT_VAR_REAL (nid,nvarid,albedo(1,nsrf)) |
---|
599 | #endif |
---|
600 | ENDDO |
---|
601 | |
---|
602 | cIM BEG albedo LW |
---|
603 | DO nsrf = 1, nbsrf |
---|
604 | IF (nsrf.LE.99) THEN |
---|
605 | WRITE(str2,'(i2.2)') nsrf |
---|
606 | ierr = NF_REDEF (nid) |
---|
607 | #ifdef NC_DOUBLE |
---|
608 | ierr = NF_DEF_VAR (nid,"ALBLW"//str2,NF_DOUBLE,1,idim2,nvarid) |
---|
609 | #else |
---|
610 | ierr = NF_DEF_VAR (nid,"ALBLW"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
611 | #endif |
---|
612 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 23, |
---|
613 | . "albedo LW de surface No."//str2) |
---|
614 | ierr = NF_ENDDEF(nid) |
---|
615 | ELSE |
---|
616 | PRINT*, "Trop de sous-mailles" |
---|
617 | CALL abort |
---|
618 | ENDIF |
---|
619 | #ifdef NC_DOUBLE |
---|
620 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,alblw(1,nsrf)) |
---|
621 | #else |
---|
622 | ierr = NF_PUT_VAR_REAL (nid,nvarid,alblw(1,nsrf)) |
---|
623 | #endif |
---|
624 | ENDDO |
---|
625 | cIM END albedo LW |
---|
626 | c |
---|
627 | DO nsrf = 1, nbsrf |
---|
628 | IF (nsrf.LE.99) THEN |
---|
629 | WRITE(str2,'(i2.2)') nsrf |
---|
630 | ierr = NF_REDEF (nid) |
---|
631 | #ifdef NC_DOUBLE |
---|
632 | ierr = NF_DEF_VAR (nid,"EVAP"//str2,NF_DOUBLE,1,idim2,nvarid) |
---|
633 | #else |
---|
634 | ierr = NF_DEF_VAR (nid,"EVAP"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
635 | #endif |
---|
636 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
637 | . "Evaporation de surface No."//str2) |
---|
638 | ierr = NF_ENDDEF(nid) |
---|
639 | ELSE |
---|
640 | PRINT*, "Trop de sous-mailles" |
---|
641 | CALL abort |
---|
642 | ENDIF |
---|
643 | #ifdef NC_DOUBLE |
---|
644 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,evap(1,nsrf)) |
---|
645 | #else |
---|
646 | ierr = NF_PUT_VAR_REAL (nid,nvarid,evap(1,nsrf)) |
---|
647 | #endif |
---|
648 | ENDDO |
---|
649 | |
---|
650 | c |
---|
651 | DO nsrf = 1, nbsrf |
---|
652 | IF (nsrf.LE.99) THEN |
---|
653 | WRITE(str2,'(i2.2)') nsrf |
---|
654 | ierr = NF_REDEF (nid) |
---|
655 | #ifdef NC_DOUBLE |
---|
656 | ierr = NF_DEF_VAR (nid,"SNOW"//str2,NF_DOUBLE,1,idim2,nvarid) |
---|
657 | #else |
---|
658 | ierr = NF_DEF_VAR (nid,"SNOW"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
659 | #endif |
---|
660 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 22, |
---|
661 | . "Neige de surface No."//str2) |
---|
662 | ierr = NF_ENDDEF(nid) |
---|
663 | ELSE |
---|
664 | PRINT*, "Trop de sous-mailles" |
---|
665 | CALL abort |
---|
666 | ENDIF |
---|
667 | #ifdef NC_DOUBLE |
---|
668 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,snow(1,nsrf)) |
---|
669 | #else |
---|
670 | ierr = NF_PUT_VAR_REAL (nid,nvarid,snow(1,nsrf)) |
---|
671 | #endif |
---|
672 | ENDDO |
---|
673 | |
---|
674 | c |
---|
675 | ierr = NF_REDEF (nid) |
---|
676 | #ifdef NC_DOUBLE |
---|
677 | ierr = NF_DEF_VAR (nid, "RADS", NF_DOUBLE, 1, idim2,nvarid) |
---|
678 | #else |
---|
679 | ierr = NF_DEF_VAR (nid, "RADS", NF_FLOAT, 1, idim2,nvarid) |
---|
680 | #endif |
---|
681 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
682 | . "Rayonnement net a la surface") |
---|
683 | ierr = NF_ENDDEF(nid) |
---|
684 | #ifdef NC_DOUBLE |
---|
685 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,radsol) |
---|
686 | #else |
---|
687 | ierr = NF_PUT_VAR_REAL (nid,nvarid,radsol) |
---|
688 | #endif |
---|
689 | c |
---|
690 | ierr = NF_REDEF (nid) |
---|
691 | #ifdef NC_DOUBLE |
---|
692 | ierr = NF_DEF_VAR (nid, "solsw", NF_DOUBLE, 1, idim2,nvarid) |
---|
693 | #else |
---|
694 | ierr = NF_DEF_VAR (nid, "solsw", NF_FLOAT, 1, idim2,nvarid) |
---|
695 | #endif |
---|
696 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 32, |
---|
697 | . "Rayonnement solaire a la surface") |
---|
698 | ierr = NF_ENDDEF(nid) |
---|
699 | #ifdef NC_DOUBLE |
---|
700 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,solsw) |
---|
701 | #else |
---|
702 | ierr = NF_PUT_VAR_REAL (nid,nvarid,solsw) |
---|
703 | #endif |
---|
704 | c |
---|
705 | ierr = NF_REDEF (nid) |
---|
706 | #ifdef NC_DOUBLE |
---|
707 | ierr = NF_DEF_VAR (nid, "sollw", NF_DOUBLE, 1, idim2,nvarid) |
---|
708 | #else |
---|
709 | ierr = NF_DEF_VAR (nid, "sollw", NF_FLOAT, 1, idim2,nvarid) |
---|
710 | #endif |
---|
711 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 27, |
---|
712 | . "Rayonnement IF a la surface") |
---|
713 | ierr = NF_ENDDEF(nid) |
---|
714 | #ifdef NC_DOUBLE |
---|
715 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,sollw) |
---|
716 | #else |
---|
717 | ierr = NF_PUT_VAR_REAL (nid,nvarid,sollw) |
---|
718 | #endif |
---|
719 | c |
---|
720 | ierr = NF_REDEF (nid) |
---|
721 | #ifdef NC_DOUBLE |
---|
722 | ierr = NF_DEF_VAR (nid, "fder", NF_DOUBLE, 1, idim2,nvarid) |
---|
723 | #else |
---|
724 | ierr = NF_DEF_VAR (nid, "fder", NF_FLOAT, 1, idim2,nvarid) |
---|
725 | #endif |
---|
726 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 14, |
---|
727 | . "Derive de flux") |
---|
728 | ierr = NF_ENDDEF(nid) |
---|
729 | #ifdef NC_DOUBLE |
---|
730 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,fder) |
---|
731 | #else |
---|
732 | ierr = NF_PUT_VAR_REAL (nid,nvarid,fder) |
---|
733 | #endif |
---|
734 | c |
---|
735 | ierr = NF_REDEF (nid) |
---|
736 | #ifdef NC_DOUBLE |
---|
737 | ierr = NF_DEF_VAR (nid, "rain_f", NF_DOUBLE, 1, idim2,nvarid) |
---|
738 | #else |
---|
739 | ierr = NF_DEF_VAR (nid, "rain_f", NF_FLOAT, 1, idim2,nvarid) |
---|
740 | #endif |
---|
741 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 21, |
---|
742 | . "precipitation liquide") |
---|
743 | ierr = NF_ENDDEF(nid) |
---|
744 | #ifdef NC_DOUBLE |
---|
745 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rain_fall) |
---|
746 | #else |
---|
747 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rain_fall) |
---|
748 | #endif |
---|
749 | c |
---|
750 | ierr = NF_REDEF (nid) |
---|
751 | #ifdef NC_DOUBLE |
---|
752 | ierr = NF_DEF_VAR (nid, "snow_f", NF_DOUBLE, 1, idim2,nvarid) |
---|
753 | #else |
---|
754 | ierr = NF_DEF_VAR (nid, "snow_f", NF_FLOAT, 1, idim2,nvarid) |
---|
755 | #endif |
---|
756 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 20, |
---|
757 | . "precipitation solide") |
---|
758 | ierr = NF_ENDDEF(nid) |
---|
759 | #ifdef NC_DOUBLE |
---|
760 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,snow_fall) |
---|
761 | #else |
---|
762 | ierr = NF_PUT_VAR_REAL (nid,nvarid,snow_fall) |
---|
763 | #endif |
---|
764 | c |
---|
765 | endif |
---|
766 | c$OMP END MASTER |
---|
767 | cc ----> necessaire pour eviter bug openMP sur SX6 |
---|
768 | c$OMP MASTER |
---|
769 | if (phy_rank==0) then |
---|
770 | DO nsrf = 1, nbsrf |
---|
771 | IF (nsrf.LE.99) THEN |
---|
772 | WRITE(str2,'(i2.2)') nsrf |
---|
773 | ierr = NF_REDEF (nid) |
---|
774 | #ifdef NC_DOUBLE |
---|
775 | ierr = NF_DEF_VAR (nid,"RUG"//str2,NF_DOUBLE,1,idim2,nvarid) |
---|
776 | #else |
---|
777 | ierr = NF_DEF_VAR (nid,"RUG"//str2,NF_FLOAT,1,idim2,nvarid) |
---|
778 | #endif |
---|
779 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 23, |
---|
780 | . "rugosite de surface No."//str2) |
---|
781 | ierr = NF_ENDDEF(nid) |
---|
782 | ELSE |
---|
783 | PRINT*, "Trop de sous-mailles" |
---|
784 | CALL abort |
---|
785 | ENDIF |
---|
786 | #ifdef NC_DOUBLE |
---|
787 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,frugs(1,nsrf)) |
---|
788 | #else |
---|
789 | ierr = NF_PUT_VAR_REAL (nid,nvarid,frugs(1,nsrf)) |
---|
790 | #endif |
---|
791 | ENDDO |
---|
792 | c |
---|
793 | DO nsrf = 1, nbsrf |
---|
794 | IF (nsrf.LE.99) THEN |
---|
795 | WRITE(str2,'(i2.2)') nsrf |
---|
796 | ierr = NF_REDEF (nid) |
---|
797 | #ifdef NC_DOUBLE |
---|
798 | ierr = NF_DEF_VAR (nid,"AGESNO"//str2,NF_DOUBLE,1,idim2 |
---|
799 | $ ,nvarid) |
---|
800 | #else |
---|
801 | ierr = NF_DEF_VAR (nid,"AGESNO"//str2,NF_FLOAT,1,idim2 |
---|
802 | $ ,nvarid) |
---|
803 | #endif |
---|
804 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 15, |
---|
805 | . "Age de la neige surface No."//str2) |
---|
806 | ierr = NF_ENDDEF(nid) |
---|
807 | ELSE |
---|
808 | PRINT*, "Trop de sous-mailles" |
---|
809 | CALL abort |
---|
810 | ENDIF |
---|
811 | #ifdef NC_DOUBLE |
---|
812 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,agesno(1,nsrf)) |
---|
813 | #else |
---|
814 | ierr = NF_PUT_VAR_REAL (nid,nvarid,agesno(1,nsrf)) |
---|
815 | #endif |
---|
816 | ENDDO |
---|
817 | c |
---|
818 | ierr = NF_REDEF (nid) |
---|
819 | #ifdef NC_DOUBLE |
---|
820 | ierr = NF_DEF_VAR (nid, "ZMEA", NF_DOUBLE, 1, idim2,nvarid) |
---|
821 | #else |
---|
822 | ierr = NF_DEF_VAR (nid, "ZMEA", NF_FLOAT, 1, idim2,nvarid) |
---|
823 | #endif |
---|
824 | ierr = NF_ENDDEF(nid) |
---|
825 | #ifdef NC_DOUBLE |
---|
826 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zmea) |
---|
827 | #else |
---|
828 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zmea) |
---|
829 | #endif |
---|
830 | c |
---|
831 | ierr = NF_REDEF (nid) |
---|
832 | #ifdef NC_DOUBLE |
---|
833 | ierr = NF_DEF_VAR (nid, "ZSTD", NF_DOUBLE, 1, idim2,nvarid) |
---|
834 | #else |
---|
835 | ierr = NF_DEF_VAR (nid, "ZSTD", NF_FLOAT, 1, idim2,nvarid) |
---|
836 | #endif |
---|
837 | ierr = NF_ENDDEF(nid) |
---|
838 | #ifdef NC_DOUBLE |
---|
839 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zstd) |
---|
840 | #else |
---|
841 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zstd) |
---|
842 | #endif |
---|
843 | ierr = NF_REDEF (nid) |
---|
844 | #ifdef NC_DOUBLE |
---|
845 | ierr = NF_DEF_VAR (nid, "ZSIG", NF_DOUBLE, 1, idim2,nvarid) |
---|
846 | #else |
---|
847 | ierr = NF_DEF_VAR (nid, "ZSIG", NF_FLOAT, 1, idim2,nvarid) |
---|
848 | #endif |
---|
849 | ierr = NF_ENDDEF(nid) |
---|
850 | #ifdef NC_DOUBLE |
---|
851 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zsig) |
---|
852 | #else |
---|
853 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zsig) |
---|
854 | #endif |
---|
855 | ierr = NF_REDEF (nid) |
---|
856 | #ifdef NC_DOUBLE |
---|
857 | ierr = NF_DEF_VAR (nid, "ZGAM", NF_DOUBLE, 1, idim2,nvarid) |
---|
858 | #else |
---|
859 | ierr = NF_DEF_VAR (nid, "ZGAM", NF_FLOAT, 1, idim2,nvarid) |
---|
860 | #endif |
---|
861 | ierr = NF_ENDDEF(nid) |
---|
862 | #ifdef NC_DOUBLE |
---|
863 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zgam) |
---|
864 | #else |
---|
865 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zgam) |
---|
866 | #endif |
---|
867 | ierr = NF_REDEF (nid) |
---|
868 | #ifdef NC_DOUBLE |
---|
869 | ierr = NF_DEF_VAR (nid, "ZTHE", NF_DOUBLE, 1, idim2,nvarid) |
---|
870 | #else |
---|
871 | ierr = NF_DEF_VAR (nid, "ZTHE", NF_FLOAT, 1, idim2,nvarid) |
---|
872 | #endif |
---|
873 | ierr = NF_ENDDEF(nid) |
---|
874 | #ifdef NC_DOUBLE |
---|
875 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zthe) |
---|
876 | #else |
---|
877 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zthe) |
---|
878 | #endif |
---|
879 | ierr = NF_REDEF (nid) |
---|
880 | #ifdef NC_DOUBLE |
---|
881 | ierr = NF_DEF_VAR (nid, "ZPIC", NF_DOUBLE, 1, idim2,nvarid) |
---|
882 | #else |
---|
883 | ierr = NF_DEF_VAR (nid, "ZPIC", NF_FLOAT, 1, idim2,nvarid) |
---|
884 | #endif |
---|
885 | ierr = NF_ENDDEF(nid) |
---|
886 | #ifdef NC_DOUBLE |
---|
887 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zpic) |
---|
888 | #else |
---|
889 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zpic) |
---|
890 | #endif |
---|
891 | ierr = NF_REDEF (nid) |
---|
892 | #ifdef NC_DOUBLE |
---|
893 | ierr = NF_DEF_VAR (nid, "ZVAL", NF_DOUBLE, 1, idim2,nvarid) |
---|
894 | #else |
---|
895 | ierr = NF_DEF_VAR (nid, "ZVAL", NF_FLOAT, 1, idim2,nvarid) |
---|
896 | #endif |
---|
897 | ierr = NF_ENDDEF(nid) |
---|
898 | #ifdef NC_DOUBLE |
---|
899 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zval) |
---|
900 | #else |
---|
901 | ierr = NF_PUT_VAR_REAL (nid,nvarid,zval) |
---|
902 | #endif |
---|
903 | ierr = NF_REDEF (nid) |
---|
904 | #ifdef NC_DOUBLE |
---|
905 | ierr = NF_DEF_VAR (nid, "RUGSREL", NF_DOUBLE, 1, idim2,nvarid) |
---|
906 | #else |
---|
907 | ierr = NF_DEF_VAR (nid, "RUGSREL", NF_FLOAT, 1, idim2,nvarid) |
---|
908 | #endif |
---|
909 | ierr = NF_ENDDEF(nid) |
---|
910 | #ifdef NC_DOUBLE |
---|
911 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rugsrel) |
---|
912 | #else |
---|
913 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rugsrel) |
---|
914 | #endif |
---|
915 | c |
---|
916 | ierr = NF_REDEF (nid) |
---|
917 | #ifdef NC_DOUBLE |
---|
918 | ierr = NF_DEF_VAR (nid, "TANCIEN", NF_DOUBLE, 1, idim3,nvarid) |
---|
919 | #else |
---|
920 | ierr = NF_DEF_VAR (nid, "TANCIEN", NF_FLOAT, 1, idim3,nvarid) |
---|
921 | #endif |
---|
922 | ierr = NF_ENDDEF(nid) |
---|
923 | #ifdef NC_DOUBLE |
---|
924 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,t_ancien) |
---|
925 | #else |
---|
926 | ierr = NF_PUT_VAR_REAL (nid,nvarid,t_ancien) |
---|
927 | #endif |
---|
928 | c |
---|
929 | ierr = NF_REDEF (nid) |
---|
930 | #ifdef NC_DOUBLE |
---|
931 | ierr = NF_DEF_VAR (nid, "QANCIEN", NF_DOUBLE, 1, idim3,nvarid) |
---|
932 | #else |
---|
933 | ierr = NF_DEF_VAR (nid, "QANCIEN", NF_FLOAT, 1, idim3,nvarid) |
---|
934 | #endif |
---|
935 | ierr = NF_ENDDEF(nid) |
---|
936 | #ifdef NC_DOUBLE |
---|
937 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,q_ancien) |
---|
938 | #else |
---|
939 | ierr = NF_PUT_VAR_REAL (nid,nvarid,q_ancien) |
---|
940 | #endif |
---|
941 | c |
---|
942 | ierr = NF_REDEF (nid) |
---|
943 | #ifdef NC_DOUBLE |
---|
944 | ierr = NF_DEF_VAR (nid, "RUGMER", NF_DOUBLE, 1, idim2,nvarid) |
---|
945 | #else |
---|
946 | ierr = NF_DEF_VAR (nid, "RUGMER", NF_FLOAT, 1, idim2,nvarid) |
---|
947 | #endif |
---|
948 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
949 | . "Longueur de rugosite sur mer") |
---|
950 | ierr = NF_ENDDEF(nid) |
---|
951 | #ifdef NC_DOUBLE |
---|
952 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,frugs(1,is_oce)) |
---|
953 | #else |
---|
954 | ierr = NF_PUT_VAR_REAL (nid,nvarid,frugs(1,is_oce)) |
---|
955 | #endif |
---|
956 | c |
---|
957 | ierr = NF_REDEF (nid) |
---|
958 | #ifdef NC_DOUBLE |
---|
959 | ierr = NF_DEF_VAR (nid, "CLWCON", NF_DOUBLE, 1, idim2,nvarid) |
---|
960 | #else |
---|
961 | ierr = NF_DEF_VAR (nid, "CLWCON", NF_FLOAT, 1, idim2,nvarid) |
---|
962 | #endif |
---|
963 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
964 | . "Eau liquide convective") |
---|
965 | ierr = NF_ENDDEF(nid) |
---|
966 | #ifdef NC_DOUBLE |
---|
967 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,clwcon) |
---|
968 | #else |
---|
969 | ierr = NF_PUT_VAR_REAL (nid,nvarid,clwcon) |
---|
970 | #endif |
---|
971 | c |
---|
972 | ierr = NF_REDEF (nid) |
---|
973 | #ifdef NC_DOUBLE |
---|
974 | ierr = NF_DEF_VAR (nid, "RNEBCON", NF_DOUBLE, 1, idim2,nvarid) |
---|
975 | #else |
---|
976 | ierr = NF_DEF_VAR (nid, "RNEBCON", NF_FLOAT, 1, idim2,nvarid) |
---|
977 | #endif |
---|
978 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
979 | . "Nebulosite convective") |
---|
980 | ierr = NF_ENDDEF(nid) |
---|
981 | #ifdef NC_DOUBLE |
---|
982 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rnebcon) |
---|
983 | #else |
---|
984 | ierr = NF_PUT_VAR_REAL (nid,nvarid,rnebcon) |
---|
985 | #endif |
---|
986 | c |
---|
987 | ierr = NF_REDEF (nid) |
---|
988 | #ifdef NC_DOUBLE |
---|
989 | ierr = NF_DEF_VAR (nid, "RATQS", NF_DOUBLE, 1, idim2,nvarid) |
---|
990 | #else |
---|
991 | ierr = NF_DEF_VAR (nid, "RATQS", NF_FLOAT, 1, idim2,nvarid) |
---|
992 | #endif |
---|
993 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
994 | . "Ratqs") |
---|
995 | ierr = NF_ENDDEF(nid) |
---|
996 | #ifdef NC_DOUBLE |
---|
997 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,ratqs) |
---|
998 | #else |
---|
999 | ierr = NF_PUT_VAR_REAL (nid,nvarid,ratqs) |
---|
1000 | #endif |
---|
1001 | c |
---|
1002 | c run_off_lic_0 |
---|
1003 | c |
---|
1004 | ierr = NF_REDEF (nid) |
---|
1005 | #ifdef NC_DOUBLE |
---|
1006 | ierr=NF_DEF_VAR(nid,"RUNOFFLIC0",NF_DOUBLE,1,idim2,nvarid) |
---|
1007 | #else |
---|
1008 | ierr=NF_DEF_VAR(nid,"RUNOFFLIC0",NF_FLOAT, 1,idim2,nvarid) |
---|
1009 | #endif |
---|
1010 | ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, |
---|
1011 | . "Runofflic0") |
---|
1012 | ierr = NF_ENDDEF(nid) |
---|
1013 | #ifdef NC_DOUBLE |
---|
1014 | ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,run_off_lic_0) |
---|
1015 | #else |
---|
1016 | ierr = NF_PUT_VAR_REAL (nid,nvarid,run_off_lic_0) |
---|
1017 | #endif |
---|
1018 | c |
---|
1019 | c |
---|
1020 | ierr = NF_CLOSE(nid) |
---|
1021 | c |
---|
1022 | endif ! phy_rank==0 |
---|
1023 | c$OMP END MASTER |
---|
1024 | RETURN |
---|
1025 | END |
---|