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