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