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