[524] | 1 | ! |
---|
| 2 | ! $Header$ |
---|
| 3 | ! |
---|
| 4 | c |
---|
| 5 | c |
---|
| 6 | SUBROUTINE phyetat0 (fichnom,dtime,co2_ppm_etat0,solaire_etat0, |
---|
[782] | 7 | . rlat_p, rlon_p, pctsrf_p, tsol_p, |
---|
| 8 | . ocean_in, ok_veget_in, |
---|
[888] | 9 | . alb1_p, alb2_p, |
---|
[766] | 10 | . rain_fall_p, snow_fall_p,solsw_p, sollw_p, |
---|
[782] | 11 | . radsol_p,clesphy0, |
---|
[766] | 12 | . zmea_p,zstd_p,zsig_p,zgam_p,zthe_p,zpic_p,zval_p, |
---|
| 13 | . rugsrel_p,tabcntr0, |
---|
| 14 | . t_ancien_p,q_ancien_p,ancien_ok_p, rnebcon_p, ratqs_p, |
---|
[937] | 15 | . clwcon_p,pbl_tke_p, zmax0_p, f0_p, |
---|
| 16 | . ema_work1_p, ema_work2_p) |
---|
[782] | 17 | |
---|
[776] | 18 | USE dimphy |
---|
| 19 | USE mod_grid_phy_lmdz |
---|
| 20 | USE mod_phys_lmdz_para |
---|
[766] | 21 | USE iophy |
---|
[782] | 22 | USE ocean_slab_mod, ONLY : ocean_slab_init |
---|
| 23 | USE ocean_cpl_mod, ONLY : ocean_cpl_init |
---|
| 24 | USE ocean_forced_mod, ONLY : ocean_forced_init |
---|
| 25 | USE fonte_neige_mod, ONLY : fonte_neige_init |
---|
| 26 | USE pbl_surface_mod, ONLY : pbl_surface_init |
---|
| 27 | USE surface_data, ONLY : ocean, ok_veget |
---|
| 28 | |
---|
[524] | 29 | IMPLICIT none |
---|
| 30 | c====================================================================== |
---|
| 31 | c Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818 |
---|
| 32 | c Objet: Lecture de l'etat initial pour la physique |
---|
| 33 | c====================================================================== |
---|
| 34 | #include "dimensions.h" |
---|
| 35 | #include "netcdf.inc" |
---|
| 36 | #include "indicesol.h" |
---|
| 37 | #include "dimsoil.h" |
---|
| 38 | #include "clesphys.h" |
---|
| 39 | #include "temps.h" |
---|
[878] | 40 | #include "thermcell.h" |
---|
| 41 | #include "compbl.h" |
---|
[524] | 42 | c====================================================================== |
---|
| 43 | CHARACTER*(*) fichnom |
---|
| 44 | REAL dtime |
---|
| 45 | INTEGER radpas |
---|
[776] | 46 | REAL rlat_p(klon), rlon_p(klon) |
---|
[524] | 47 | REAL co2_ppm_etat0 |
---|
| 48 | REAL solaire_etat0 |
---|
[776] | 49 | REAL tsol_p(klon,nbsrf) |
---|
[878] | 50 | REAL pbl_tke_p(klon,klev,nbsrf) |
---|
[927] | 51 | REAL zmax0_p(klon), f0_p(klon) |
---|
[937] | 52 | REAL ema_work1_p(klon,klev), ema_work2_p(klon,klev) |
---|
[776] | 53 | REAL tsoil_p(klon,nsoilmx,nbsrf) |
---|
| 54 | REAL tslab_p(klon), seaice_p(klon) |
---|
| 55 | REAL qsurf_p(klon,nbsrf) |
---|
| 56 | REAL qsol_p(klon) |
---|
| 57 | REAL snow_p(klon,nbsrf) |
---|
[888] | 58 | REAL alb1_p(klon,nbsrf) ! albedo in visible SW interval |
---|
| 59 | REAL alb2_p(klon,nbsrf) ! albedo in near IR interval |
---|
[776] | 60 | REAL evap_p(klon,nbsrf) |
---|
| 61 | REAL radsol_p(klon) |
---|
| 62 | REAL rain_fall_p(klon) |
---|
| 63 | REAL snow_fall_p(klon) |
---|
| 64 | REAL sollw_p(klon) |
---|
| 65 | real solsw_p(klon) |
---|
| 66 | real fder_p(klon) |
---|
| 67 | REAL frugs_p(klon,nbsrf) |
---|
| 68 | REAL agesno_p(klon,nbsrf) |
---|
| 69 | REAL zmea_p(klon) |
---|
| 70 | REAL zstd_p(klon) |
---|
| 71 | REAL zsig_p(klon) |
---|
| 72 | REAL zgam_p(klon) |
---|
| 73 | REAL zthe_p(klon) |
---|
| 74 | REAL zpic_p(klon) |
---|
| 75 | REAL zval_p(klon) |
---|
| 76 | REAL rugsrel_p(klon) |
---|
| 77 | REAL pctsrf_p(klon, nbsrf) |
---|
| 78 | REAL run_off_lic_0_p(klon) |
---|
[766] | 79 | |
---|
[776] | 80 | REAL t_ancien_p(klon,klev), q_ancien_p(klon,klev) |
---|
| 81 | real rnebcon_p(klon,klev),clwcon_p(klon,klev) |
---|
| 82 | real ratqs_p(klon,klev) |
---|
[766] | 83 | LOGICAL,SAVE :: ancien_ok |
---|
| 84 | LOGICAL :: ancien_ok_p |
---|
| 85 | |
---|
[776] | 86 | REAL zmasq_glo(klon_glo) |
---|
| 87 | REAL rlat(klon_glo), rlon(klon_glo) |
---|
| 88 | REAL tsol(klon_glo,nbsrf) |
---|
[878] | 89 | REAL pbl_tke(klon_glo,klev,nbsrf) |
---|
[927] | 90 | REAL zmax0(klon), f0(klon) |
---|
[937] | 91 | REAL ema_work1(klon,klev), ema_work2(klon,klev) |
---|
[776] | 92 | REAL tsoil(klon_glo,nsoilmx,nbsrf) |
---|
[644] | 93 | cIM "slab" ocean |
---|
[776] | 94 | REAL tslab(klon_glo), seaice(klon_glo) |
---|
| 95 | REAL qsurf(klon_glo,nbsrf) |
---|
| 96 | REAL qsol(klon_glo) |
---|
| 97 | REAL snow(klon_glo,nbsrf) |
---|
[888] | 98 | REAL alb1(klon_glo,nbsrf) |
---|
| 99 | REAL alb2(klon_glo,nbsrf) |
---|
[776] | 100 | REAL evap(klon_glo,nbsrf) |
---|
| 101 | REAL radsol(klon_glo) |
---|
| 102 | REAL rain_fall(klon_glo) |
---|
| 103 | REAL snow_fall(klon_glo) |
---|
| 104 | REAL sollw(klon_glo) |
---|
| 105 | real solsw(klon_glo) |
---|
| 106 | real fder(klon_glo) |
---|
| 107 | REAL frugs(klon_glo,nbsrf) |
---|
| 108 | REAL agesno(klon_glo,nbsrf) |
---|
| 109 | REAL zmea(klon_glo) |
---|
| 110 | REAL zstd(klon_glo) |
---|
| 111 | REAL zsig(klon_glo) |
---|
| 112 | REAL zgam(klon_glo) |
---|
| 113 | REAL zthe(klon_glo) |
---|
| 114 | REAL zpic(klon_glo) |
---|
| 115 | REAL zval(klon_glo) |
---|
| 116 | REAL rugsrel(klon_glo) |
---|
| 117 | REAL pctsrf(klon_glo, nbsrf) |
---|
| 118 | REAL fractint(klon_glo) |
---|
| 119 | REAL run_off_lic_0(klon_glo) |
---|
| 120 | REAL t_ancien(klon_glo,klev) |
---|
| 121 | REAL q_ancien(klon_glo,klev) |
---|
| 122 | real rnebcon(klon_glo,klev) |
---|
| 123 | real clwcon(klon_glo,klev) |
---|
| 124 | real ratqs(klon_glo,klev) |
---|
[524] | 125 | |
---|
[782] | 126 | CHARACTER*6 ocean_in |
---|
| 127 | LOGICAL ok_veget_in |
---|
[651] | 128 | |
---|
[524] | 129 | INTEGER longcles |
---|
| 130 | PARAMETER ( longcles = 20 ) |
---|
| 131 | REAL clesphy0( longcles ) |
---|
| 132 | c |
---|
| 133 | REAL xmin, xmax |
---|
| 134 | c |
---|
| 135 | INTEGER nid, nvarid |
---|
[878] | 136 | INTEGER ierr, i, nsrf, isoil ,k |
---|
[524] | 137 | INTEGER length |
---|
| 138 | PARAMETER (length=100) |
---|
| 139 | REAL tab_cntrl(length), tabcntr0(length) |
---|
[766] | 140 | REAL,SAVE :: tab_cntrl_omp(length) |
---|
[524] | 141 | CHARACTER*7 str7 |
---|
| 142 | CHARACTER*2 str2 |
---|
[879] | 143 | |
---|
| 144 | c FH1D |
---|
| 145 | c real iolat(jjm+1) |
---|
| 146 | real iolat(jjm+1-1/iim) |
---|
[524] | 147 | c |
---|
| 148 | c Ouvrir le fichier contenant l'etat initial: |
---|
| 149 | c |
---|
[766] | 150 | |
---|
| 151 | c$OMP MASTER |
---|
| 152 | print *,'MASTER -x , omp_rank=',omp_rank |
---|
| 153 | c$OMP END MASTER |
---|
| 154 | |
---|
| 155 | c$OMP MASTER |
---|
[776] | 156 | IF (is_mpi_root) THEN |
---|
| 157 | print*,'fichnom ',fichnom |
---|
| 158 | ierr = NF_OPEN (fichnom, NF_NOWRITE,nid) |
---|
| 159 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 160 | write(6,*)' Pb d''ouverture du fichier '//fichnom |
---|
| 161 | write(6,*)' ierr = ', ierr |
---|
| 162 | CALL ABORT |
---|
| 163 | ENDIF |
---|
[524] | 164 | ENDIF |
---|
[766] | 165 | c$OMP END MASTER |
---|
[524] | 166 | c |
---|
| 167 | c Lecture des parametres de controle: |
---|
| 168 | c |
---|
[766] | 169 | c$OMP MASTER |
---|
[776] | 170 | IF (is_mpi_root) THEN |
---|
| 171 | |
---|
[524] | 172 | ierr = NF_INQ_VARID (nid, "controle", nvarid) |
---|
| 173 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 174 | PRINT*, 'phyetat0: Le champ <controle> est absent' |
---|
| 175 | CALL abort |
---|
| 176 | ENDIF |
---|
| 177 | #ifdef NC_DOUBLE |
---|
[779] | 178 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tab_cntrl) |
---|
[524] | 179 | #else |
---|
[779] | 180 | ierr = NF_GET_VAR_REAL(nid, nvarid, tab_cntrl) |
---|
[524] | 181 | #endif |
---|
| 182 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 183 | PRINT*, 'phyetat0: Lecture echouee pour <controle>' |
---|
| 184 | CALL abort |
---|
[766] | 185 | ENDIF |
---|
[776] | 186 | ENDIF |
---|
| 187 | |
---|
[766] | 188 | c$OMP END MASTER |
---|
| 189 | |
---|
[776] | 190 | CALL bcast(tab_cntrl) |
---|
[766] | 191 | |
---|
[524] | 192 | c |
---|
[956] | 193 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 194 | ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique |
---|
| 195 | ! Les constantes de la physiques sont lues dans la physique seulement. |
---|
| 196 | ! Les egalites du type |
---|
| 197 | ! tab_cntrl( 5 )=clesphy0(1) |
---|
| 198 | ! sont remplacees par |
---|
| 199 | ! clesphy0(1)=tab_cntrl( 5 ) |
---|
| 200 | ! On inverse aussi la logique. |
---|
| 201 | ! On remplit les tab_cntrl avec les parametres lus dans les .def |
---|
| 202 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 203 | |
---|
[524] | 204 | DO i = 1, length |
---|
| 205 | tabcntr0( i ) = tab_cntrl( i ) |
---|
| 206 | ENDDO |
---|
| 207 | c |
---|
[956] | 208 | tab_cntrl(1)=dtime |
---|
| 209 | tab_cntrl(2)=radpas |
---|
| 210 | co2_ppm_etat0 = tab_cntrl(3) |
---|
| 211 | solaire_etat0 = tab_cntrl(4) |
---|
| 212 | tab_cntrl(5)=iflag_con |
---|
| 213 | tab_cntrl(6)=nbapp_rad |
---|
[524] | 214 | |
---|
[956] | 215 | if (cycle_diurne) tab_cntrl( 7) =1. |
---|
| 216 | if (soil_model) tab_cntrl( 8) =1. |
---|
| 217 | if (new_oliq) tab_cntrl( 9) =1. |
---|
| 218 | if (ok_orodr) tab_cntrl(10) =1. |
---|
| 219 | if (ok_orolf) tab_cntrl(11) =1. |
---|
| 220 | if (ok_limitvrai) tab_cntrl(12) =1. |
---|
[524] | 221 | |
---|
[956] | 222 | |
---|
| 223 | itau_phy = tab_cntrl(15) |
---|
| 224 | |
---|
| 225 | |
---|
| 226 | |
---|
[524] | 227 | IF( clesphy0(1).NE.tab_cntrl( 5 ) ) THEN |
---|
[956] | 228 | clesphy0(1)=tab_cntrl( 5 ) |
---|
[524] | 229 | ENDIF |
---|
| 230 | |
---|
| 231 | IF( clesphy0(2).NE.tab_cntrl( 6 ) ) THEN |
---|
[956] | 232 | clesphy0(2)=tab_cntrl( 6 ) |
---|
[524] | 233 | ENDIF |
---|
| 234 | |
---|
| 235 | IF( clesphy0(3).NE.tab_cntrl( 7 ) ) THEN |
---|
[956] | 236 | clesphy0(3)=tab_cntrl( 7 ) |
---|
[524] | 237 | ENDIF |
---|
| 238 | |
---|
| 239 | IF( clesphy0(4).NE.tab_cntrl( 8 ) ) THEN |
---|
[956] | 240 | clesphy0(4)=tab_cntrl( 8 ) |
---|
[524] | 241 | ENDIF |
---|
| 242 | |
---|
| 243 | IF( clesphy0(5).NE.tab_cntrl( 9 ) ) THEN |
---|
[956] | 244 | clesphy0(5)=tab_cntrl( 9 ) |
---|
[524] | 245 | ENDIF |
---|
| 246 | |
---|
| 247 | IF( clesphy0(6).NE.tab_cntrl( 10 ) ) THEN |
---|
[956] | 248 | clesphy0(6)=tab_cntrl( 10 ) |
---|
[524] | 249 | ENDIF |
---|
| 250 | |
---|
| 251 | IF( clesphy0(7).NE.tab_cntrl( 11 ) ) THEN |
---|
[956] | 252 | clesphy0(7)=tab_cntrl( 11 ) |
---|
[524] | 253 | ENDIF |
---|
| 254 | |
---|
| 255 | IF( clesphy0(8).NE.tab_cntrl( 12 ) ) THEN |
---|
[956] | 256 | clesphy0(8)=tab_cntrl( 12 ) |
---|
[524] | 257 | ENDIF |
---|
| 258 | |
---|
| 259 | |
---|
| 260 | c |
---|
| 261 | c Lecture des latitudes (coordonnees): |
---|
| 262 | c |
---|
[766] | 263 | c$OMP MASTER |
---|
[776] | 264 | IF (is_mpi_root) THEN |
---|
| 265 | |
---|
[524] | 266 | ierr = NF_INQ_VARID (nid, "latitude", nvarid) |
---|
| 267 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 268 | PRINT*, 'phyetat0: Le champ <latitude> est absent' |
---|
| 269 | CALL abort |
---|
| 270 | ENDIF |
---|
| 271 | #ifdef NC_DOUBLE |
---|
| 272 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rlat) |
---|
| 273 | #else |
---|
| 274 | ierr = NF_GET_VAR_REAL(nid, nvarid, rlat) |
---|
| 275 | #endif |
---|
| 276 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 277 | PRINT*, 'phyetat0: Lecture echouee pour <latitude>' |
---|
| 278 | CALL abort |
---|
| 279 | ENDIF |
---|
[766] | 280 | |
---|
[524] | 281 | c |
---|
| 282 | c Lecture des longitudes (coordonnees): |
---|
| 283 | c |
---|
| 284 | ierr = NF_INQ_VARID (nid, "longitude", nvarid) |
---|
| 285 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 286 | PRINT*, 'phyetat0: Le champ <longitude> est absent' |
---|
| 287 | CALL abort |
---|
| 288 | ENDIF |
---|
| 289 | #ifdef NC_DOUBLE |
---|
| 290 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rlon) |
---|
| 291 | #else |
---|
| 292 | ierr = NF_GET_VAR_REAL(nid, nvarid, rlon) |
---|
| 293 | #endif |
---|
| 294 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 295 | PRINT*, 'phyetat0: Lecture echouee pour <latitude>' |
---|
| 296 | CALL abort |
---|
| 297 | ENDIF |
---|
| 298 | C |
---|
| 299 | C |
---|
| 300 | C Lecture du masque terre mer |
---|
| 301 | C |
---|
[766] | 302 | |
---|
[524] | 303 | ierr = NF_INQ_VARID (nid, "masque", nvarid) |
---|
| 304 | IF (ierr .EQ. NF_NOERR) THEN |
---|
| 305 | #ifdef NC_DOUBLE |
---|
[776] | 306 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zmasq_glo) |
---|
[524] | 307 | #else |
---|
[776] | 308 | ierr = NF_GET_VAR_REAL(nid, nvarid, zmasq_glo) |
---|
[524] | 309 | #endif |
---|
| 310 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 311 | PRINT*, 'phyetat0: Lecture echouee pour <masque>' |
---|
| 312 | CALL abort |
---|
| 313 | ENDIF |
---|
| 314 | else |
---|
| 315 | PRINT*, 'phyetat0: Le champ <masque> est absent' |
---|
| 316 | PRINT*, 'fichier startphy non compatible avec phyetat0' |
---|
| 317 | C CALL abort |
---|
| 318 | ENDIF |
---|
[766] | 319 | |
---|
| 320 | |
---|
[524] | 321 | C Lecture des fractions pour chaque sous-surface |
---|
| 322 | C |
---|
| 323 | C initialisation des sous-surfaces |
---|
| 324 | C |
---|
| 325 | pctsrf = 0. |
---|
| 326 | C |
---|
| 327 | C fraction de terre |
---|
| 328 | C |
---|
[766] | 329 | |
---|
[524] | 330 | ierr = NF_INQ_VARID (nid, "FTER", nvarid) |
---|
| 331 | IF (ierr .EQ. NF_NOERR) THEN |
---|
| 332 | #ifdef NC_DOUBLE |
---|
[776] | 333 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, |
---|
| 334 | . pctsrf(1 : klon_glo,is_ter)) |
---|
[524] | 335 | #else |
---|
[776] | 336 | ierr = NF_GET_VAR_REAL(nid, nvarid, |
---|
| 337 | . pctsrf(1 : klon_glo,is_ter)) |
---|
[524] | 338 | #endif |
---|
| 339 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 340 | PRINT*, 'phyetat0: Lecture echouee pour <FTER>' |
---|
| 341 | CALL abort |
---|
| 342 | ENDIF |
---|
| 343 | else |
---|
| 344 | PRINT*, 'phyetat0: Le champ <FTER> est absent' |
---|
[766] | 345 | c@$$ CALL abort |
---|
[524] | 346 | ENDIF |
---|
[766] | 347 | |
---|
[524] | 348 | C |
---|
| 349 | C fraction de glace de terre |
---|
| 350 | C |
---|
| 351 | ierr = NF_INQ_VARID (nid, "FLIC", nvarid) |
---|
| 352 | IF (ierr .EQ. NF_NOERR) THEN |
---|
| 353 | #ifdef NC_DOUBLE |
---|
[776] | 354 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, |
---|
| 355 | . pctsrf(1 : klon_glo,is_lic)) |
---|
[524] | 356 | #else |
---|
[776] | 357 | ierr = NF_GET_VAR_REAL(nid, nvarid, |
---|
| 358 | . pctsrf(1 : klon_glo,is_lic)) |
---|
[524] | 359 | #endif |
---|
| 360 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 361 | PRINT*, 'phyetat0: Lecture echouee pour <FLIC>' |
---|
| 362 | CALL abort |
---|
| 363 | ENDIF |
---|
| 364 | else |
---|
| 365 | PRINT*, 'phyetat0: Le champ <FLIC> est absent' |
---|
[766] | 366 | c@$$ CALL abort |
---|
[524] | 367 | ENDIF |
---|
| 368 | C |
---|
| 369 | C fraction d'ocean |
---|
| 370 | C |
---|
| 371 | ierr = NF_INQ_VARID (nid, "FOCE", nvarid) |
---|
| 372 | IF (ierr .EQ. NF_NOERR) THEN |
---|
| 373 | #ifdef NC_DOUBLE |
---|
[776] | 374 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, |
---|
| 375 | . pctsrf(1 : klon_glo,is_oce)) |
---|
[524] | 376 | #else |
---|
[776] | 377 | ierr = NF_GET_VAR_REAL(nid, nvarid, |
---|
| 378 | . pctsrf(1 : klon_glo,is_oce)) |
---|
[524] | 379 | #endif |
---|
| 380 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 381 | PRINT*, 'phyetat0: Lecture echouee pour <FOCE>' |
---|
| 382 | CALL abort |
---|
| 383 | ENDIF |
---|
| 384 | else |
---|
| 385 | PRINT*, 'phyetat0: Le champ <FOCE> est absent' |
---|
[766] | 386 | c@$$ CALL abort |
---|
[524] | 387 | ENDIF |
---|
[766] | 388 | |
---|
[524] | 389 | C |
---|
| 390 | C fraction glace de mer |
---|
| 391 | C |
---|
| 392 | ierr = NF_INQ_VARID (nid, "FSIC", nvarid) |
---|
| 393 | IF (ierr .EQ. NF_NOERR) THEN |
---|
| 394 | #ifdef NC_DOUBLE |
---|
[776] | 395 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, |
---|
| 396 | . pctsrf(1 : klon_glo,is_sic)) |
---|
[524] | 397 | #else |
---|
[776] | 398 | ierr = NF_GET_VAR_REAL(nid, nvarid, |
---|
| 399 | . pctsrf(1 : klon_glo, is_sic)) |
---|
[524] | 400 | #endif |
---|
| 401 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 402 | PRINT*, 'phyetat0: Lecture echouee pour <FSIC>' |
---|
| 403 | CALL abort |
---|
| 404 | ENDIF |
---|
| 405 | else |
---|
| 406 | PRINT*, 'phyetat0: Le champ <FSIC> est absent' |
---|
[766] | 407 | c@$$ CALL abort |
---|
[524] | 408 | ENDIF |
---|
[766] | 409 | |
---|
[524] | 410 | C |
---|
| 411 | C Verification de l'adequation entre le masque et les sous-surfaces |
---|
| 412 | C |
---|
[776] | 413 | fractint( 1 : klon_glo) = pctsrf(1 : klon_glo, is_ter) |
---|
| 414 | $ + pctsrf(1 : klon_glo, is_lic) |
---|
| 415 | DO i = 1 , klon_glo |
---|
| 416 | IF ( abs(fractint(i) - zmasq_glo(i) ) .GT. EPSFRA ) THEN |
---|
[524] | 417 | WRITE(*,*) 'phyetat0: attention fraction terre pas ', |
---|
[776] | 418 | $ 'coherente ', i, zmasq_glo(i), pctsrf(i, is_ter) |
---|
[524] | 419 | $ ,pctsrf(i, is_lic) |
---|
| 420 | ENDIF |
---|
| 421 | END DO |
---|
[776] | 422 | fractint (1 : klon_glo) = pctsrf(1 : klon_glo, is_oce) |
---|
| 423 | $ + pctsrf(1 : klon_glo, is_sic) |
---|
| 424 | DO i = 1 , klon_glo |
---|
| 425 | IF ( abs( fractint(i) - (1. - zmasq_glo(i))) .GT. EPSFRA ) THEN |
---|
[524] | 426 | WRITE(*,*) 'phyetat0 attention fraction ocean pas ', |
---|
[776] | 427 | $ 'coherente ', i, zmasq_glo(i) , pctsrf(i, is_oce) |
---|
[524] | 428 | $ ,pctsrf(i, is_sic) |
---|
| 429 | ENDIF |
---|
| 430 | END DO |
---|
[766] | 431 | |
---|
[524] | 432 | C |
---|
| 433 | c Lecture des temperatures du sol: |
---|
| 434 | c |
---|
[766] | 435 | |
---|
[524] | 436 | ierr = NF_INQ_VARID (nid, "TS", nvarid) |
---|
| 437 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 438 | PRINT*, 'phyetat0: Le champ <TS> est absent' |
---|
| 439 | PRINT*, ' Mais je vais essayer de lire TS**' |
---|
| 440 | DO nsrf = 1, nbsrf |
---|
| 441 | IF (nsrf.GT.99) THEN |
---|
| 442 | PRINT*, "Trop de sous-mailles" |
---|
| 443 | CALL abort |
---|
| 444 | ENDIF |
---|
| 445 | WRITE(str2,'(i2.2)') nsrf |
---|
| 446 | ierr = NF_INQ_VARID (nid, "TS"//str2, nvarid) |
---|
| 447 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 448 | PRINT*, "phyetat0: Le champ <TS"//str2//"> est absent" |
---|
| 449 | CALL abort |
---|
| 450 | ENDIF |
---|
| 451 | #ifdef NC_DOUBLE |
---|
| 452 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tsol(1,nsrf)) |
---|
| 453 | #else |
---|
| 454 | ierr = NF_GET_VAR_REAL(nid, nvarid, tsol(1,nsrf)) |
---|
| 455 | #endif |
---|
| 456 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 457 | PRINT*, "phyetat0: Lecture echouee pour <TS"//str2//">" |
---|
| 458 | CALL abort |
---|
| 459 | ENDIF |
---|
[766] | 460 | |
---|
[524] | 461 | xmin = 1.0E+20 |
---|
| 462 | xmax = -1.0E+20 |
---|
[776] | 463 | DO i = 1, klon_glo |
---|
[524] | 464 | xmin = MIN(tsol(i,nsrf),xmin) |
---|
| 465 | xmax = MAX(tsol(i,nsrf),xmax) |
---|
| 466 | ENDDO |
---|
| 467 | PRINT*,'Temperature du sol TS**:', nsrf, xmin, xmax |
---|
| 468 | ENDDO |
---|
| 469 | ELSE |
---|
| 470 | PRINT*, 'phyetat0: Le champ <TS> est present' |
---|
| 471 | PRINT*, ' J ignore donc les autres temperatures TS**' |
---|
| 472 | #ifdef NC_DOUBLE |
---|
| 473 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tsol(1,1)) |
---|
| 474 | #else |
---|
| 475 | ierr = NF_GET_VAR_REAL(nid, nvarid, tsol(1,1)) |
---|
| 476 | #endif |
---|
| 477 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 478 | PRINT*, "phyetat0: Lecture echouee pour <TS>" |
---|
| 479 | CALL abort |
---|
| 480 | ENDIF |
---|
| 481 | xmin = 1.0E+20 |
---|
| 482 | xmax = -1.0E+20 |
---|
[776] | 483 | DO i = 1, klon_glo |
---|
[524] | 484 | xmin = MIN(tsol(i,1),xmin) |
---|
| 485 | xmax = MAX(tsol(i,1),xmax) |
---|
| 486 | ENDDO |
---|
| 487 | PRINT*,'Temperature du sol <TS>', xmin, xmax |
---|
| 488 | DO nsrf = 2, nbsrf |
---|
[776] | 489 | DO i = 1, klon_glo |
---|
[524] | 490 | tsol(i,nsrf) = tsol(i,1) |
---|
| 491 | ENDDO |
---|
| 492 | ENDDO |
---|
| 493 | ENDIF |
---|
[766] | 494 | |
---|
[524] | 495 | c |
---|
| 496 | c Lecture des temperatures du sol profond: |
---|
| 497 | c |
---|
| 498 | DO nsrf = 1, nbsrf |
---|
| 499 | DO isoil=1, nsoilmx |
---|
| 500 | IF (isoil.GT.99 .AND. nsrf.GT.99) THEN |
---|
| 501 | PRINT*, "Trop de couches ou sous-mailles" |
---|
| 502 | CALL abort |
---|
| 503 | ENDIF |
---|
| 504 | WRITE(str7,'(i2.2,"srf",i2.2)') isoil, nsrf |
---|
| 505 | ierr = NF_INQ_VARID (nid, 'Tsoil'//str7, nvarid) |
---|
| 506 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 507 | PRINT*, "phyetat0: Le champ <Tsoil"//str7//"> est absent" |
---|
| 508 | PRINT*, " Il prend donc la valeur de surface" |
---|
[776] | 509 | DO i=1, klon_glo |
---|
[524] | 510 | tsoil(i,isoil,nsrf)=tsol(i,nsrf) |
---|
| 511 | ENDDO |
---|
| 512 | ELSE |
---|
| 513 | #ifdef NC_DOUBLE |
---|
| 514 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tsoil(1,isoil,nsrf)) |
---|
| 515 | #else |
---|
| 516 | ierr = NF_GET_VAR_REAL(nid, nvarid, tsoil(1,isoil,nsrf)) |
---|
| 517 | #endif |
---|
| 518 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 519 | PRINT*, "Lecture echouee pour <Tsoil"//str7//">" |
---|
| 520 | CALL abort |
---|
| 521 | ENDIF |
---|
| 522 | ENDIF |
---|
| 523 | ENDDO |
---|
| 524 | ENDDO |
---|
| 525 | c |
---|
[644] | 526 | cIM "slab" ocean |
---|
[524] | 527 | c |
---|
[644] | 528 | c Lecture de tslab (pour slab ocean seulement): |
---|
| 529 | c |
---|
[782] | 530 | IF (ocean_in .eq. 'slab ') then |
---|
[651] | 531 | ierr = NF_INQ_VARID (nid, "TSLAB", nvarid) |
---|
| 532 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 533 | PRINT*, "phyetat0: Le champ <TSLAB> est absent" |
---|
| 534 | CALL abort |
---|
| 535 | ENDIF |
---|
[524] | 536 | #ifdef NC_DOUBLE |
---|
[651] | 537 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tslab) |
---|
[524] | 538 | #else |
---|
[651] | 539 | ierr = NF_GET_VAR_REAL(nid, nvarid, tslab) |
---|
[524] | 540 | #endif |
---|
[651] | 541 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 542 | PRINT*, "phyetat0: Lecture echouee pour <TSLAB>" |
---|
| 543 | CALL abort |
---|
| 544 | ENDIF |
---|
| 545 | xmin = 1.0E+20 |
---|
| 546 | xmax = -1.0E+20 |
---|
[776] | 547 | DO i = 1, klon_glo |
---|
[651] | 548 | xmin = MIN(tslab(i),xmin) |
---|
| 549 | xmax = MAX(tslab(i),xmax) |
---|
| 550 | ENDDO |
---|
[689] | 551 | PRINT*,'Min, Max tslab (utilise si OCEAN=slab )', xmin, xmax |
---|
[524] | 552 | c |
---|
[644] | 553 | c Lecture de seaice (pour slab ocean seulement): |
---|
| 554 | c |
---|
[651] | 555 | ierr = NF_INQ_VARID (nid, "SEAICE", nvarid) |
---|
| 556 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 557 | PRINT*, "phyetat0: Le champ <SEAICE> est absent" |
---|
| 558 | CALL abort |
---|
| 559 | ENDIF |
---|
[644] | 560 | #ifdef NC_DOUBLE |
---|
[651] | 561 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, seaice) |
---|
[644] | 562 | #else |
---|
[651] | 563 | ierr = NF_GET_VAR_REAL(nid, nvarid, seaice) |
---|
[644] | 564 | #endif |
---|
[651] | 565 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 566 | PRINT*, "phyetat0: Lecture echouee pour <SEAICE>" |
---|
| 567 | CALL abort |
---|
| 568 | ENDIF |
---|
| 569 | xmin = 1.0E+20 |
---|
| 570 | xmax = -1.0E+20 |
---|
[776] | 571 | DO i = 1, klon_glo |
---|
[651] | 572 | xmin = MIN(seaice(i),xmin) |
---|
| 573 | xmax = MAX(seaice(i),xmax) |
---|
| 574 | ENDDO |
---|
[689] | 575 | PRINT*,'Masse de la glace de mer (utilise si OCEAN=slab)', |
---|
| 576 | $ xmin, xmax |
---|
[651] | 577 | ELSE |
---|
| 578 | tslab = 0. |
---|
| 579 | seaice = 0. |
---|
[644] | 580 | ENDIF |
---|
| 581 | c |
---|
[524] | 582 | c Lecture de l'humidite de l'air juste au dessus du sol: |
---|
| 583 | c |
---|
| 584 | ierr = NF_INQ_VARID (nid, "QS", nvarid) |
---|
| 585 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 586 | PRINT*, 'phyetat0: Le champ <QS> est absent' |
---|
| 587 | PRINT*, ' Mais je vais essayer de lire QS**' |
---|
| 588 | DO nsrf = 1, nbsrf |
---|
| 589 | IF (nsrf.GT.99) THEN |
---|
| 590 | PRINT*, "Trop de sous-mailles" |
---|
| 591 | CALL abort |
---|
| 592 | ENDIF |
---|
| 593 | WRITE(str2,'(i2.2)') nsrf |
---|
| 594 | ierr = NF_INQ_VARID (nid, "QS"//str2, nvarid) |
---|
| 595 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 596 | PRINT*, "phyetat0: Le champ <QS"//str2//"> est absent" |
---|
| 597 | CALL abort |
---|
| 598 | ENDIF |
---|
| 599 | #ifdef NC_DOUBLE |
---|
| 600 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, qsurf(1,nsrf)) |
---|
| 601 | #else |
---|
| 602 | ierr = NF_GET_VAR_REAL(nid, nvarid, qsurf(1,nsrf)) |
---|
| 603 | #endif |
---|
| 604 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 605 | PRINT*, "phyetat0: Lecture echouee pour <QS"//str2//">" |
---|
| 606 | CALL abort |
---|
| 607 | ENDIF |
---|
| 608 | xmin = 1.0E+20 |
---|
| 609 | xmax = -1.0E+20 |
---|
[776] | 610 | DO i = 1, klon_glo |
---|
[524] | 611 | xmin = MIN(qsurf(i,nsrf),xmin) |
---|
| 612 | xmax = MAX(qsurf(i,nsrf),xmax) |
---|
| 613 | ENDDO |
---|
| 614 | PRINT*,'Humidite pres du sol QS**:', nsrf, xmin, xmax |
---|
| 615 | ENDDO |
---|
| 616 | ELSE |
---|
| 617 | PRINT*, 'phyetat0: Le champ <QS> est present' |
---|
| 618 | PRINT*, ' J ignore donc les autres humidites QS**' |
---|
| 619 | #ifdef NC_DOUBLE |
---|
| 620 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, qsurf(1,1)) |
---|
| 621 | #else |
---|
| 622 | ierr = NF_GET_VAR_REAL(nid, nvarid, qsurf(1,1)) |
---|
| 623 | #endif |
---|
| 624 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 625 | PRINT*, "phyetat0: Lecture echouee pour <QS>" |
---|
| 626 | CALL abort |
---|
| 627 | ENDIF |
---|
| 628 | xmin = 1.0E+20 |
---|
| 629 | xmax = -1.0E+20 |
---|
[776] | 630 | DO i = 1, klon_glo |
---|
[524] | 631 | xmin = MIN(qsurf(i,1),xmin) |
---|
| 632 | xmax = MAX(qsurf(i,1),xmax) |
---|
| 633 | ENDDO |
---|
| 634 | PRINT*,'Humidite pres du sol <QS>', xmin, xmax |
---|
| 635 | DO nsrf = 2, nbsrf |
---|
[776] | 636 | DO i = 1, klon_glo |
---|
[524] | 637 | qsurf(i,nsrf) = qsurf(i,1) |
---|
| 638 | ENDDO |
---|
| 639 | ENDDO |
---|
| 640 | ENDIF |
---|
| 641 | C |
---|
| 642 | C Eau dans le sol (pour le modele de sol "bucket") |
---|
| 643 | C |
---|
| 644 | ierr = NF_INQ_VARID (nid, "QSOL", nvarid) |
---|
| 645 | IF (ierr .EQ. NF_NOERR) THEN |
---|
| 646 | #ifdef NC_DOUBLE |
---|
| 647 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, qsol) |
---|
| 648 | #else |
---|
| 649 | ierr = NF_GET_VAR_REAL(nid, nvarid, qsol) |
---|
| 650 | #endif |
---|
| 651 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 652 | PRINT*, 'phyetat0: Lecture echouee pour <QSOL>' |
---|
| 653 | CALL abort |
---|
| 654 | ENDIF |
---|
| 655 | else |
---|
| 656 | PRINT*, 'phyetat0: Le champ <QSOL> est absent' |
---|
| 657 | PRINT*, ' Valeur par defaut nulle' |
---|
| 658 | qsol(:)=0. |
---|
[766] | 659 | c@$$ CALL abort |
---|
[524] | 660 | ENDIF |
---|
| 661 | xmin = 1.0E+20 |
---|
| 662 | xmax = -1.0E+20 |
---|
[776] | 663 | DO i = 1, klon_glo |
---|
[524] | 664 | xmin = MIN(qsol(i),xmin) |
---|
| 665 | xmax = MAX(qsol(i),xmax) |
---|
| 666 | ENDDO |
---|
| 667 | PRINT*,'Eau dans le sol (mm) <QSOL>', xmin, xmax |
---|
| 668 | c |
---|
| 669 | c Lecture de neige au sol: |
---|
| 670 | c |
---|
| 671 | ierr = NF_INQ_VARID (nid, "SNOW", nvarid) |
---|
| 672 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 673 | PRINT*, 'phyetat0: Le champ <SNOW> est absent' |
---|
| 674 | PRINT*, ' Mais je vais essayer de lire SNOW**' |
---|
| 675 | DO nsrf = 1, nbsrf |
---|
| 676 | IF (nsrf.GT.99) THEN |
---|
| 677 | PRINT*, "Trop de sous-mailles" |
---|
| 678 | CALL abort |
---|
| 679 | ENDIF |
---|
| 680 | WRITE(str2,'(i2.2)') nsrf |
---|
| 681 | ierr = NF_INQ_VARID (nid, "SNOW"//str2, nvarid) |
---|
| 682 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 683 | PRINT*, "phyetat0: Le champ <SNOW"//str2//"> est absent" |
---|
| 684 | CALL abort |
---|
| 685 | ENDIF |
---|
| 686 | #ifdef NC_DOUBLE |
---|
| 687 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, snow(1,nsrf)) |
---|
| 688 | #else |
---|
| 689 | ierr = NF_GET_VAR_REAL(nid, nvarid, snow(1,nsrf)) |
---|
| 690 | #endif |
---|
| 691 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 692 | PRINT*, "phyetat0: Lecture echouee pour <SNOW"//str2//">" |
---|
| 693 | CALL abort |
---|
| 694 | ENDIF |
---|
| 695 | xmin = 1.0E+20 |
---|
| 696 | xmax = -1.0E+20 |
---|
[776] | 697 | DO i = 1, klon_glo |
---|
[524] | 698 | xmin = MIN(snow(i,nsrf),xmin) |
---|
| 699 | xmax = MAX(snow(i,nsrf),xmax) |
---|
| 700 | ENDDO |
---|
| 701 | PRINT*,'Neige du sol SNOW**:', nsrf, xmin, xmax |
---|
| 702 | ENDDO |
---|
| 703 | ELSE |
---|
| 704 | PRINT*, 'phyetat0: Le champ <SNOW> est present' |
---|
| 705 | PRINT*, ' J ignore donc les autres neiges SNOW**' |
---|
| 706 | #ifdef NC_DOUBLE |
---|
| 707 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, snow(1,1)) |
---|
| 708 | #else |
---|
| 709 | ierr = NF_GET_VAR_REAL(nid, nvarid, snow(1,1)) |
---|
| 710 | #endif |
---|
| 711 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 712 | PRINT*, "phyetat0: Lecture echouee pour <SNOW>" |
---|
| 713 | CALL abort |
---|
| 714 | ENDIF |
---|
| 715 | xmin = 1.0E+20 |
---|
| 716 | xmax = -1.0E+20 |
---|
[776] | 717 | DO i = 1, klon_glo |
---|
[524] | 718 | xmin = MIN(snow(i,1),xmin) |
---|
| 719 | xmax = MAX(snow(i,1),xmax) |
---|
| 720 | ENDDO |
---|
| 721 | PRINT*,'Neige du sol <SNOW>', xmin, xmax |
---|
| 722 | DO nsrf = 2, nbsrf |
---|
[776] | 723 | DO i = 1, klon_glo |
---|
[524] | 724 | snow(i,nsrf) = snow(i,1) |
---|
| 725 | ENDDO |
---|
| 726 | ENDDO |
---|
| 727 | ENDIF |
---|
| 728 | c |
---|
[888] | 729 | c Lecture de albedo de l'interval visible au sol: |
---|
[524] | 730 | c |
---|
| 731 | ierr = NF_INQ_VARID (nid, "ALBE", nvarid) |
---|
| 732 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 733 | PRINT*, 'phyetat0: Le champ <ALBE> est absent' |
---|
| 734 | PRINT*, ' Mais je vais essayer de lire ALBE**' |
---|
| 735 | DO nsrf = 1, nbsrf |
---|
| 736 | IF (nsrf.GT.99) THEN |
---|
| 737 | PRINT*, "Trop de sous-mailles" |
---|
| 738 | CALL abort |
---|
| 739 | ENDIF |
---|
| 740 | WRITE(str2,'(i2.2)') nsrf |
---|
| 741 | ierr = NF_INQ_VARID (nid, "ALBE"//str2, nvarid) |
---|
| 742 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 743 | PRINT*, "phyetat0: Le champ <ALBE"//str2//"> est absent" |
---|
| 744 | CALL abort |
---|
| 745 | ENDIF |
---|
| 746 | #ifdef NC_DOUBLE |
---|
[888] | 747 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, alb1(1,nsrf)) |
---|
[524] | 748 | #else |
---|
[888] | 749 | ierr = NF_GET_VAR_REAL(nid, nvarid, alb1(1,nsrf)) |
---|
[524] | 750 | #endif |
---|
| 751 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 752 | PRINT*, "phyetat0: Lecture echouee pour <ALBE"//str2//">" |
---|
| 753 | CALL abort |
---|
| 754 | ENDIF |
---|
| 755 | xmin = 1.0E+20 |
---|
| 756 | xmax = -1.0E+20 |
---|
[776] | 757 | DO i = 1, klon_glo |
---|
[888] | 758 | xmin = MIN(alb1(i,nsrf),xmin) |
---|
| 759 | xmax = MAX(alb1(i,nsrf),xmax) |
---|
[524] | 760 | ENDDO |
---|
| 761 | PRINT*,'Albedo du sol ALBE**:', nsrf, xmin, xmax |
---|
| 762 | ENDDO |
---|
| 763 | ELSE |
---|
| 764 | PRINT*, 'phyetat0: Le champ <ALBE> est present' |
---|
| 765 | PRINT*, ' J ignore donc les autres ALBE**' |
---|
| 766 | #ifdef NC_DOUBLE |
---|
[888] | 767 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, alb1(1,1)) |
---|
[524] | 768 | #else |
---|
[888] | 769 | ierr = NF_GET_VAR_REAL(nid, nvarid, alb1(1,1)) |
---|
[524] | 770 | #endif |
---|
| 771 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 772 | PRINT*, "phyetat0: Lecture echouee pour <ALBE>" |
---|
| 773 | CALL abort |
---|
| 774 | ENDIF |
---|
| 775 | xmin = 1.0E+20 |
---|
| 776 | xmax = -1.0E+20 |
---|
[776] | 777 | DO i = 1, klon_glo |
---|
[888] | 778 | xmin = MIN(alb1(i,1),xmin) |
---|
| 779 | xmax = MAX(alb1(i,1),xmax) |
---|
[524] | 780 | ENDDO |
---|
| 781 | PRINT*,'Neige du sol <ALBE>', xmin, xmax |
---|
| 782 | DO nsrf = 2, nbsrf |
---|
[776] | 783 | DO i = 1, klon_glo |
---|
[888] | 784 | alb1(i,nsrf) = alb1(i,1) |
---|
[524] | 785 | ENDDO |
---|
| 786 | ENDDO |
---|
| 787 | ENDIF |
---|
| 788 | |
---|
| 789 | c |
---|
[888] | 790 | c Lecture de albedo au sol dans l'interval proche infra-rouge: |
---|
[524] | 791 | c |
---|
| 792 | ierr = NF_INQ_VARID (nid, "ALBLW", nvarid) |
---|
| 793 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 794 | PRINT*, 'phyetat0: Le champ <ALBLW> est absent' |
---|
| 795 | c PRINT*, ' Mais je vais essayer de lire ALBLW**' |
---|
| 796 | PRINT*, ' Mais je vais prendre ALBE**' |
---|
| 797 | DO nsrf = 1, nbsrf |
---|
[776] | 798 | DO i = 1, klon_glo |
---|
[888] | 799 | alb2(i,nsrf) = alb1(i,nsrf) |
---|
[524] | 800 | ENDDO |
---|
| 801 | ENDDO |
---|
| 802 | ELSE |
---|
| 803 | PRINT*, 'phyetat0: Le champ <ALBLW> est present' |
---|
| 804 | PRINT*, ' J ignore donc les autres ALBLW**' |
---|
| 805 | #ifdef NC_DOUBLE |
---|
[888] | 806 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, alb2(1,1)) |
---|
[524] | 807 | #else |
---|
[888] | 808 | ierr = NF_GET_VAR_REAL(nid, nvarid, alb2(1,1)) |
---|
[524] | 809 | #endif |
---|
| 810 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 811 | PRINT*, "phyetat0: Lecture echouee pour <ALBLW>" |
---|
| 812 | CALL abort |
---|
| 813 | ENDIF |
---|
| 814 | xmin = 1.0E+20 |
---|
| 815 | xmax = -1.0E+20 |
---|
[776] | 816 | DO i = 1, klon_glo |
---|
[888] | 817 | xmin = MIN(alb2(i,1),xmin) |
---|
| 818 | xmax = MAX(alb2(i,1),xmax) |
---|
[524] | 819 | ENDDO |
---|
| 820 | PRINT*,'Neige du sol <ALBLW>', xmin, xmax |
---|
| 821 | DO nsrf = 2, nbsrf |
---|
[776] | 822 | DO i = 1, klon_glo |
---|
[888] | 823 | alb2(i,nsrf) = alb2(i,1) |
---|
[524] | 824 | ENDDO |
---|
| 825 | ENDDO |
---|
| 826 | ENDIF |
---|
| 827 | c |
---|
| 828 | c Lecture de evaporation: |
---|
| 829 | c |
---|
| 830 | ierr = NF_INQ_VARID (nid, "EVAP", nvarid) |
---|
| 831 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 832 | PRINT*, 'phyetat0: Le champ <EVAP> est absent' |
---|
| 833 | PRINT*, ' Mais je vais essayer de lire EVAP**' |
---|
| 834 | DO nsrf = 1, nbsrf |
---|
| 835 | IF (nsrf.GT.99) THEN |
---|
| 836 | PRINT*, "Trop de sous-mailles" |
---|
| 837 | CALL abort |
---|
| 838 | ENDIF |
---|
| 839 | WRITE(str2,'(i2.2)') nsrf |
---|
| 840 | ierr = NF_INQ_VARID (nid, "EVAP"//str2, nvarid) |
---|
| 841 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 842 | PRINT*, "phyetat0: Le champ <EVAP"//str2//"> est absent" |
---|
| 843 | CALL abort |
---|
| 844 | ENDIF |
---|
| 845 | #ifdef NC_DOUBLE |
---|
| 846 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, evap(1,nsrf)) |
---|
| 847 | #else |
---|
| 848 | ierr = NF_GET_VAR_REAL(nid, nvarid, evap(1,nsrf)) |
---|
| 849 | #endif |
---|
| 850 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 851 | PRINT*, "phyetat0: Lecture echouee pour <EVAP"//str2//">" |
---|
| 852 | CALL abort |
---|
| 853 | ENDIF |
---|
| 854 | xmin = 1.0E+20 |
---|
| 855 | xmax = -1.0E+20 |
---|
[776] | 856 | DO i = 1, klon_glo |
---|
[524] | 857 | xmin = MIN(evap(i,nsrf),xmin) |
---|
| 858 | xmax = MAX(evap(i,nsrf),xmax) |
---|
| 859 | ENDDO |
---|
| 860 | PRINT*,'evap du sol EVAP**:', nsrf, xmin, xmax |
---|
| 861 | ENDDO |
---|
| 862 | ELSE |
---|
| 863 | PRINT*, 'phyetat0: Le champ <EVAP> est present' |
---|
| 864 | PRINT*, ' J ignore donc les autres EVAP**' |
---|
| 865 | #ifdef NC_DOUBLE |
---|
| 866 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, evap(1,1)) |
---|
| 867 | #else |
---|
| 868 | ierr = NF_GET_VAR_REAL(nid, nvarid, evap(1,1)) |
---|
| 869 | #endif |
---|
| 870 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 871 | PRINT*, "phyetat0: Lecture echouee pour <EVAP>" |
---|
| 872 | CALL abort |
---|
| 873 | ENDIF |
---|
| 874 | xmin = 1.0E+20 |
---|
| 875 | xmax = -1.0E+20 |
---|
[776] | 876 | DO i = 1, klon_glo |
---|
[524] | 877 | xmin = MIN(evap(i,1),xmin) |
---|
| 878 | xmax = MAX(evap(i,1),xmax) |
---|
| 879 | ENDDO |
---|
| 880 | PRINT*,'Evap du sol <EVAP>', xmin, xmax |
---|
| 881 | DO nsrf = 2, nbsrf |
---|
[776] | 882 | DO i = 1, klon_glo |
---|
[524] | 883 | evap(i,nsrf) = evap(i,1) |
---|
| 884 | ENDDO |
---|
| 885 | ENDDO |
---|
| 886 | ENDIF |
---|
| 887 | c |
---|
| 888 | c Lecture precipitation liquide: |
---|
| 889 | c |
---|
| 890 | ierr = NF_INQ_VARID (nid, "rain_f", nvarid) |
---|
| 891 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 892 | PRINT*, 'phyetat0: Le champ <rain_f> est absent' |
---|
| 893 | CALL abort |
---|
| 894 | ENDIF |
---|
| 895 | #ifdef NC_DOUBLE |
---|
| 896 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rain_fall) |
---|
| 897 | #else |
---|
| 898 | ierr = NF_GET_VAR_REAL(nid, nvarid, rain_fall) |
---|
| 899 | #endif |
---|
| 900 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 901 | PRINT*, 'phyetat0: Lecture echouee pour <rain_f>' |
---|
| 902 | CALL abort |
---|
| 903 | ENDIF |
---|
| 904 | xmin = 1.0E+20 |
---|
| 905 | xmax = -1.0E+20 |
---|
[776] | 906 | DO i = 1, klon_glo |
---|
[524] | 907 | xmin = MIN(rain_fall(i),xmin) |
---|
| 908 | xmax = MAX(rain_fall(i),xmax) |
---|
| 909 | ENDDO |
---|
| 910 | PRINT*,'Precipitation liquide rain_f:', xmin, xmax |
---|
| 911 | c |
---|
| 912 | c Lecture precipitation solide: |
---|
| 913 | c |
---|
| 914 | ierr = NF_INQ_VARID (nid, "snow_f", nvarid) |
---|
| 915 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 916 | PRINT*, 'phyetat0: Le champ <snow_f> est absent' |
---|
| 917 | CALL abort |
---|
| 918 | ENDIF |
---|
| 919 | #ifdef NC_DOUBLE |
---|
| 920 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, snow_fall) |
---|
| 921 | #else |
---|
| 922 | ierr = NF_GET_VAR_REAL(nid, nvarid, snow_fall) |
---|
| 923 | #endif |
---|
| 924 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 925 | PRINT*, 'phyetat0: Lecture echouee pour <snow_f>' |
---|
| 926 | CALL abort |
---|
| 927 | ENDIF |
---|
| 928 | xmin = 1.0E+20 |
---|
| 929 | xmax = -1.0E+20 |
---|
[776] | 930 | DO i = 1, klon_glo |
---|
[524] | 931 | xmin = MIN(snow_fall(i),xmin) |
---|
| 932 | xmax = MAX(snow_fall(i),xmax) |
---|
| 933 | ENDDO |
---|
| 934 | PRINT*,'Precipitation solide snow_f:', xmin, xmax |
---|
| 935 | c |
---|
| 936 | c Lecture rayonnement solaire au sol: |
---|
| 937 | c |
---|
| 938 | ierr = NF_INQ_VARID (nid, "solsw", nvarid) |
---|
| 939 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 940 | PRINT*, 'phyetat0: Le champ <solsw> est absent' |
---|
| 941 | PRINT*, 'mis a zero' |
---|
| 942 | solsw = 0. |
---|
| 943 | ELSE |
---|
| 944 | #ifdef NC_DOUBLE |
---|
| 945 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, solsw) |
---|
| 946 | #else |
---|
| 947 | ierr = NF_GET_VAR_REAL(nid, nvarid, solsw) |
---|
| 948 | #endif |
---|
| 949 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 950 | PRINT*, 'phyetat0: Lecture echouee pour <solsw>' |
---|
| 951 | CALL abort |
---|
| 952 | ENDIF |
---|
| 953 | ENDIF |
---|
| 954 | xmin = 1.0E+20 |
---|
| 955 | xmax = -1.0E+20 |
---|
[776] | 956 | DO i = 1, klon_glo |
---|
[524] | 957 | xmin = MIN(solsw(i),xmin) |
---|
| 958 | xmax = MAX(solsw(i),xmax) |
---|
| 959 | ENDDO |
---|
| 960 | PRINT*,'Rayonnement solaire au sol solsw:', xmin, xmax |
---|
| 961 | c |
---|
| 962 | c Lecture rayonnement IF au sol: |
---|
| 963 | c |
---|
| 964 | ierr = NF_INQ_VARID (nid, "sollw", nvarid) |
---|
| 965 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 966 | PRINT*, 'phyetat0: Le champ <sollw> est absent' |
---|
| 967 | PRINT*, 'mis a zero' |
---|
| 968 | sollw = 0. |
---|
| 969 | ELSE |
---|
| 970 | #ifdef NC_DOUBLE |
---|
| 971 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, sollw) |
---|
| 972 | #else |
---|
| 973 | ierr = NF_GET_VAR_REAL(nid, nvarid, sollw) |
---|
| 974 | #endif |
---|
| 975 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 976 | PRINT*, 'phyetat0: Lecture echouee pour <sollw>' |
---|
| 977 | CALL abort |
---|
| 978 | ENDIF |
---|
| 979 | ENDIF |
---|
| 980 | xmin = 1.0E+20 |
---|
| 981 | xmax = -1.0E+20 |
---|
[776] | 982 | DO i = 1, klon_glo |
---|
[524] | 983 | xmin = MIN(sollw(i),xmin) |
---|
| 984 | xmax = MAX(sollw(i),xmax) |
---|
| 985 | ENDDO |
---|
| 986 | PRINT*,'Rayonnement IF au sol sollw:', xmin, xmax |
---|
[776] | 987 | |
---|
| 988 | ENDIF ! is_mpi_root |
---|
[766] | 989 | c$OMP END MASTER |
---|
| 990 | |
---|
| 991 | |
---|
| 992 | c$OMP MASTER |
---|
[776] | 993 | IF (is_mpi_root) THEN |
---|
[524] | 994 | c |
---|
| 995 | c Lecture derive des flux: |
---|
| 996 | c |
---|
| 997 | ierr = NF_INQ_VARID (nid, "fder", nvarid) |
---|
| 998 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 999 | PRINT*, 'phyetat0: Le champ <fder> est absent' |
---|
| 1000 | PRINT*, 'mis a zero' |
---|
| 1001 | fder = 0. |
---|
| 1002 | ELSE |
---|
| 1003 | #ifdef NC_DOUBLE |
---|
| 1004 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, fder) |
---|
| 1005 | #else |
---|
| 1006 | ierr = NF_GET_VAR_REAL(nid, nvarid, fder) |
---|
| 1007 | #endif |
---|
| 1008 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1009 | PRINT*, 'phyetat0: Lecture echouee pour <fder>' |
---|
| 1010 | CALL abort |
---|
| 1011 | ENDIF |
---|
| 1012 | ENDIF |
---|
| 1013 | xmin = 1.0E+20 |
---|
| 1014 | xmax = -1.0E+20 |
---|
[776] | 1015 | DO i = 1, klon_glo |
---|
[524] | 1016 | xmin = MIN(fder(i),xmin) |
---|
| 1017 | xmax = MAX(fder(i),xmax) |
---|
| 1018 | ENDDO |
---|
| 1019 | PRINT*,'Derive des flux fder:', xmin, xmax |
---|
| 1020 | |
---|
| 1021 | c |
---|
| 1022 | c Lecture du rayonnement net au sol: |
---|
| 1023 | c |
---|
| 1024 | ierr = NF_INQ_VARID (nid, "RADS", nvarid) |
---|
| 1025 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1026 | PRINT*, 'phyetat0: Le champ <RADS> est absent' |
---|
| 1027 | CALL abort |
---|
| 1028 | ENDIF |
---|
| 1029 | #ifdef NC_DOUBLE |
---|
| 1030 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, radsol) |
---|
| 1031 | #else |
---|
| 1032 | ierr = NF_GET_VAR_REAL(nid, nvarid, radsol) |
---|
| 1033 | #endif |
---|
| 1034 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1035 | PRINT*, 'phyetat0: Lecture echouee pour <RADS>' |
---|
| 1036 | CALL abort |
---|
| 1037 | ENDIF |
---|
| 1038 | xmin = 1.0E+20 |
---|
| 1039 | xmax = -1.0E+20 |
---|
[776] | 1040 | DO i = 1, klon_glo |
---|
[524] | 1041 | xmin = MIN(radsol(i),xmin) |
---|
| 1042 | xmax = MAX(radsol(i),xmax) |
---|
| 1043 | ENDDO |
---|
| 1044 | PRINT*,'Rayonnement net au sol radsol:', xmin, xmax |
---|
| 1045 | c |
---|
| 1046 | c Lecture de la longueur de rugosite |
---|
| 1047 | c |
---|
| 1048 | c |
---|
| 1049 | ierr = NF_INQ_VARID (nid, "RUG", nvarid) |
---|
| 1050 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1051 | PRINT*, 'phyetat0: Le champ <RUG> est absent' |
---|
| 1052 | PRINT*, ' Mais je vais essayer de lire RUG**' |
---|
| 1053 | DO nsrf = 1, nbsrf |
---|
| 1054 | IF (nsrf.GT.99) THEN |
---|
| 1055 | PRINT*, "Trop de sous-mailles" |
---|
| 1056 | CALL abort |
---|
| 1057 | ENDIF |
---|
| 1058 | WRITE(str2,'(i2.2)') nsrf |
---|
| 1059 | ierr = NF_INQ_VARID (nid, "RUG"//str2, nvarid) |
---|
| 1060 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1061 | PRINT*, "phyetat0: Le champ <RUG"//str2//"> est absent" |
---|
| 1062 | CALL abort |
---|
| 1063 | ENDIF |
---|
| 1064 | #ifdef NC_DOUBLE |
---|
| 1065 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, frugs(1,nsrf)) |
---|
| 1066 | #else |
---|
| 1067 | ierr = NF_GET_VAR_REAL(nid, nvarid, frugs(1,nsrf)) |
---|
| 1068 | #endif |
---|
| 1069 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1070 | PRINT*, "phyetat0: Lecture echouee pour <RUG"//str2//">" |
---|
| 1071 | CALL abort |
---|
| 1072 | ENDIF |
---|
| 1073 | xmin = 1.0E+20 |
---|
| 1074 | xmax = -1.0E+20 |
---|
[776] | 1075 | DO i = 1, klon_glo |
---|
[524] | 1076 | xmin = MIN(frugs(i,nsrf),xmin) |
---|
| 1077 | xmax = MAX(frugs(i,nsrf),xmax) |
---|
| 1078 | ENDDO |
---|
| 1079 | PRINT*,'rugosite du sol RUG**:', nsrf, xmin, xmax |
---|
| 1080 | ENDDO |
---|
| 1081 | ELSE |
---|
| 1082 | PRINT*, 'phyetat0: Le champ <RUG> est present' |
---|
| 1083 | PRINT*, ' J ignore donc les autres RUG**' |
---|
| 1084 | #ifdef NC_DOUBLE |
---|
| 1085 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, frugs(1,1)) |
---|
| 1086 | #else |
---|
| 1087 | ierr = NF_GET_VAR_REAL(nid, nvarid, frugs(1,1)) |
---|
| 1088 | #endif |
---|
| 1089 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1090 | PRINT*, "phyetat0: Lecture echouee pour <RUG>" |
---|
| 1091 | CALL abort |
---|
| 1092 | ENDIF |
---|
| 1093 | xmin = 1.0E+20 |
---|
| 1094 | xmax = -1.0E+20 |
---|
[776] | 1095 | DO i = 1, klon_glo |
---|
[524] | 1096 | xmin = MIN(frugs(i,1),xmin) |
---|
| 1097 | xmax = MAX(frugs(i,1),xmax) |
---|
| 1098 | ENDDO |
---|
| 1099 | PRINT*,'rugosite <RUG>', xmin, xmax |
---|
| 1100 | DO nsrf = 2, nbsrf |
---|
[776] | 1101 | DO i = 1, klon_glo |
---|
[524] | 1102 | frugs(i,nsrf) = frugs(i,1) |
---|
| 1103 | ENDDO |
---|
| 1104 | ENDDO |
---|
| 1105 | ENDIF |
---|
| 1106 | |
---|
| 1107 | c |
---|
| 1108 | c Lecture de l'age de la neige: |
---|
| 1109 | c |
---|
| 1110 | ierr = NF_INQ_VARID (nid, "AGESNO", nvarid) |
---|
| 1111 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1112 | PRINT*, 'phyetat0: Le champ <AGESNO> est absent' |
---|
| 1113 | PRINT*, ' Mais je vais essayer de lire AGESNO**' |
---|
| 1114 | DO nsrf = 1, nbsrf |
---|
| 1115 | IF (nsrf.GT.99) THEN |
---|
| 1116 | PRINT*, "Trop de sous-mailles" |
---|
| 1117 | CALL abort |
---|
| 1118 | ENDIF |
---|
| 1119 | WRITE(str2,'(i2.2)') nsrf |
---|
| 1120 | ierr = NF_INQ_VARID (nid, "AGESNO"//str2, nvarid) |
---|
| 1121 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1122 | PRINT*, "phyetat0: Le champ <AGESNO"//str2//"> est absent" |
---|
| 1123 | agesno = 50.0 |
---|
| 1124 | ENDIF |
---|
| 1125 | #ifdef NC_DOUBLE |
---|
| 1126 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, agesno(1,nsrf)) |
---|
| 1127 | #else |
---|
| 1128 | ierr = NF_GET_VAR_REAL(nid, nvarid, agesno(1,nsrf)) |
---|
| 1129 | #endif |
---|
| 1130 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1131 | PRINT*, "phyetat0: Lecture echouee pour <AGESNO"//str2//">" |
---|
| 1132 | CALL abort |
---|
| 1133 | ENDIF |
---|
| 1134 | xmin = 1.0E+20 |
---|
| 1135 | xmax = -1.0E+20 |
---|
[776] | 1136 | DO i = 1, klon_glo |
---|
[524] | 1137 | xmin = MIN(agesno(i,nsrf),xmin) |
---|
| 1138 | xmax = MAX(agesno(i,nsrf),xmax) |
---|
| 1139 | ENDDO |
---|
| 1140 | PRINT*,'Age de la neige AGESNO**:', nsrf, xmin, xmax |
---|
| 1141 | ENDDO |
---|
| 1142 | ELSE |
---|
| 1143 | PRINT*, 'phyetat0: Le champ <AGESNO> est present' |
---|
| 1144 | PRINT*, ' J ignore donc les autres AGESNO**' |
---|
| 1145 | #ifdef NC_DOUBLE |
---|
| 1146 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, agesno(1,1)) |
---|
| 1147 | #else |
---|
| 1148 | ierr = NF_GET_VAR_REAL(nid, nvarid, agesno(1,1)) |
---|
| 1149 | #endif |
---|
| 1150 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1151 | PRINT*, "phyetat0: Lecture echouee pour <AGESNO>" |
---|
| 1152 | CALL abort |
---|
| 1153 | ENDIF |
---|
| 1154 | xmin = 1.0E+20 |
---|
| 1155 | xmax = -1.0E+20 |
---|
[776] | 1156 | DO i = 1, klon_glo |
---|
[524] | 1157 | xmin = MIN(agesno(i,1),xmin) |
---|
| 1158 | xmax = MAX(agesno(i,1),xmax) |
---|
| 1159 | ENDDO |
---|
| 1160 | PRINT*,'Age de la neige <AGESNO>', xmin, xmax |
---|
| 1161 | DO nsrf = 2, nbsrf |
---|
[776] | 1162 | DO i = 1, klon_glo |
---|
[524] | 1163 | agesno(i,nsrf) = agesno(i,1) |
---|
| 1164 | ENDDO |
---|
| 1165 | ENDDO |
---|
| 1166 | ENDIF |
---|
| 1167 | |
---|
| 1168 | c |
---|
| 1169 | ierr = NF_INQ_VARID (nid, "ZMEA", nvarid) |
---|
| 1170 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1171 | PRINT*, 'phyetat0: Le champ <ZMEA> est absent' |
---|
| 1172 | CALL abort |
---|
| 1173 | ENDIF |
---|
| 1174 | #ifdef NC_DOUBLE |
---|
| 1175 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zmea) |
---|
| 1176 | #else |
---|
| 1177 | ierr = NF_GET_VAR_REAL(nid, nvarid, zmea) |
---|
| 1178 | #endif |
---|
| 1179 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1180 | PRINT*, 'phyetat0: Lecture echouee pour <ZMEA>' |
---|
| 1181 | CALL abort |
---|
| 1182 | ENDIF |
---|
| 1183 | xmin = 1.0E+20 |
---|
| 1184 | xmax = -1.0E+20 |
---|
[776] | 1185 | DO i = 1, klon_glo |
---|
[524] | 1186 | xmin = MIN(zmea(i),xmin) |
---|
| 1187 | xmax = MAX(zmea(i),xmax) |
---|
| 1188 | ENDDO |
---|
| 1189 | PRINT*,'OROGRAPHIE SOUS-MAILLE zmea:', xmin, xmax |
---|
| 1190 | c |
---|
| 1191 | c |
---|
| 1192 | ierr = NF_INQ_VARID (nid, "ZSTD", nvarid) |
---|
| 1193 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1194 | PRINT*, 'phyetat0: Le champ <ZSTD> est absent' |
---|
| 1195 | CALL abort |
---|
| 1196 | ENDIF |
---|
| 1197 | #ifdef NC_DOUBLE |
---|
| 1198 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zstd) |
---|
| 1199 | #else |
---|
| 1200 | ierr = NF_GET_VAR_REAL(nid, nvarid, zstd) |
---|
| 1201 | #endif |
---|
| 1202 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1203 | PRINT*, 'phyetat0: Lecture echouee pour <ZSTD>' |
---|
| 1204 | CALL abort |
---|
| 1205 | ENDIF |
---|
| 1206 | xmin = 1.0E+20 |
---|
| 1207 | xmax = -1.0E+20 |
---|
[776] | 1208 | DO i = 1, klon_glo |
---|
[524] | 1209 | xmin = MIN(zstd(i),xmin) |
---|
| 1210 | xmax = MAX(zstd(i),xmax) |
---|
| 1211 | ENDDO |
---|
| 1212 | PRINT*,'OROGRAPHIE SOUS-MAILLE zstd:', xmin, xmax |
---|
| 1213 | c |
---|
| 1214 | c |
---|
| 1215 | ierr = NF_INQ_VARID (nid, "ZSIG", nvarid) |
---|
| 1216 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1217 | PRINT*, 'phyetat0: Le champ <ZSIG> est absent' |
---|
| 1218 | CALL abort |
---|
| 1219 | ENDIF |
---|
| 1220 | #ifdef NC_DOUBLE |
---|
| 1221 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zsig) |
---|
| 1222 | #else |
---|
| 1223 | ierr = NF_GET_VAR_REAL(nid, nvarid, zsig) |
---|
| 1224 | #endif |
---|
| 1225 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1226 | PRINT*, 'phyetat0: Lecture echouee pour <ZSIG>' |
---|
| 1227 | CALL abort |
---|
| 1228 | ENDIF |
---|
| 1229 | xmin = 1.0E+20 |
---|
| 1230 | xmax = -1.0E+20 |
---|
[776] | 1231 | DO i = 1, klon_glo |
---|
[524] | 1232 | xmin = MIN(zsig(i),xmin) |
---|
| 1233 | xmax = MAX(zsig(i),xmax) |
---|
| 1234 | ENDDO |
---|
| 1235 | PRINT*,'OROGRAPHIE SOUS-MAILLE zsig:', xmin, xmax |
---|
| 1236 | c |
---|
| 1237 | c |
---|
| 1238 | ierr = NF_INQ_VARID (nid, "ZGAM", nvarid) |
---|
| 1239 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1240 | PRINT*, 'phyetat0: Le champ <ZGAM> est absent' |
---|
| 1241 | CALL abort |
---|
| 1242 | ENDIF |
---|
| 1243 | #ifdef NC_DOUBLE |
---|
| 1244 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zgam) |
---|
| 1245 | #else |
---|
| 1246 | ierr = NF_GET_VAR_REAL(nid, nvarid, zgam) |
---|
| 1247 | #endif |
---|
| 1248 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1249 | PRINT*, 'phyetat0: Lecture echouee pour <ZGAM>' |
---|
| 1250 | CALL abort |
---|
| 1251 | ENDIF |
---|
| 1252 | xmin = 1.0E+20 |
---|
| 1253 | xmax = -1.0E+20 |
---|
[776] | 1254 | DO i = 1, klon_glo |
---|
[524] | 1255 | xmin = MIN(zgam(i),xmin) |
---|
| 1256 | xmax = MAX(zgam(i),xmax) |
---|
| 1257 | ENDDO |
---|
| 1258 | PRINT*,'OROGRAPHIE SOUS-MAILLE zgam:', xmin, xmax |
---|
| 1259 | c |
---|
| 1260 | c |
---|
| 1261 | ierr = NF_INQ_VARID (nid, "ZTHE", nvarid) |
---|
| 1262 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1263 | PRINT*, 'phyetat0: Le champ <ZTHE> est absent' |
---|
| 1264 | CALL abort |
---|
| 1265 | ENDIF |
---|
| 1266 | #ifdef NC_DOUBLE |
---|
| 1267 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zthe) |
---|
| 1268 | #else |
---|
| 1269 | ierr = NF_GET_VAR_REAL(nid, nvarid, zthe) |
---|
| 1270 | #endif |
---|
| 1271 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1272 | PRINT*, 'phyetat0: Lecture echouee pour <ZTHE>' |
---|
| 1273 | CALL abort |
---|
| 1274 | ENDIF |
---|
| 1275 | xmin = 1.0E+20 |
---|
| 1276 | xmax = -1.0E+20 |
---|
[776] | 1277 | DO i = 1, klon_glo |
---|
[524] | 1278 | xmin = MIN(zthe(i),xmin) |
---|
| 1279 | xmax = MAX(zthe(i),xmax) |
---|
| 1280 | ENDDO |
---|
| 1281 | PRINT*,'OROGRAPHIE SOUS-MAILLE zthe:', xmin, xmax |
---|
| 1282 | c |
---|
| 1283 | c |
---|
| 1284 | ierr = NF_INQ_VARID (nid, "ZPIC", nvarid) |
---|
| 1285 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1286 | PRINT*, 'phyetat0: Le champ <ZPIC> est absent' |
---|
| 1287 | CALL abort |
---|
| 1288 | ENDIF |
---|
| 1289 | #ifdef NC_DOUBLE |
---|
| 1290 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zpic) |
---|
| 1291 | #else |
---|
| 1292 | ierr = NF_GET_VAR_REAL(nid, nvarid, zpic) |
---|
| 1293 | #endif |
---|
| 1294 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1295 | PRINT*, 'phyetat0: Lecture echouee pour <ZPIC>' |
---|
| 1296 | CALL abort |
---|
| 1297 | ENDIF |
---|
| 1298 | xmin = 1.0E+20 |
---|
| 1299 | xmax = -1.0E+20 |
---|
[776] | 1300 | DO i = 1, klon_glo |
---|
[524] | 1301 | xmin = MIN(zpic(i),xmin) |
---|
| 1302 | xmax = MAX(zpic(i),xmax) |
---|
| 1303 | ENDDO |
---|
| 1304 | PRINT*,'OROGRAPHIE SOUS-MAILLE zpic:', xmin, xmax |
---|
| 1305 | c |
---|
| 1306 | ierr = NF_INQ_VARID (nid, "ZVAL", nvarid) |
---|
| 1307 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1308 | PRINT*, 'phyetat0: Le champ <ZVAL> est absent' |
---|
| 1309 | CALL abort |
---|
| 1310 | ENDIF |
---|
| 1311 | #ifdef NC_DOUBLE |
---|
| 1312 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zval) |
---|
| 1313 | #else |
---|
| 1314 | ierr = NF_GET_VAR_REAL(nid, nvarid, zval) |
---|
| 1315 | #endif |
---|
| 1316 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1317 | PRINT*, 'phyetat0: Lecture echouee pour <ZVAL>' |
---|
| 1318 | CALL abort |
---|
| 1319 | ENDIF |
---|
| 1320 | xmin = 1.0E+20 |
---|
| 1321 | xmax = -1.0E+20 |
---|
[776] | 1322 | DO i = 1, klon_glo |
---|
[524] | 1323 | xmin = MIN(zval(i),xmin) |
---|
| 1324 | xmax = MAX(zval(i),xmax) |
---|
| 1325 | ENDDO |
---|
| 1326 | PRINT*,'OROGRAPHIE SOUS-MAILLE zval:', xmin, xmax |
---|
| 1327 | c |
---|
| 1328 | c |
---|
| 1329 | ierr = NF_INQ_VARID (nid, "RUGSREL", nvarid) |
---|
| 1330 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1331 | PRINT*, 'phyetat0: Le champ <RUGSREL> est absent' |
---|
| 1332 | CALL abort |
---|
| 1333 | ENDIF |
---|
| 1334 | #ifdef NC_DOUBLE |
---|
| 1335 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rugsrel) |
---|
| 1336 | #else |
---|
| 1337 | ierr = NF_GET_VAR_REAL(nid, nvarid, rugsrel) |
---|
| 1338 | #endif |
---|
| 1339 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1340 | PRINT*, 'phyetat0: Lecture echouee pour <RUGSREL>' |
---|
| 1341 | CALL abort |
---|
| 1342 | ENDIF |
---|
| 1343 | xmin = 1.0E+20 |
---|
| 1344 | xmax = -1.0E+20 |
---|
[776] | 1345 | DO i = 1, klon_glo |
---|
[524] | 1346 | xmin = MIN(rugsrel(i),xmin) |
---|
| 1347 | xmax = MAX(rugsrel(i),xmax) |
---|
| 1348 | ENDDO |
---|
| 1349 | PRINT*,'Rugosite relief (ecart-type) rugsrel:', xmin, xmax |
---|
| 1350 | c |
---|
| 1351 | c |
---|
| 1352 | ancien_ok = .TRUE. |
---|
| 1353 | c |
---|
| 1354 | ierr = NF_INQ_VARID (nid, "TANCIEN", nvarid) |
---|
| 1355 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1356 | PRINT*, "phyetat0: Le champ <TANCIEN> est absent" |
---|
| 1357 | PRINT*, "Depart legerement fausse. Mais je continue" |
---|
| 1358 | ancien_ok = .FALSE. |
---|
| 1359 | ELSE |
---|
| 1360 | #ifdef NC_DOUBLE |
---|
| 1361 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, t_ancien) |
---|
| 1362 | #else |
---|
| 1363 | ierr = NF_GET_VAR_REAL(nid, nvarid, t_ancien) |
---|
| 1364 | #endif |
---|
| 1365 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1366 | PRINT*, "phyetat0: Lecture echouee pour <TANCIEN>" |
---|
| 1367 | CALL abort |
---|
| 1368 | ENDIF |
---|
| 1369 | ENDIF |
---|
| 1370 | c |
---|
| 1371 | ierr = NF_INQ_VARID (nid, "QANCIEN", nvarid) |
---|
| 1372 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1373 | PRINT*, "phyetat0: Le champ <QANCIEN> est absent" |
---|
| 1374 | PRINT*, "Depart legerement fausse. Mais je continue" |
---|
| 1375 | ancien_ok = .FALSE. |
---|
| 1376 | ELSE |
---|
| 1377 | #ifdef NC_DOUBLE |
---|
| 1378 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, q_ancien) |
---|
| 1379 | #else |
---|
| 1380 | ierr = NF_GET_VAR_REAL(nid, nvarid, q_ancien) |
---|
| 1381 | #endif |
---|
| 1382 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1383 | PRINT*, "phyetat0: Lecture echouee pour <QANCIEN>" |
---|
| 1384 | CALL abort |
---|
| 1385 | ENDIF |
---|
| 1386 | ENDIF |
---|
| 1387 | c |
---|
[766] | 1388 | clwcon=0. |
---|
[524] | 1389 | ierr = NF_INQ_VARID (nid, "CLWCON", nvarid) |
---|
| 1390 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1391 | PRINT*, "phyetat0: Le champ CLWCON est absent" |
---|
| 1392 | PRINT*, "Depart legerement fausse. Mais je continue" |
---|
| 1393 | clwcon = 0. |
---|
| 1394 | ELSE |
---|
| 1395 | #ifdef NC_DOUBLE |
---|
| 1396 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, clwcon) |
---|
| 1397 | #else |
---|
| 1398 | ierr = NF_GET_VAR_REAL(nid, nvarid, clwcon) |
---|
| 1399 | #endif |
---|
| 1400 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1401 | PRINT*, "phyetat0: Lecture echouee pour <CLWCON>" |
---|
| 1402 | CALL abort |
---|
| 1403 | ENDIF |
---|
| 1404 | ENDIF |
---|
| 1405 | xmin = 1.0E+20 |
---|
| 1406 | xmax = -1.0E+20 |
---|
| 1407 | xmin = MINval(clwcon) |
---|
| 1408 | xmax = MAXval(clwcon) |
---|
| 1409 | PRINT*,'Eau liquide convective (ecart-type) clwcon:', xmin, xmax |
---|
| 1410 | c |
---|
[766] | 1411 | rnebcon=0. |
---|
[524] | 1412 | ierr = NF_INQ_VARID (nid, "RNEBCON", nvarid) |
---|
| 1413 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1414 | PRINT*, "phyetat0: Le champ RNEBCON est absent" |
---|
| 1415 | PRINT*, "Depart legerement fausse. Mais je continue" |
---|
| 1416 | rnebcon = 0. |
---|
| 1417 | ELSE |
---|
| 1418 | #ifdef NC_DOUBLE |
---|
| 1419 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rnebcon) |
---|
| 1420 | #else |
---|
| 1421 | ierr = NF_GET_VAR_REAL(nid, nvarid, rnebcon) |
---|
| 1422 | #endif |
---|
| 1423 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1424 | PRINT*, "phyetat0: Lecture echouee pour <RNEBCON>" |
---|
| 1425 | CALL abort |
---|
| 1426 | ENDIF |
---|
| 1427 | ENDIF |
---|
| 1428 | xmin = 1.0E+20 |
---|
| 1429 | xmax = -1.0E+20 |
---|
| 1430 | xmin = MINval(rnebcon) |
---|
| 1431 | xmax = MAXval(rnebcon) |
---|
| 1432 | PRINT*,'Nebulosite convective (ecart-type) rnebcon:', xmin, xmax |
---|
| 1433 | |
---|
| 1434 | c |
---|
| 1435 | c Lecture ratqs |
---|
| 1436 | c |
---|
[766] | 1437 | ratqs=0. |
---|
[524] | 1438 | ierr = NF_INQ_VARID (nid, "RATQS", nvarid) |
---|
| 1439 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1440 | PRINT*, "phyetat0: Le champ <RATQS> est absent" |
---|
| 1441 | PRINT*, "Depart legerement fausse. Mais je continue" |
---|
| 1442 | ratqs = 0. |
---|
| 1443 | ELSE |
---|
| 1444 | #ifdef NC_DOUBLE |
---|
| 1445 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, ratqs) |
---|
| 1446 | #else |
---|
| 1447 | ierr = NF_GET_VAR_REAL(nid, nvarid, ratqs) |
---|
| 1448 | #endif |
---|
| 1449 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1450 | PRINT*, "phyetat0: Lecture echouee pour <RATQS>" |
---|
| 1451 | CALL abort |
---|
| 1452 | ENDIF |
---|
| 1453 | ENDIF |
---|
| 1454 | xmin = 1.0E+20 |
---|
| 1455 | xmax = -1.0E+20 |
---|
| 1456 | xmin = MINval(ratqs) |
---|
| 1457 | xmax = MAXval(ratqs) |
---|
| 1458 | PRINT*,'(ecart-type) ratqs:', xmin, xmax |
---|
| 1459 | c |
---|
| 1460 | c Lecture run_off_lic_0 |
---|
| 1461 | c |
---|
| 1462 | ierr = NF_INQ_VARID (nid, "RUNOFFLIC0", nvarid) |
---|
| 1463 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1464 | PRINT*, "phyetat0: Le champ <RUNOFFLIC0> est absent" |
---|
| 1465 | PRINT*, "Depart legerement fausse. Mais je continue" |
---|
| 1466 | run_off_lic_0 = 0. |
---|
| 1467 | ELSE |
---|
| 1468 | #ifdef NC_DOUBLE |
---|
| 1469 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, run_off_lic_0) |
---|
| 1470 | #else |
---|
| 1471 | ierr = NF_GET_VAR_REAL(nid, nvarid, run_off_lic_0) |
---|
| 1472 | #endif |
---|
| 1473 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1474 | PRINT*, "phyetat0: Lecture echouee pour <RUNOFFLIC0>" |
---|
| 1475 | CALL abort |
---|
| 1476 | ENDIF |
---|
| 1477 | ENDIF |
---|
| 1478 | xmin = 1.0E+20 |
---|
| 1479 | xmax = -1.0E+20 |
---|
| 1480 | xmin = MINval(run_off_lic_0) |
---|
| 1481 | xmax = MAXval(run_off_lic_0) |
---|
| 1482 | PRINT*,'(ecart-type) run_off_lic_0:', xmin, xmax |
---|
[878] | 1483 | |
---|
| 1484 | |
---|
| 1485 | c Lecture de l'energie cinetique turbulente |
---|
[524] | 1486 | c |
---|
[878] | 1487 | |
---|
| 1488 | IF (iflag_pbl>1) then |
---|
| 1489 | PRINT*, 'phyetat0: Le champ <TKE> est absent' |
---|
| 1490 | PRINT*, ' Mais je vais essayer de lire TKE**' |
---|
| 1491 | DO nsrf = 1, nbsrf |
---|
| 1492 | IF (nsrf.GT.99) THEN |
---|
| 1493 | PRINT*, "Trop de sous-mailles" |
---|
| 1494 | CALL abort |
---|
| 1495 | ENDIF |
---|
| 1496 | WRITE(str2,'(i2.2)') nsrf |
---|
| 1497 | ierr = NF_INQ_VARID (nid, "TKE"//str2, nvarid) |
---|
| 1498 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1499 | PRINT*, "WARNING phyetat0: <TKE"//str2//"> est absent" |
---|
| 1500 | pbl_tke(:,:,nsrf)=1.e-8 |
---|
| 1501 | ELSE |
---|
| 1502 | #ifdef NC_DOUBLE |
---|
| 1503 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, pbl_tke(1,1,nsrf)) |
---|
| 1504 | #else |
---|
| 1505 | ierr = NF_GET_VAR_REAL(nid, nvarid, pbl_tke(1,1,nsrf)) |
---|
| 1506 | #endif |
---|
| 1507 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1508 | PRINT*, "WARNING phyetat0: echec lect <TKE"//str2//">" |
---|
| 1509 | CALL abort |
---|
| 1510 | ENDIF |
---|
| 1511 | ENDIF |
---|
| 1512 | |
---|
| 1513 | xmin = 1.0E+20 |
---|
| 1514 | xmax = -1.0E+20 |
---|
| 1515 | DO k = 1, klev |
---|
| 1516 | DO i = 1, klon_glo |
---|
| 1517 | xmin = MIN(pbl_tke(i,k,nsrf),xmin) |
---|
| 1518 | xmax = MAX(pbl_tke(i,k,nsrf),xmax) |
---|
| 1519 | ENDDO |
---|
| 1520 | ENDDO |
---|
| 1521 | PRINT*,'Temperature du sol TKE**:', nsrf, xmin, xmax |
---|
| 1522 | ENDDO |
---|
| 1523 | ENDIF |
---|
| 1524 | c |
---|
[927] | 1525 | c zmax0 |
---|
| 1526 | ierr = NF_INQ_VARID (nid, "ZMAX0", nvarid) |
---|
| 1527 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1528 | PRINT*, "phyetat0: Le champ <ZMAX0> est absent" |
---|
| 1529 | PRINT*, "Depart legerement fausse. Mais je continue" |
---|
| 1530 | zmax0=40. |
---|
| 1531 | ELSE |
---|
| 1532 | #ifdef NC_DOUBLE |
---|
| 1533 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zmax0) |
---|
| 1534 | #else |
---|
| 1535 | ierr = NF_GET_VAR_REAL(nid, nvarid, zmax0) |
---|
| 1536 | #endif |
---|
| 1537 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1538 | PRINT*, "phyetat0: Lecture echouee pour <ZMAX0>" |
---|
| 1539 | CALL abort |
---|
| 1540 | ENDIF |
---|
| 1541 | ENDIF |
---|
| 1542 | xmin = 1.0E+20 |
---|
| 1543 | xmax = -1.0E+20 |
---|
| 1544 | xmin = MINval(zmax0) |
---|
| 1545 | xmax = MAXval(zmax0) |
---|
| 1546 | PRINT*,'(ecart-type) zmax0:', xmin, xmax |
---|
| 1547 | c |
---|
| 1548 | c f0(ig)=1.e-5 |
---|
| 1549 | c f0 |
---|
| 1550 | ierr = NF_INQ_VARID (nid, "f0", nvarid) |
---|
| 1551 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1552 | PRINT*, "phyetat0: Le champ <f0> est absent" |
---|
| 1553 | PRINT*, "Depart legerement fausse. Mais je continue" |
---|
| 1554 | f0=1.e-5 |
---|
| 1555 | ELSE |
---|
| 1556 | #ifdef NC_DOUBLE |
---|
| 1557 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, f0) |
---|
| 1558 | #else |
---|
| 1559 | ierr = NF_GET_VAR_REAL(nid, nvarid, f0) |
---|
| 1560 | #endif |
---|
| 1561 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1562 | PRINT*, "phyetat0: Lecture echouee pour <f0>" |
---|
| 1563 | CALL abort |
---|
| 1564 | ENDIF |
---|
| 1565 | ENDIF |
---|
| 1566 | xmin = 1.0E+20 |
---|
| 1567 | xmax = -1.0E+20 |
---|
| 1568 | xmin = MINval(f0) |
---|
| 1569 | xmax = MAXval(f0) |
---|
| 1570 | PRINT*,'(ecart-type) f0:', xmin, xmax |
---|
| 1571 | c |
---|
[937] | 1572 | c ema_work1 |
---|
| 1573 | c |
---|
| 1574 | ierr = NF_INQ_VARID (nid, "EMA_WORK1", nvarid) |
---|
| 1575 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1576 | PRINT*, "phyetat0: Le champ <EMA_WORK1> est absent" |
---|
| 1577 | PRINT*, "Depart legerement fausse. Mais je continue" |
---|
| 1578 | ema_work1=0. |
---|
| 1579 | ELSE |
---|
| 1580 | #ifdef NC_DOUBLE |
---|
| 1581 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, ema_work1) |
---|
| 1582 | #else |
---|
| 1583 | ierr = NF_GET_VAR_REAL(nid, nvarid, ema_work1) |
---|
| 1584 | #endif |
---|
| 1585 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1586 | PRINT*, "phyetat0: Lecture echouee pour <EMA_WORK1>" |
---|
| 1587 | CALL abort |
---|
| 1588 | ENDIF |
---|
| 1589 | xmin = 1.0E+20 |
---|
| 1590 | xmax = -1.0E+20 |
---|
| 1591 | DO k = 1, klev |
---|
| 1592 | DO i = 1, klon |
---|
| 1593 | xmin = MIN(ema_work1(i,k),xmin) |
---|
| 1594 | xmax = MAX(ema_work1(i,k),xmax) |
---|
| 1595 | ENDDO |
---|
| 1596 | ENDDO |
---|
| 1597 | PRINT*,'ema_work1:', xmin, xmax |
---|
| 1598 | ENDIF |
---|
| 1599 | c |
---|
| 1600 | c ema_work2 |
---|
| 1601 | c |
---|
| 1602 | ierr = NF_INQ_VARID (nid, "EMA_WORK2", nvarid) |
---|
| 1603 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1604 | PRINT*, "phyetat0: Le champ <EMA_WORK2> est absent" |
---|
| 1605 | PRINT*, "Depart legerement fausse. Mais je continue" |
---|
| 1606 | ema_work2=0. |
---|
| 1607 | ELSE |
---|
| 1608 | #ifdef NC_DOUBLE |
---|
| 1609 | ierr = NF_GET_VAR_DOUBLE(nid, nvarid, ema_work2) |
---|
| 1610 | #else |
---|
| 1611 | ierr = NF_GET_VAR_REAL(nid, nvarid, ema_work2) |
---|
| 1612 | #endif |
---|
| 1613 | IF (ierr.NE.NF_NOERR) THEN |
---|
| 1614 | PRINT*, "phyetat0: Lecture echouee pour <EMA_WORK2>" |
---|
| 1615 | CALL abort |
---|
| 1616 | ENDIF |
---|
| 1617 | xmin = 1.0E+20 |
---|
| 1618 | xmax = -1.0E+20 |
---|
| 1619 | DO k = 1, klev |
---|
| 1620 | DO i = 1, klon |
---|
| 1621 | xmin = MIN(ema_work2(i,k),xmin) |
---|
| 1622 | xmax = MAX(ema_work2(i,k),xmax) |
---|
| 1623 | ENDDO |
---|
| 1624 | ENDDO |
---|
| 1625 | PRINT*,'ema_work2:', xmin, xmax |
---|
| 1626 | ENDIF |
---|
| 1627 | c |
---|
[524] | 1628 | c Fermer le fichier: |
---|
| 1629 | c |
---|
| 1630 | ierr = NF_CLOSE(nid) |
---|
[776] | 1631 | ENDIF ! is_mpi_root |
---|
[524] | 1632 | c |
---|
[766] | 1633 | c$OMP END MASTER |
---|
| 1634 | |
---|
| 1635 | c$OMP MASTER |
---|
| 1636 | cym en attendant mieux |
---|
| 1637 | iolat(1)=rlat(1) |
---|
[879] | 1638 | |
---|
| 1639 | !FH1D |
---|
| 1640 | !iolat(jjm+1)=rlat(klon_glo) |
---|
| 1641 | iolat(jjm+1-1/iim)=rlat(klon_glo) |
---|
| 1642 | if (iim.gt.1) then |
---|
[766] | 1643 | do i=2,jjm |
---|
| 1644 | iolat(i)=rlat(2+(i-2)*iim) |
---|
| 1645 | enddo |
---|
[879] | 1646 | endif |
---|
| 1647 | |
---|
[776] | 1648 | CALL bcast_mpi(iolat) |
---|
| 1649 | CALL bcast_mpi(rlon) |
---|
[879] | 1650 | |
---|
| 1651 | !FH1D |
---|
| 1652 | ! call init_iophy(iolat,rlon(2:iim+1)) |
---|
| 1653 | call init_iophy(iolat,rlon(2-1/iim:iim+1-1/iim)) |
---|
[766] | 1654 | |
---|
[776] | 1655 | c$OMP END MASTER |
---|
[766] | 1656 | |
---|
[776] | 1657 | call Scatter( rlat,rlat_p) |
---|
| 1658 | call Scatter( rlon,rlon_p) |
---|
| 1659 | call Scatter( tsol,tsol_p) |
---|
[878] | 1660 | IF (iflag_pbl>1) then |
---|
| 1661 | call Scatter( pbl_tke,pbl_tke_p) |
---|
| 1662 | endif |
---|
[927] | 1663 | call Scatter( zmax0,zmax0_p) |
---|
| 1664 | call Scatter( f0,f0_p) |
---|
[937] | 1665 | call Scatter( ema_work1, ema_work1_p) |
---|
| 1666 | call Scatter( ema_work2, ema_work2_p) |
---|
[776] | 1667 | call Scatter( tsoil,tsoil_p) |
---|
| 1668 | call Scatter( tslab,tslab_p) |
---|
| 1669 | call Scatter( seaice,seaice_p) |
---|
| 1670 | call Scatter( qsurf,qsurf_p) |
---|
| 1671 | call Scatter( qsol,qsol_p) |
---|
| 1672 | call Scatter( snow,snow_p) |
---|
[888] | 1673 | call Scatter( alb1,alb1_p) |
---|
| 1674 | call Scatter( alb2,alb2_p) |
---|
[776] | 1675 | call Scatter( evap,evap_p) |
---|
| 1676 | call Scatter( radsol,radsol_p) |
---|
| 1677 | call Scatter( rain_fall,rain_fall_p) |
---|
| 1678 | call Scatter( snow_fall,snow_fall_p) |
---|
| 1679 | call Scatter( sollw,sollw_p) |
---|
| 1680 | call Scatter( solsw,solsw_p) |
---|
| 1681 | call Scatter( fder,fder_p) |
---|
| 1682 | call Scatter( frugs,frugs_p) |
---|
| 1683 | call Scatter( agesno,agesno_p) |
---|
| 1684 | call Scatter( zmea,zmea_p) |
---|
| 1685 | call Scatter( zstd,zstd_p) |
---|
| 1686 | call Scatter( zsig,zsig_p) |
---|
| 1687 | call Scatter( zgam,zgam_p) |
---|
| 1688 | call Scatter( zthe,zthe_p) |
---|
| 1689 | call Scatter( zpic,zpic_p) |
---|
| 1690 | call Scatter( zval,zval_p) |
---|
| 1691 | call Scatter( rugsrel,rugsrel_p) |
---|
| 1692 | call Scatter( pctsrf,pctsrf_p) |
---|
| 1693 | call Scatter( run_off_lic_0,run_off_lic_0_p) |
---|
| 1694 | call Scatter( t_ancien,t_ancien_p) |
---|
| 1695 | call Scatter( q_ancien,q_ancien_p) |
---|
| 1696 | call Scatter( rnebcon,rnebcon_p) |
---|
| 1697 | call Scatter( clwcon,clwcon_p) |
---|
| 1698 | call Scatter( ratqs,ratqs_p) |
---|
| 1699 | call Scatter( zmasq_glo,zmasq) |
---|
[766] | 1700 | |
---|
[782] | 1701 | c |
---|
| 1702 | c Initilalize variables in module surface_data |
---|
| 1703 | c |
---|
| 1704 | ok_veget = ok_veget_in |
---|
| 1705 | ocean = ocean_in |
---|
| 1706 | c |
---|
| 1707 | c Initialize module pbl_surface_mod |
---|
| 1708 | c |
---|
| 1709 | CALL pbl_surface_init(qsol_p, fder_p, snow_p, qsurf_p, |
---|
| 1710 | $ evap_p, frugs_p, agesno_p, tsoil_p) |
---|
| 1711 | |
---|
| 1712 | c Initialize ocean module according to ocean type |
---|
| 1713 | IF ( ocean == 'slab' ) THEN |
---|
| 1714 | c initilalize module ocean_slab_init |
---|
| 1715 | CALL ocean_slab_init(dtime, tslab_p, seaice_p, pctsrf_p) |
---|
| 1716 | ELSEIF ( ocean == 'couple' ) THEN |
---|
| 1717 | c initilalize module ocean_cpl_init |
---|
| 1718 | CALL ocean_cpl_init(dtime, rlon_p, rlat_p) |
---|
| 1719 | ELSE |
---|
| 1720 | c initilalize module ocean_forced_init |
---|
| 1721 | CALL ocean_forced_init |
---|
| 1722 | ENDIF |
---|
| 1723 | c |
---|
| 1724 | c Initilialize module fonte_neige_mod |
---|
| 1725 | c |
---|
| 1726 | CALL fonte_neige_init(run_off_lic_0_p) |
---|
| 1727 | |
---|
| 1728 | |
---|
[524] | 1729 | RETURN |
---|
| 1730 | END |
---|