Changeset 5099 for LMDZ6/branches/Amaury_dev/libf/phylmd/ecumev6_flux.F90
- Timestamp:
- Jul 22, 2024, 9:29:09 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/ecumev6_flux.F90
r4722 r5099 80 80 !!! 81 81 !------------------------------------------------------------------------------- 82 ! 82 83 83 ! 0. DECLARATIONS 84 84 ! ------------ 85 ! 85 86 86 USE dimphy 87 87 USE indice_sol_mod … … 93 93 !USE MODD_SURF_ATM, ONLY : XVCHRNK, XVZ0CM 94 94 !USE MODD_REPROD_OPER, ONLY : CCHARNOCK 95 ! 95 96 96 !USE MODE_THERMOS 97 97 !USE MODI_WIND_THRESHOLD 98 98 !USE MODI_SURFACE_RI 99 ! 99 100 100 !USE YOMHOOK, ONLY : LHOOK, DR_HOOK 101 101 !USE PARKIND1, ONLY : JPRB 102 ! 102 103 103 !USE MODI_ABOR1_SFX 104 ! 104 105 105 IMPLICIT NONE 106 ! 106 107 107 ! 0.1. Declarations of arguments 108 ! 108 109 109 REAL, DIMENSION(klon), INTENT(IN) :: PVMOD ! module of wind at atm level (m/s) 110 110 REAL, DIMENSION(klon), INTENT(IN) :: PTA ! air temperature at atm level (K) … … 126 126 LOGICAL, INTENT(IN) :: OPERTFLUX 127 127 REAL, DIMENSION(klon), INTENT(IN) :: PRAIN ! precipitation rate (kg/s/m2) 128 ! 128 129 129 !INTEGER, INTENT(IN) :: KZ0 130 ! 130 131 131 REAL, DIMENSION(klon), INTENT(INOUT) :: PSST ! Sea Surface Temperature (K) 132 132 REAL, DIMENSION(klon), INTENT(INOUT) :: PZ0SEA ! roughness length over sea … … 148 148 149 149 ! 0.2. Declarations of local variables 150 ! 150 151 151 ! specif SB 152 152 INTEGER, DIMENSION(SIZE(PTA)) :: JCV ! convergence index … … 155 155 REAL, DIMENSION(SIZE(PTA)) :: PEXNA ! Exner function at atm level 156 156 REAL, DIMENSION(SIZE(PTA)) :: PEXNS ! Exner function at atm level 157 ! 157 158 158 REAL, DIMENSION(SIZE(PTA)) :: ZTAU ! momentum flux (N/m2) 159 159 REAL, DIMENSION(SIZE(PTA)) :: ZHF ! sensible heat flux (W/m2) … … 249 249 250 250 !REAL(KIND=JPRB) :: ZHOOK_HANDLE 251 ! 251 252 252 !------------------------------------------------------------------------------- 253 253 !----------------------- Modif Olive calcul de PRHOA --------------------------- … … 280 280 281 281 !IF (LHOOK) CALL DR_HOOK('ECUMEV6_FLUX',0,ZHOOK_HANDLE) 282 ! 282 283 283 ZDUSR0 = 1.E-06 284 284 ZDTSR0 = 1.E-06 285 285 ZDQSR0 = 1.E-09 286 ! 286 287 287 NITERMAX = 5 288 288 NITERSUP = 5 289 289 OPCVFLX = .TRUE. 290 ! 290 291 291 NITERFL = NITERMAX 292 292 IF (OPCVFLX) NITERFL = NITERMAX+NITERSUP 293 ! 293 294 294 ZCOEFU = (/ 1.00E-03, 3.66E-02, -1.92E-03, 2.32E-04, -7.02E-06, 6.40E-08 /) 295 295 ZCOEFT = (/ 5.36E-03, 2.90E-02, -1.24E-03, 4.50E-04, -2.06E-05, 0.0 /) 296 296 ZCOEFQ = (/ 1.00E-03, 3.59E-02, -2.87E-04, 0.0, 0.0, 0.0 /) 297 ! 297 298 298 ZUTU = 40.0 299 299 ZUTT = 14.4 300 300 ZUTQ = 10.0 301 ! 301 302 302 ZCDIRU = ZCOEFU(1) + 2.0*ZCOEFU(2)*ZUTU + 3.0*ZCOEFU(3)*ZUTU**2 & 303 303 + 4.0*ZCOEFU(4)*ZUTU**3 + 5.0*ZCOEFU(5)*ZUTU**4 … … 305 305 + 4.0*ZCOEFT(4)*ZUTT**3 306 306 ZCDIRQ = ZCOEFQ(1) + 2.0*ZCOEFQ(2)*ZUTQ 307 ! 307 308 308 ZORDOU = ZCOEFU(0) + ZCOEFU(1)*ZUTU + ZCOEFU(2)*ZUTU**2 + ZCOEFU(3)*ZUTU**3 & 309 309 + ZCOEFU(4)*ZUTU**4 + ZCOEFU(5)*ZUTU**5 … … 311 311 + ZCOEFT(4)*ZUTT**4 312 312 ZORDOQ = ZCOEFQ(0) + ZCOEFQ(1)*ZUTQ + ZCOEFQ(2)*ZUTQ**2 313 ! 314 !------------------------------------------------------------------------------- 315 ! 313 314 !------------------------------------------------------------------------------- 315 316 316 ! 1. AUXILIARY CONSTANTS & ARRAY INITIALISATION BY UNDEFINED VALUES. 317 317 ! -------------------------------------------------------------------- 318 ! 318 319 319 ZDIRCOSZW(:) = 1.0 320 ! 320 321 321 ZETV = XRV/XRD-1.0 !~0.61 (cf Liu et al. 1979) 322 322 ZRDSRV = XRD/XRV !~0.622 … … 326 326 ZBTA = 16.0 327 327 ZGMA = 7.0 !initially =4.7, modified to 7.0 following G. Caniaux 328 ! 328 329 329 ZP00 = 1013.25E+02 330 ! 330 331 331 PCD = XUNDEF 332 332 PCH = XUNDEF … … 339 339 ZHF = XUNDEF 340 340 ZEF = XUNDEF 341 ! 341 342 342 PSFTH = XUNDEF 343 343 PSFTQ = XUNDEF … … 345 345 PRESA = XUNDEF 346 346 PRI = XUNDEF 347 ! 347 348 348 ZTAUR = 0.0 349 349 ZRF = 0.0 350 350 ZEFWEBB = 0.0 351 ! 352 !------------------------------------------------------------------------------- 353 ! 351 352 !------------------------------------------------------------------------------- 353 354 354 ! 2. INITIALISATIONS BEFORE ITERATIVE LOOP. 355 355 ! ------------------------------------------- 356 ! 356 357 357 !ZVMOD(:) = WIND_THRESHOLD(PVMOD(:),PUREF(:)) !set a minimum value to wind 358 358 ZVMOD = MAX(PVMOD , 0.1 * MIN(10.,PUREF) ) !set a minimum value to wind … … 360 360 write(*,*) "ZVMOD ",SIZE(ZVMOD) 361 361 362 !363 362 ! 2.0. Radiative fluxes - For warm layer & cool skin 364 ! 363 365 364 ! 2.0b. Warm Layer correction 366 ! 365 367 366 ! 2.1. Specific humidity at saturation 368 ! 367 369 368 WHERE(PSSS(:)>0.0.AND.PSSS(:)/=XUNDEF) 370 369 PQSATA = QSAT_SEAWATER2 (PSST(:),PPS(:),PSSS(:)) !at sea surface … … 377 376 !### OLIVIER POUR PRESSION SATURANTE ##### 378 377 !------------------------------------------------------------------------------- 379 ! 378 380 379 ZFOES = 1 !PSAT(PT(:)) 381 380 ZFOES = 0.98*ZFOES 382 ! 381 383 382 ZWORK1 = ZFOES/PPS 384 383 ZWORK2 = XRD/XRV … … 398 397 write(*,*) "PQSATA : ",PQSATA 399 398 400 401 !402 399 !* 2. COMPUTE SATURATION HUMIDITY 403 400 ! --------------------------- 404 ! 401 405 402 !PQSAT = ZWORK2*ZWORK1 / (1.+(ZWORK2-1.)*ZWORK1) 406 403 !ZQSATA = ZWORK2A*ZWORK1A / (1.+(ZWORK2A-1.)*ZWORK1A) 407 404 ZQSATA = QSAT_SEAWATER (PTA(:),PPA(:)) !at sea surface 408 405 409 410 !411 406 ! 2.2. Gradients at the air-sea interface 412 ! 407 413 408 ZDU(:) = ZVMOD(:) !one assumes u is measured / sea surface current 414 409 ZDT(:) = PTA(:)/PEXNA(:)-PSST(:)/PEXNS(:) … … 418 413 write(*,*) "PQSAT",PQSAT(:) 419 414 write(*,*) "ZDQ",ZDQ(:) 420 ! 415 421 416 ! 2.3. Latent heat of vaporisation 422 ! 417 423 418 ZLVA(:) = XLVTT+(XCPV-XCL)*(PTA (:)-XTT) !of pure water at atm level 424 419 ZLVS(:) = XLVTT+(XCPV-XCL)*(PSST(:)-XTT) !of pure water at sea surface … … 433 428 ZLVS(:) = ZLVS(:)*(1.0-1.00472E-3*PSSS(:)) !of seawater at sea surface 434 429 ENDWHERE 435 ! 430 436 431 ! 2.4. Specific heat of moist air (Businger 1982) 437 ! 432 438 433 !ZCPA(:) = XCPD*(1.0+(XCPV/XCPD-1.0)*PQA(:)) 439 434 ZCPA(:) = XCPD 440 ! 435 441 436 ! 2.4b Kinematic viscosity of dry air (Andreas 1989, CRREL Rep. 89-11) 442 ! 437 443 438 ZVISA(:) = 1.326E-05*(1.0+6.542E-03*(PTA(:)-XTT)+8.301E-06*(PTA(:)-XTT)**2 & 444 439 -4.84E-09*(PTA(:)-XTT)**3) 445 ! 440 446 441 ! 2.4c Coefficients for warm layer and/or cool skin correction 447 ! 442 448 443 ! 2.5. Initial guess 449 ! 444 450 445 ZDDU(:) = ZDU(:) 451 446 ZDDT(:) = ZDT(:) … … 459 454 write(*,*) "ZDDT ",ZDDT 460 455 461 !462 456 JCV (:) = -1 463 457 ZUSR(:) = 0.04*ZDDU(:) … … 468 462 ZDELTAQ10N(:) = ZDDQ(:) 469 463 JITER(:) = 99 470 ! 464 471 465 ! In the following, we suppose that Richardson number PRI < XRIMAX 472 466 ! If not true, Monin-Obukhov theory can't (and therefore shouldn't) be applied ! 473 467 !------------------------------------------------------------------------------- 474 ! 468 475 469 ! 3. ITERATIVE LOOP TO COMPUTE U*, T*, Q*. 476 470 ! ------------------------------------------ 477 ! 471 478 472 DO JJ=1,NITERFL 479 473 DO JLON=1,SIZE(PTA) 480 ! 474 481 475 IF (JCV(JLON) == -1) THEN 482 476 ZUSR0(JLON)=ZUSR(JLON) … … 492 486 ZDTSTO(JLON) = ZDELTAT10N(JLON) 493 487 ZDQSTO(JLON) = ZDELTAQ10N(JLON) 494 ! 488 495 489 ! 3.1. Neutral parameter for wind speed (ECUME_V6 formulation) 496 ! 490 497 491 IF (ZDELTAU10N(JLON) <= ZUTU) THEN 498 492 ZPARUN(JLON) = ZCOEFU(0) + ZCOEFU(1)*ZDELTAU10N(JLON) & … … 505 499 ENDIF 506 500 PCDN(JLON) = (ZPARUN(JLON)/ZDELTAU10N(JLON))**2 507 ! 501 508 502 ! 3.2. Neutral parameter for temperature (ECUME_V6 formulation) 509 ! 503 510 504 IF (ZDELTAU10N(JLON) <= ZUTT) THEN 511 505 ZPARTN(JLON) = ZCOEFT(0) + ZCOEFT(1)*ZDELTAU10N(JLON) & … … 516 510 ZPARTN(JLON) = ZCDIRT*(ZDELTAU10N(JLON)-ZUTT) + ZORDOT 517 511 ENDIF 518 ! 512 519 513 ! 3.3. Neutral parameter for humidity (ECUME_V6 formulation) 520 ! 514 521 515 IF (ZDELTAU10N(JLON) <= ZUTQ) THEN 522 516 ZPARQN(JLON) = ZCOEFQ(0) + ZCOEFQ(1)*ZDELTAU10N(JLON) & … … 525 519 ZPARQN(JLON) = ZCDIRQ*(ZDELTAU10N(JLON)-ZUTQ) + ZORDOQ 526 520 ENDIF 527 ! 521 528 522 ! 3.4. Scaling parameters U*, T*, Q* 529 ! 523 530 524 ZUSR(JLON) = ZPARUN(JLON) 531 525 ZTSR(JLON) = ZPARTN(JLON)*ZDELTAT10N(JLON)/ZDELTAU10N(JLON) 532 526 ZQSR(JLON) = ZPARQN(JLON)*ZDELTAQ10N(JLON)/ZDELTAU10N(JLON) 533 ! 527 534 528 ! 3.4b Gustiness factor (Deardorff 1970) 535 ! 529 536 530 ! 3.4c Cool skin correction 537 ! 531 538 532 ! 3.5. Obukhovs stability param. z/l following Liu et al. (JAS, 1979) 539 ! 533 540 534 ! For U 541 535 ZLMOU = PUREF(JLON)*XG*XKARMAN*(ZTSR(JLON)/PTA(JLON) & … … 545 539 ZLMOU = MAX(MIN(ZLMOU,ZLMOMAX),ZLMOMIN) 546 540 ZLMOT = MAX(MIN(ZLMOT,ZLMOMAX),ZLMOMIN) 547 ! 541 548 542 ! 3.6. Stability function psi (see Liu et al, 1979 ; Dyer and Hicks, 1970) 549 543 ! Modified to include convective form following Fairall (unpublished) 550 ! 544 551 545 ! For U 552 546 IF (ZLMOU == 0.0) THEN … … 581 575 ENDIF 582 576 ZPSIT(JLON) = ZPSI_T 583 ! 577 584 578 ! 3.7. Update air-sea gradients 585 ! 579 586 580 ZDDU(JLON) = ZDU(JLON) 587 581 ZDDT(JLON) = ZDT(JLON) … … 601 595 ZDELTAQ10N(JLON) = SIGN(MAX(ABS(ZDELTAQ10N(JLON)),10.0*ZDQSR0), & 602 596 ZDELTAQ10N(JLON)) 603 ! 597 604 598 ! 3.8. Test convergence for U*, T*, Q* 605 ! 599 606 600 IF (ABS(ZUSR(JLON)-ZUSR0(JLON)) < ZDUSR0 .AND. & 607 601 ABS(ZTSR(JLON)-ZTSR0(JLON)) < ZDTSR0 .AND. & … … 612 606 JITER(JLON) = JJ 613 607 ENDIF 614 ! 608 615 609 ENDDO 616 610 ENDDO 617 ! 618 !------------------------------------------------------------------------------- 619 ! 611 612 !------------------------------------------------------------------------------- 613 620 614 ! 4. COMPUTATION OF TURBULENT FLUXES AND EXCHANGE COEFFICIENTS. 621 615 ! --------------------------------------------------------------- 622 ! 616 623 617 DO JLON=1,SIZE(PTA) 624 ! 618 625 619 ! 4.1. Surface turbulent fluxes 626 620 ! (ATM CONV.: ZTAU<<0 ; ZHF,ZEF<0 if atm looses heat) 627 ! 621 628 622 ZTAU(JLON) = -PRHOA(JLON)*ZUSR(JLON)**2 629 623 ZHF(JLON) = -PRHOA(JLON)*ZCPA(JLON)*ZUSR(JLON)*ZTSR(JLON) … … 634 628 write(*,*) "LAT = ",ZEF(JLON) 635 629 636 !637 630 ! 4.2. Exchange coefficients PCD, PCH, PCE 638 ! 631 639 632 PCD(JLON) = (ZUSR(JLON)/ZDDU(JLON))**2 640 633 PCH(JLON) = (ZUSR(JLON)*ZTSR(JLON))/(ZDDU(JLON)*ZDDT(JLON)) … … 645 638 write(*,*) "ZQSR = ",ZQSR(JLON) 646 639 647 !648 640 ! 4.3. Stochastic perturbation of turbulent fluxes 649 ! 641 650 642 ! IF( OPERTFLUX )THEN 651 643 ! ZTAU(JLON) = ZTAU(JLON)* ( 1. + PPERTFLUX(JLON) / 2. ) … … 653 645 ! ZEF (JLON) = ZEF(JLON)* ( 1. + PPERTFLUX(JLON) / 2. ) 654 646 ! ENDIF 655 ! 647 656 648 ENDDO 657 ! 658 !------------------------------------------------------------------------------- 659 ! 649 650 !------------------------------------------------------------------------------- 651 660 652 ! 5. COMPUTATION OF FLUX CORRECTIONS DUE TO RAINFALL. 661 653 ! (ATM conv: ZRF<0 if atm. looses heat, ZTAUR<<0) 662 654 ! ----------------------------------------------------- 663 ! 655 664 656 IF (OPRECIP) THEN 665 657 DO JLON=1,SIZE(PTA) 666 ! 658 667 659 ! 5.1. Momentum flux due to rainfall (ZTAUR, N/m2) 668 ! 660 669 661 ! See pp3752 in FBR96. 670 662 ZTAUR(JLON) = -0.85*PRAIN(JLON)*PVMOD(JLON) 671 ! 663 672 664 ! 5.2. Sensible heat flux due to rainfall (ZRF, W/m2) 673 ! 665 674 666 ! See Eq.12 in GoF95 with ZCPWA as specific heat of water at atm level (J/kg/K), 675 667 ! ZDQSDT from Clausius-Clapeyron relation, ZDWAT as water vapor diffusivity 676 668 ! (Eq.13-3 of Pruppacher and Klett, 1978), ZDTMP as heat diffusivity, and ZBULB 677 669 ! as wet-bulb factor (Eq.11 in GoF95). 678 ! 670 679 671 ZTAC = PTA(JLON)-XTT 680 672 ZCPWA = 4217.51 -3.65566*ZTAC +0.1381*ZTAC**2 & … … 688 680 ZRF(JLON) = PRAIN(JLON)*ZCPWA*ZBULB*((PSST(JLON)-PTA(JLON)) & 689 681 +(PQSATA(JLON)-PQA(JLON))*(ZLVA(JLON)*ZDWAT)/(ZCPA(JLON)*ZDTMP)) 690 ! 682 691 683 ENDDO 692 684 ENDIF 693 ! 694 !------------------------------------------------------------------------------- 695 ! 685 686 !------------------------------------------------------------------------------- 687 696 688 ! 6. COMPUTATION OF WEBB CORRECTION TO LATENT HEAT FLUX (ZEFWEBB, W/m2). 697 689 ! ------------------------------------------------------------------------ 698 ! 690 699 691 ! See Eq.21 and Eq.22 in FBR96. 700 692 IF (OPWEBB) THEN … … 705 697 ENDDO 706 698 ENDIF 707 ! 708 !------------------------------------------------------------------------------- 709 ! 699 700 !------------------------------------------------------------------------------- 701 710 702 ! 7. FINAL STEP : TOTAL SURFACE FLUXES AND DERIVED DIAGNOSTICS. 711 703 ! --------------------------------------------------------------- 712 ! 704 713 705 ! 7.1. Richardson number 714 ! 706 715 707 ! CALL SURFACE_RI(PSST,PQSAT,PEXNS,PEXNA,PTA,PQA, & 716 708 ! PZREF,PUREF,ZDIRCOSZW,PVMOD,PRI) 717 ! 709 718 710 ! 7.2. Friction velocity which contains correction due to rain 719 ! 711 720 712 ZUSTAR2(:) = -(ZTAU(:)+ZTAUR(:))/PRHOA(:) !>>0 as ZTAU<<0 & ZTAUR<=0 721 ! 713 722 714 IF (OPRECIP) THEN 723 715 PCD(:) = ZUSTAR2(:)/ZDDU(:)**2 724 716 ENDIF 725 ! 717 726 718 PUSTAR(:) = SQRT(ZUSTAR2(:)) !>>0 727 ! 719 728 720 ! 7.3. Aerodynamical conductance and resistance 729 ! 721 730 722 ZAC (:) = PCH(:)*ZDDU(:) 731 723 PRESA(:) = 1.0/ZAC(:) 732 ! 724 733 725 ! 7.4. Total surface fluxes 734 ! 726 735 727 PSFTH(:) = ZHF(:)+ZRF(:) 736 728 PSFTQ(:) = (ZEF(:)+ZEFWEBB(:))/ZLVS(:) 737 ! 729 738 730 ! 7.5. Charnock number 739 ! 731 740 732 IF (CCHARNOCK == 'OLD') THEN 741 733 ZCHARN(:) = XVCHRNK … … 743 735 ZCHARN(:) = MIN(0.018,MAX(0.011,0.011+(0.007/8.0)*(ZDDU(:)-10.0))) 744 736 ENDIF 745 ! 737 746 738 ! 7.6. Roughness lengths Z0 and Z0H over sea 747 ! 739 748 740 !IF (KZ0 == 0) THEN ! ARPEGE formulation 749 741 ! PZ0SEA (:) = (ZCHARN(:)/XG)*ZUSTAR2(:) + XVZ0CM*PCD(:)/PCDN(:) … … 770 762 PCE,& 771 763 PCH] 772 ! 773 ! 764 765 774 766 !IF (LHOOK) CALL DR_HOOK('ECUMEV6_FLUX',1,ZHOOK_HANDLE) 775 ! 767 776 768 !------------------------------------------------------------------------------- 777 769 END SUBROUTINE ECUMEV6_FLUX
Note: See TracChangeset
for help on using the changeset viewer.