Changeset 2252
- Timestamp:
- Mar 27, 2015, 5:35:52 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/phyetat0.F90
r2251 r2252 202 202 END DO 203 203 204 ! Lecture des temperatures du sol: 205 206 CALL get_field("TS", ftsol(:, 1), found) 207 IF (.NOT. found) THEN 208 PRINT*, 'phyetat0: Le champ <TS> est absent' 209 PRINT*, ' Mais je vais essayer de lire TS**' 210 DO nsrf = 1, nbsrf 211 IF (nsrf.GT.99) THEN 212 PRINT*, "Trop de sous-mailles" 204 !=================================================================== 205 ! Lecture des temperatures du sol: 206 !=================================================================== 207 208 found=phyetat0_get(1,ftsol(:,1),"TS","Surface temperature",283.) 209 IF (found) THEN 210 DO nsrf=2,nbsrf 211 ftsol(:,nsrf)=ftsol(:,1) 212 ENDDO 213 ELSE 214 found=phyetat0_srf(1,ftsol,"TS","Surface temperature",283.) 215 ENDIF 216 217 !=================================================================== 218 ! Lecture des albedo difus et direct 219 !=================================================================== 220 221 DO nsrf = 1, nbsrf 222 DO isw=1, nsw 223 IF (isw.GT.99) THEN 224 PRINT*, "Trop de bandes SW" 213 225 call abort_gcm("phyetat0", "", 1) 214 226 ENDIF 215 WRITE(str2, '(i2.2)') nsrf 216 CALL get_field("TS"//str2, ftsol(:, nsrf)) 217 218 xmin = 1.0E+20 219 xmax = -1.0E+20 220 DO i = 1, klon 221 xmin = MIN(ftsol(i, nsrf), xmin) 222 xmax = MAX(ftsol(i, nsrf), xmax) 223 ENDDO 224 PRINT*, 'Temperature du sol TS**:', nsrf, xmin, xmax 227 WRITE(str2, '(i2.2)') isw 228 found=phyetat0_srf(1,falb_dir(:, isw,:),"A_dir_SW"//str2//"srf","Direct Albedo",0.2) 229 found=phyetat0_srf(1,falb_dif(:, isw,:),"A_dif_SW"//str2//"srf","Direct Albedo",0.2) 225 230 ENDDO 226 ELSE 227 PRINT*, 'phyetat0: Le champ <TS> est present' 228 PRINT*, ' J ignore donc les autres temperatures TS**' 229 xmin = 1.0E+20 230 xmax = -1.0E+20 231 DO i = 1, klon 232 xmin = MIN(ftsol(i, 1), xmin) 233 xmax = MAX(ftsol(i, 1), xmax) 234 ENDDO 235 PRINT*, 'Temperature du sol <TS>', xmin, xmax 236 DO nsrf = 2, nbsrf 237 DO i = 1, klon 238 ftsol(i, nsrf) = ftsol(i, 1) 239 ENDDO 240 ENDDO 241 ENDIF 242 243 !=================================================================== 244 ! Lecture des albedo difus et direct 245 246 DO nsrf = 1, nbsrf 247 DO isw=1, nsw 248 IF (isw.GT.99 .AND. nsrf.GT.99) THEN 249 PRINT*, "Trop de bandes SW ou sous-mailles" 231 ENDDO 232 233 !=================================================================== 234 ! Lecture des temperatures du sol profond: 235 !=================================================================== 236 237 DO isoil=1, nsoilmx 238 IF (isoil.GT.99) THEN 239 PRINT*, "Trop de couches " 250 240 call abort_gcm("phyetat0", "", 1) 251 241 ENDIF 252 WRITE(str7, '(i2.2, "srf", i2.2)') isw, nsrf 253 254 CALL get_field('A_dir_SW'//str7, falb_dir(:, isw, nsrf), found) 255 IF (.NOT. found) THEN 256 PRINT*, "phyetat0: Le champ <A_dir_SW"//str7//"> est absent" 257 PRINT*, " Il prend donc la valeur de surface" 258 DO i=1, klon 259 falb_dir(i, isw, nsrf)=0.2 260 ENDDO 261 ENDIF 262 CALL get_field('A_dif_SW'//str7, falb_dif(:, isw, nsrf), found) 263 IF (.NOT. found) THEN 264 PRINT*, "phyetat0: Le champ <A_dif_SW"//str7//"> est absent" 265 PRINT*, " Il prend donc la valeur de surface" 266 DO i=1, klon 267 falb_dif(i, isw, nsrf)=0.2 268 ENDDO 269 ENDIF 270 ENDDO 271 ENDDO 272 273 !=================================================================== 274 ! Lecture des temperatures du sol profond: 275 276 DO nsrf = 1, nbsrf 277 DO isoil=1, nsoilmx 278 IF (isoil.GT.99 .AND. nsrf.GT.99) THEN 279 PRINT*, "Trop de couches ou sous-mailles" 280 call abort_gcm("phyetat0", "", 1) 281 ENDIF 282 WRITE(str7, '(i2.2, "srf", i2.2)') isoil, nsrf 283 284 CALL get_field('Tsoil'//str7, tsoil(:, isoil, nsrf), found) 242 WRITE(str2,'(i2.2)') isoil 243 found=phyetat0_srf(1,tsoil(:, isoil,:),"Tsoil"//str2//"srf","Temp soil",0.) 285 244 IF (.NOT. found) THEN 286 245 PRINT*, "phyetat0: Le champ <Tsoil"//str7//"> est absent" 287 246 PRINT*, " Il prend donc la valeur de surface" 288 DO i=1, klon 289 tsoil(i, isoil, nsrf)=ftsol(i, nsrf) 290 ENDDO 247 tsoil(:, isoil, :)=ftsol(:, :) 291 248 ENDIF 292 ENDDO 293 ENDDO 294 295 !=================================================================== 296 ! Lecture de l'humidite de l'air juste au dessus du sol: 297 298 CALL get_field("QS", qsurf(:, 1), found) 249 ENDDO 250 251 !======================================================================= 252 ! Lecture precipitation/evaporation 253 !======================================================================= 254 255 found=phyetat0_srf(1,qsurf,"QS","Near surface hmidity",0.) 256 found=phyetat0_get(1,qsol,"QSOL","Surface hmidity / bucket",0.) 257 found=phyetat0_srf(1,snow,"SNOW","Surface snow",0.) 258 found=phyetat0_srf(1,fevap,"EVAP","evaporation",0.) 259 found=phyetat0_get(1,snow_fall,"snow_f","snow fall",0.) 260 found=phyetat0_get(1,rain_fall,"rain_f","rain fall",0.) 261 262 !======================================================================= 263 ! Radiation 264 !======================================================================= 265 266 found=phyetat0_get(1,solsw,"solsw","net SW radiation surf",0.) 267 found=phyetat0_get(1,sollw,"sollw","net LW radiation surf",0.) 268 found=phyetat0_get(1,sollwdown,"sollwdown","down LW radiation surf",0.) 299 269 IF (.NOT. found) THEN 300 PRINT*, 'phyetat0: Le champ <QS> est absent' 301 PRINT*, ' Mais je vais essayer de lire QS**' 302 DO nsrf = 1, nbsrf 303 IF (nsrf.GT.99) THEN 304 PRINT*, "Trop de sous-mailles" 305 call abort_gcm("phyetat0", "", 1) 306 ENDIF 307 WRITE(str2, '(i2.2)') nsrf 308 CALL get_field("QS"//str2, qsurf(:, nsrf)) 309 xmin = 1.0E+20 310 xmax = -1.0E+20 311 DO i = 1, klon 312 xmin = MIN(qsurf(i, nsrf), xmin) 313 xmax = MAX(qsurf(i, nsrf), xmax) 314 ENDDO 315 PRINT*, 'Humidite pres du sol QS**:', nsrf, xmin, xmax 316 ENDDO 317 ELSE 318 PRINT*, 'phyetat0: Le champ <QS> est present' 319 PRINT*, ' J ignore donc les autres humidites QS**' 320 xmin = 1.0E+20 321 xmax = -1.0E+20 322 DO i = 1, klon 323 xmin = MIN(qsurf(i, 1), xmin) 324 xmax = MAX(qsurf(i, 1), xmax) 325 ENDDO 326 PRINT*, 'Humidite pres du sol <QS>', xmin, xmax 327 DO nsrf = 2, nbsrf 328 DO i = 1, klon 329 qsurf(i, nsrf) = qsurf(i, 1) 330 ENDDO 331 ENDDO 332 ENDIF 333 334 ! Eau dans le sol (pour le modele de sol "bucket") 335 336 CALL get_field("QSOL", qsol, found) 337 IF (.NOT. found) THEN 338 PRINT*, 'phyetat0: Le champ <QSOL> est absent' 339 PRINT*, ' Valeur par defaut nulle' 340 qsol(:)=0. 341 ENDIF 342 343 xmin = 1.0E+20 344 xmax = -1.0E+20 345 DO i = 1, klon 346 xmin = MIN(qsol(i), xmin) 347 xmax = MAX(qsol(i), xmax) 348 ENDDO 349 PRINT*, 'Eau dans le sol (mm) <QSOL>', xmin, xmax 350 351 ! Lecture de neige au sol: 352 353 CALL get_field("SNOW", snow(:, 1), found) 354 IF (.NOT. found) THEN 355 PRINT*, 'phyetat0: Le champ <SNOW> est absent' 356 PRINT*, ' Mais je vais essayer de lire SNOW**' 357 DO nsrf = 1, nbsrf 358 IF (nsrf.GT.99) THEN 359 PRINT*, "Trop de sous-mailles" 360 call abort_gcm("phyetat0", "", 1) 361 ENDIF 362 WRITE(str2, '(i2.2)') nsrf 363 CALL get_field( "SNOW"//str2, snow(:, nsrf)) 364 xmin = 1.0E+20 365 xmax = -1.0E+20 366 DO i = 1, klon 367 xmin = MIN(snow(i, nsrf), xmin) 368 xmax = MAX(snow(i, nsrf), xmax) 369 ENDDO 370 PRINT*, 'Neige du sol SNOW**:', nsrf, xmin, xmax 371 ENDDO 372 ELSE 373 PRINT*, 'phyetat0: Le champ <SNOW> est present' 374 PRINT*, ' J ignore donc les autres neiges SNOW**' 375 xmin = 1.0E+20 376 xmax = -1.0E+20 377 DO i = 1, klon 378 xmin = MIN(snow(i, 1), xmin) 379 xmax = MAX(snow(i, 1), xmax) 380 ENDDO 381 PRINT*, 'Neige du sol <SNOW>', xmin, xmax 382 DO nsrf = 2, nbsrf 383 DO i = 1, klon 384 snow(i, nsrf) = snow(i, 1) 385 ENDDO 386 ENDDO 387 ENDIF 388 389 ! Lecture de evaporation: 390 391 CALL get_field("EVAP", fevap(:, 1), found) 392 IF (.NOT. found) THEN 393 PRINT*, 'phyetat0: Le champ <EVAP> est absent' 394 PRINT*, ' Mais je vais essayer de lire EVAP**' 395 DO nsrf = 1, nbsrf 396 IF (nsrf.GT.99) THEN 397 PRINT*, "Trop de sous-mailles" 398 call abort_gcm("phyetat0", "", 1) 399 ENDIF 400 WRITE(str2, '(i2.2)') nsrf 401 CALL get_field("EVAP"//str2, fevap(:, nsrf)) 402 xmin = 1.0E+20 403 xmax = -1.0E+20 404 DO i = 1, klon 405 xmin = MIN(fevap(i, nsrf), xmin) 406 xmax = MAX(fevap(i, nsrf), xmax) 407 ENDDO 408 PRINT*, 'fevap du sol EVAP**:', nsrf, xmin, xmax 409 ENDDO 410 ELSE 411 PRINT*, 'phyetat0: Le champ <EVAP> est present' 412 PRINT*, ' J ignore donc les autres EVAP**' 413 xmin = 1.0E+20 414 xmax = -1.0E+20 415 DO i = 1, klon 416 xmin = MIN(fevap(i, 1), xmin) 417 xmax = MAX(fevap(i, 1), xmax) 418 ENDDO 419 PRINT*, 'Evap du sol <EVAP>', xmin, xmax 420 DO nsrf = 2, nbsrf 421 DO i = 1, klon 422 fevap(i, nsrf) = fevap(i, 1) 423 ENDDO 424 ENDDO 425 ENDIF 426 427 ! Lecture precipitation liquide: 428 429 CALL get_field("rain_f", rain_fall) 430 xmin = 1.0E+20 431 xmax = -1.0E+20 432 DO i = 1, klon 433 xmin = MIN(rain_fall(i), xmin) 434 xmax = MAX(rain_fall(i), xmax) 435 ENDDO 436 PRINT*, 'Precipitation liquide rain_f:', xmin, xmax 437 438 ! Lecture precipitation solide: 439 440 CALL get_field("snow_f", snow_fall) 441 xmin = 1.0E+20 442 xmax = -1.0E+20 443 DO i = 1, klon 444 xmin = MIN(snow_fall(i), xmin) 445 xmax = MAX(snow_fall(i), xmax) 446 ENDDO 447 PRINT*, 'Precipitation solide snow_f:', xmin, xmax 448 449 ! Lecture rayonnement solaire au sol: 450 451 CALL get_field("solsw", solsw, found) 452 IF (.NOT. found) THEN 453 PRINT*, 'phyetat0: Le champ <solsw> est absent' 454 PRINT*, 'mis a zero' 455 solsw(:) = 0. 456 ENDIF 457 xmin = 1.0E+20 458 xmax = -1.0E+20 459 DO i = 1, klon 460 xmin = MIN(solsw(i), xmin) 461 xmax = MAX(solsw(i), xmax) 462 ENDDO 463 PRINT*, 'Rayonnement solaire au sol solsw:', xmin, xmax 464 465 ! Lecture rayonnement IF au sol: 466 467 CALL get_field("sollw", sollw, found) 468 IF (.NOT. found) THEN 469 PRINT*, 'phyetat0: Le champ <sollw> est absent' 470 PRINT*, 'mis a zero' 471 sollw = 0. 472 ENDIF 473 xmin = 1.0E+20 474 xmax = -1.0E+20 475 DO i = 1, klon 476 xmin = MIN(sollw(i), xmin) 477 xmax = MAX(sollw(i), xmax) 478 ENDDO 479 PRINT*, 'Rayonnement IF au sol sollw:', xmin, xmax 480 481 CALL get_field("sollwdown", sollwdown, found) 482 IF (.NOT. found) THEN 483 PRINT*, 'phyetat0: Le champ <sollwdown> est absent' 484 PRINT*, 'mis a zero' 485 sollwdown = 0. 486 zts=0. 270 sollwdown = 0. ; zts=0. 487 271 do nsrf=1,nbsrf 488 272 zts(:)=zts(:)+ftsol(:,nsrf)*pctsrf(:,nsrf) … … 490 274 sollwdown(:)=sollw(:)+RSIGMA*zts(:)**4 491 275 ENDIF 492 ! print*,'TS SOLL',zts(klon/2),sollw(klon/2),sollwdown(klon/2) 493 xmin = 1.0E+20 494 xmax = -1.0E+20 495 DO i = 1, klon 496 xmin = MIN(sollwdown(i), xmin) 497 xmax = MAX(sollwdown(i), xmax) 498 ENDDO 499 PRINT*, 'Rayonnement IF au sol sollwdown:', xmin, xmax 500 501 502 ! Lecture derive des flux: 503 504 CALL get_field("fder", fder, found) 505 IF (.NOT. found) THEN 506 PRINT*, 'phyetat0: Le champ <fder> est absent' 507 PRINT*, 'mis a zero' 508 fder = 0. 509 ENDIF 510 xmin = 1.0E+20 511 xmax = -1.0E+20 512 DO i = 1, klon 513 xmin = MIN(fder(i), xmin) 514 xmax = MAX(fder(i), xmax) 515 ENDDO 516 PRINT*, 'Derive des flux fder:', xmin, xmax 517 518 ! Lecture du rayonnement net au sol: 519 520 CALL get_field("RADS", radsol) 521 xmin = 1.0E+20 522 xmax = -1.0E+20 523 DO i = 1, klon 524 xmin = MIN(radsol(i), xmin) 525 xmax = MAX(radsol(i), xmax) 526 ENDDO 527 PRINT*, 'Rayonnement net au sol radsol:', xmin, xmax 276 277 found=phyetat0_get(1,radsol,"RADS","Solar radiation",0.) 278 found=phyetat0_get(1,fder,"fder","Flux derivative",0.) 279 528 280 529 281 ! Lecture de la longueur de rugosite 530 531 IF (1==0) THEN ! A DERTRUIRE TOUT DE SUITE532 DO nsrf = 1, nbsrf533 IF (nsrf.GT.99) THEN534 PRINT*, "Trop de sous-mailles"535 call abort_gcm("phyetat0", "", 1)536 ENDIF537 WRITE(str2, '(i2.2)') nsrf538 ! Retrocompatibilite. A nettoyer fin 2015539 CALL get_field("RUG"//str2, z0m(:, nsrf),found)540 IF (found) THEN541 z0h(:,nsrf)=z0m(:,nsrf)542 PRINT*,'Lecture de ',"RUG"//str2,' -> z0m/z0h (obsolete)'543 ELSE544 CALL get_field("Z0m"//str2, z0m(:, nsrf), found)545 IF (.NOT.found) Z0m=1.e-3 ! initialisation à 1mm au cas ou.546 CALL get_field("Z0h"//str2, z0h(:, nsrf), found)547 IF (.NOT.found) Z0h=1.e-3 ! initialisation à 1mm au cas ou.548 ENDIF549 PRINT*, 'rugosite Z0m',nsrf,minval(z0m(:, nsrf)),maxval(z0m(:, nsrf))550 PRINT*, 'rugosite Z0h',nsrf,minval(z0h(:, nsrf)),maxval(z0h(:, nsrf))551 552 ENDDO553 ELSE554 282 found=phyetat0_srf(1,z0m,"RUG","Z0m ancien",0.001) 555 283 IF (found) THEN … … 559 287 found=phyetat0_srf(1,z0h,"Z0h","Roughness length, enthalpy ",0.001) 560 288 ENDIF 561 ENDIF562 289 563 290 ! Lecture de l'age de la neige: 564 565 CALL get_field("AGESNO", agesno(:, 1), found) 566 IF (.NOT. found) THEN 567 PRINT*, 'phyetat0: Le champ <AGESNO> est absent' 568 PRINT*, ' Mais je vais essayer de lire AGESNO**' 569 DO nsrf = 1, nbsrf 570 IF (nsrf.GT.99) THEN 571 PRINT*, "Trop de sous-mailles" 572 call abort_gcm("phyetat0", "", 1) 573 ENDIF 574 WRITE(str2, '(i2.2)') nsrf 575 CALL get_field("AGESNO"//str2, agesno(:, nsrf), found) 576 IF (.NOT. found) THEN 577 PRINT*, "phyetat0: Le champ <AGESNO"//str2//"> est absent" 578 agesno = 50.0 579 ENDIF 580 PRINT*, 'agesno',nsrf,minval(agesno(:, nsrf)),maxval(agesno(:, nsrf)) 581 ENDDO 582 ELSE 583 PRINT*, 'phyetat0: Le champ <AGESNO> est present' 584 PRINT*, ' J ignore donc les autres AGESNO**' 585 xmin = 1.0E+20 586 xmax = -1.0E+20 587 DO i = 1, klon 588 xmin = MIN(agesno(i, 1), xmin) 589 xmax = MAX(agesno(i, 1), xmax) 590 ENDDO 591 PRINT*, 'Age de la neige <AGESNO>', xmin, xmax 592 DO nsrf = 2, nbsrf 593 DO i = 1, klon 594 agesno(i, nsrf) = agesno(i, 1) 595 ENDDO 596 ENDDO 291 found=phyetat0_srf(1,agesno,"AGESNO","SNOW AGE",0.001) 292 293 ancien_ok=.true. 294 ancien_ok=ancien_ok.AND.phyetat0_get(klev,t_ancien,"TANCIEN","TANCIEN",0.) 295 ancien_ok=ancien_ok.AND.phyetat0_get(klev,q_ancien,"QANCIEN","QANCIEN",0.) 296 ancien_ok=ancien_ok.AND.phyetat0_get(klev,u_ancien,"UANCIEN","UANCIEN",0.) 297 ancien_ok=ancien_ok.AND.phyetat0_get(klev,v_ancien,"VANCIEN","VANCIEN",0.) 298 299 found=phyetat0_get(klev,clwcon,"CLWCON","CLWCON",0.) 300 found=phyetat0_get(klev,rnebcon,"RNEBCON","RNEBCON",0.) 301 found=phyetat0_get(klev,ratqs,"RATQS","RATQS",0.) 302 303 found=phyetat0_get(1,run_off_lic_0,"RUNOFFLIC0","RUNOFFLIC0",0.) 304 305 !================================== 306 ! TKE 307 !================================== 308 ! 309 IF (iflag_pbl>1) then 310 found=phyetat0_srf(klev+1,pbl_tke,"TKE","Turb. Kinetic. Energ. ",1.e-8) 597 311 ENDIF 598 312 599 ! CALL get_field("ZMEA", zmea) 600 ! PRINT*, 'OROGRAPHIE SOUS-MAILLE zmea:',minval(zmea(:)),maxval(zmea(:)) 601 found=phyetat0_get(1,zmea,"ZMEA","mean orography",0.) 602 603 CALL get_field("ZSTD", zstd) 604 PRINT*, 'OROGRAPHIE SOUS-MAILLE zstd:',minval(zstd(:)),maxval(zstd(:)) 605 606 CALL get_field("ZSIG", zsig) 607 PRINT*, 'OROGRAPHIE SOUS-MAILLE zsig:',minval(zsig(:)),maxval(zsig(:)) 608 609 CALL get_field("ZGAM", zgam) 610 PRINT*, 'OROGRAPHIE SOUS-MAILLE zgam:',minval(zgam(:)),maxval(zgam(:)) 611 612 CALL get_field("ZTHE", zthe) 613 PRINT*, 'OROGRAPHIE SOUS-MAILLE zthe:',minval(zthe(:)),maxval(zthe(:)) 614 615 CALL get_field("ZPIC", zpic) 616 PRINT*, 'OROGRAPHIE SOUS-MAILLE zpic:',minval(zpic(:)),maxval(zpic(:)) 617 618 CALL get_field("ZVAL", zval) 619 PRINT*, 'OROGRAPHIE SOUS-MAILLE zval:',minval(zval(:)),maxval(zval(:)) 620 621 CALL get_field("RUGSREL", rugoro) 622 PRINT*, 'Rugosite relief (ecart-type) rugsrel:',minval(rugoro(:)),maxval(rugoro(:)) 623 624 ancien_ok = .TRUE. 625 626 CALL get_field("TANCIEN", t_ancien, found) 627 IF (.NOT. found) THEN 628 PRINT*, "phyetat0: Le champ <TANCIEN> est absent" 629 PRINT*, "Depart legerement fausse. Mais je continue" 630 ancien_ok = .FALSE. 631 ENDIF 632 633 CALL get_field("QANCIEN", q_ancien, found) 634 IF (.NOT. found) THEN 635 PRINT*, "phyetat0: Le champ <QANCIEN> est absent" 636 PRINT*, "Depart legerement fausse. Mais je continue" 637 ancien_ok = .FALSE. 638 ENDIF 639 640 CALL get_field("UANCIEN", u_ancien, found) 641 IF (.NOT. found) THEN 642 PRINT*, "phyetat0: Le champ <UANCIEN> est absent" 643 PRINT*, "Depart legerement fausse. Mais je continue" 644 ancien_ok = .FALSE. 645 ENDIF 646 647 CALL get_field("VANCIEN", v_ancien, found) 648 IF (.NOT. found) THEN 649 PRINT*, "phyetat0: Le champ <VANCIEN> est absent" 650 PRINT*, "Depart legerement fausse. Mais je continue" 651 ancien_ok = .FALSE. 652 ENDIF 653 654 clwcon=0. 655 CALL get_field("CLWCON", clwcon, found) 656 IF (.NOT. found) THEN 657 PRINT*, "phyetat0: Le champ CLWCON est absent" 658 PRINT*, "Depart legerement fausse. Mais je continue" 659 ENDIF 660 PRINT*,'Eau liquide convective (ecart-type) clwcon:',MINval(clwcon),MAXval(clwcon) 661 662 663 rnebcon = 0. 664 CALL get_field("RNEBCON", rnebcon, found) 665 IF (.NOT. found) THEN 666 PRINT*, "phyetat0: Le champ RNEBCON est absent" 667 PRINT*, "Depart legerement fausse. Mais je continue" 668 ENDIF 669 PRINT*, 'Nebulosite convective (ecart-type) rnebcon:',MINval(rnebcon),MAXval(rnebcon) 670 671 ! Lecture ratqs 672 673 ratqs=0. 674 CALL get_field("RATQS", ratqs, found) 675 IF (.NOT. found) THEN 676 PRINT*, "phyetat0: Le champ <RATQS> est absent" 677 PRINT*, "Depart legerement fausse. Mais je continue" 678 ENDIF 679 PRINT*, '(ecart-type) ratqs:', MINval(ratqs),MAXval(ratqs) 680 681 ! Lecture run_off_lic_0 682 683 CALL get_field("RUNOFFLIC0", run_off_lic_0, found) 684 IF (.NOT. found) THEN 685 PRINT*, "phyetat0: Le champ <RUNOFFLIC0> est absent" 686 PRINT*, "Depart legerement fausse. Mais je continue" 687 run_off_lic_0 = 0. 688 ENDIF 689 PRINT*, '(ecart-type) run_off_lic_0:', MINval(run_off_lic_0),MAXval(run_off_lic_0) 690 691 ! Lecture de l'energie cinetique turbulente 692 693 IF (iflag_pbl>1) then 694 DO nsrf = 1, nbsrf 695 IF (nsrf.GT.99) THEN 696 PRINT*, "Trop de sous-mailles" 697 call abort_gcm("phyetat0", "", 1) 698 ENDIF 699 WRITE(str2, '(i2.2)') nsrf 700 CALL get_field("TKE"//str2, pbl_tke(:, 1:klev+1, nsrf), found) 701 IF (.NOT. found) THEN 702 PRINT*, "phyetat0: <TKE"//str2//"> est absent" 703 pbl_tke(:, :, nsrf)=1.e-8 704 ENDIF 705 PRINT*, 'Turbulent kinetic energyl TKE**:', nsrf, minval(pbl_tke(:,:,nsrf)),maxval(pbl_tke(:,:, nsrf)) 706 707 ENDDO 708 ENDIF 709 710 ! Lecture de l'ecart de TKE (w) - (x) 711 ! 712 IF (iflag_pbl>1 .AND. iflag_wake>=1 & 713 .AND. iflag_pbl_split >=1 ) then 714 DO nsrf = 1, nbsrf 715 IF (nsrf.GT.99) THEN 716 PRINT*, "Trop de sous-mailles" 717 call abort_gcm("phyetat0", "", 1) 718 ENDIF 719 WRITE(str2,'(i2.2)') nsrf 720 CALL get_field("DELTATKE"//str2, & 721 wake_delta_pbl_tke(:,1:klev+1,nsrf),found) 722 IF (.NOT. found) THEN 723 PRINT*, "phyetat0: <DELTATKE"//str2//"> est absent" 724 wake_delta_pbl_tke(:,:,nsrf)=0. 725 ENDIF 726 PRINT*,'TKE difference (w)-(x) DELTATKE**:', nsrf, & 727 minval(wake_delta_pbl_tke(:,:,nsrf)),maxval(wake_delta_pbl_tke(:,:, nsrf)) 728 729 ENDDO 730 731 ! delta_tsurf 732 733 DO nsrf = 1, nbsrf 734 IF (nsrf.GT.99) THEN 735 PRINT*, "Trop de sous-mailles" 736 call abort_gcm("phyetat0", "", 1) 737 ENDIF 738 WRITE(str2,'(i2.2)') nsrf 739 CALL get_field("DELTA_TSURF"//str2, delta_tsurf(:,nsrf), found) 740 IF (.NOT. found) THEN 741 PRINT*, "phyetat0: Le champ <DELTA_TSURF"//str2//"> est absent" 742 PRINT*, "Depart legerement fausse. Mais je continue" 743 delta_tsurf(:,nsrf)=0. 744 ELSE 745 PRINT*, 'delta_tsurf:', nsrf, & 746 minval(delta_tsurf(:,nsrf)),maxval(delta_tsurf(:, nsrf)) 747 ENDIF 748 ENDDO ! nsrf = 1, nbsrf 313 IF (iflag_pbl>1 .AND. iflag_wake>=1 .AND. iflag_pbl_split >=1 ) then 314 found=phyetat0_srf(klev+1,wake_delta_pbl_tke,"DELTATKE","Del TKE wk/env",0.) 315 found=phyetat0_srf(1,delta_tsurf,"DELTA_TSURF","Delta Ts wk/env ",0.) 749 316 ENDIF !(iflag_pbl>1 .AND. iflag_wake>=1 .AND. iflag_pbl_split >=1 ) 750 317 … … 753 320 !================================== 754 321 755 found=phyetat0_get(1,w01,"w01","w01",0.) 756 found=phyetat0_get(1,sig1,"sig1","sig1",0.) 757 322 ! Emanuel 323 found=phyetat0_get(klev,sig1,"sig1","sig1",0.) 324 found=phyetat0_get(klev,w01,"w01","w01",0.) 325 326 ! Wake 758 327 found=phyetat0_get(klev,wake_deltat,"WAKE_DELTAT","Delta T wake/env",0.) 759 328 found=phyetat0_get(klev,wake_deltaq,"WAKE_DELTAQ","Delta hum. wake/env",0.) 760 found=phyetat0_get(1,wake_s,"WAKE_S"," ???",0.)761 found=phyetat0_get(1,wake_cstar,"WAKE_CSTAR"," ???",0.)762 found=phyetat0_get(1,wake_pe,"WAKE_PE"," ???",0.)763 found=phyetat0_get(1,wake_fip,"WAKE_FIP"," ???",0.)764 765 329 found=phyetat0_get(1,wake_s,"WAKE_S","WAKE_S",0.) 330 found=phyetat0_get(1,wake_cstar,"WAKE_CSTAR","WAKE_CSTAR",0.) 331 found=phyetat0_get(1,wake_pe,"WAKE_PE","WAKE_PE",0.) 332 found=phyetat0_get(1,wake_fip,"WAKE_FIP","WAKE_FIP",0.) 333 334 ! Thermiques 766 335 found=phyetat0_get(1,zmax0,"ZMAX0","ZMAX0",40.) 767 336 found=phyetat0_get(1,f0,"F0","F0",1.e-5) 768 found=phyetat0_get(klev ,fm_therm,"FM_THERM","Thermals mass flux",0.)337 found=phyetat0_get(klev+1,fm_therm,"FM_THERM","Thermals mass flux",0.) 769 338 found=phyetat0_get(klev,entr_therm,"ENTR_THERM","Thermals Entrain.",0.) 770 339 found=phyetat0_get(klev,detr_therm,"DETR_THERM","Thermals Detrain.",0.) 771 340 772 341 ! ALE/ALP 773 342 found=phyetat0_get(1,ale_bl,"ALE_BL","ALE BL",0.) 774 343 found=phyetat0_get(1,ale_bl_trig,"ALE_BL_TRIG","ALE BL_TRIG",0.) 775 344 found=phyetat0_get(1,alp_bl,"ALP_BL","ALP BL",0.) 776 345 777 778 346 !=========================================== 779 347 ! Read and send field trs to traclmdz … … 783 351 DO it=1, nbtr 784 352 iiq=niadv(it+2) 785 found=phyetat0_get(1,trs(:,it),"trs_"//tname(iiq),"Surf trac"//tname(iiq),0.) 353 found=phyetat0_get(1,trs(:,it),"trs_"//tname(iiq), & 354 "Surf trac"//tname(iiq),0.) 786 355 END DO 787 356 CALL traclmdz_from_restart(trs) 788 357 789 358 IF (carbon_cycle_cpl) THEN 359 ALLOCATE(co2_send(klon), stat=ierr) 360 IF (ierr /= 0) CALL abort_gcm('phyetat0', 'pb allocation co2_send', 1) 790 361 found=phyetat0_get(1,co2_send,"co2_send","co2 send",0.) 791 362 END IF … … 793 364 794 365 !=========================================== 366 ! ondes de gravite / relief 367 !=========================================== 368 795 369 ! ondes de gravite non orographiques 796 !===========================================797 798 370 if (ok_gwd_rando) then 799 call get_field("du_gwd_rando", du_gwd_rando, found)800 371 found=phyetat0_get(klev,du_gwd_rando,"du_gwd_rando","du_gwd_rando",0.) 801 372 found=phyetat0_get(klev,dv_gwd_rando,"dv_gwd_rando","dv_gwd_rando",0.) 802 373 end if 374 375 ! prise en compte du relief sous-maille 376 found=phyetat0_get(1,zmea,"ZMEA","sub grid orography",0.) 377 found=phyetat0_get(1,zstd,"ZSTD","sub grid orography",0.) 378 found=phyetat0_get(1,zsig,"ZSIG","sub grid orography",0.) 379 found=phyetat0_get(1,zgam,"ZGAM","sub grid orography",0.) 380 found=phyetat0_get(1,zthe,"ZTHE","sub grid orography",0.) 381 found=phyetat0_get(1,zpic,"ZPIC","sub grid orography",0.) 382 found=phyetat0_get(1,zval,"ZVAL","sub grid orography",0.) 383 found=phyetat0_get(1,zmea,"ZMEA","sub grid orography",0.) 384 found=phyetat0_get(1,rugoro,"RUGSREL","sub grid orography",0.) 803 385 804 386 !===========================================
Note: See TracChangeset
for help on using the changeset viewer.