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