Changeset 3821
- Timestamp:
- Feb 4, 2021, 5:25:02 PM (4 years ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/screenc_mod.F90
r3817 r3821 183 183 cdram, cdrah, zri1, pref) 184 184 DO i = 1, knon 185 ! IF(ok_prescr_ust) THEN186 ! La aussi il faut forcer avec ust (FC + MPL 20160210)187 ! ycdragm(i) = ust*ust/(1.+speed(i))/speed(i)188 ! cdram=ycdragm189 ! delu(i) = ust/sqrt(cdram(i))190 ! ELSE191 ! delu(i) = ustar(i)/sqrt(cdram(i))192 ! ENDIF193 IF(ok_prescr_ust) THEN194 print*,'chgmnt calculs à 2m; remplacer par ??? si 1D'195 STOP196 ENDIF197 185 delm(i) = sqrt(cdrm(i))/sqrt(cdram(i)) 198 186 !verifier que temp est un temperat potentielle. -
LMDZ6/trunk/libf/phylmd/stdlevvar_mod.F90
r3817 r3821 417 417 LOGICAL, dimension(klon) :: ok_q2m_toosmall, ok_q2m_toobig 418 418 LOGICAL, dimension(klon) :: ok_u2m_toobig 419 LOGICAL, dimension(klon) :: ok_t10m_toosmall, ok_t10m_toobig 420 LOGICAL, dimension(klon) :: ok_q10m_toosmall, ok_q10m_toobig 421 LOGICAL, dimension(klon) :: ok_u10m_toobig 422 INTEGER, dimension(klon, 6) :: n10mout 419 423 420 424 !------------------------------------------------------------------------- … … 437 441 & cdram, cdrah, zri1, pref) 438 442 439 ! --- special Dice: on force cdragm ( a defaut de forcer ustar) MPL 05082013440 IF (ok_prescr_ust) then441 DO i = 1, knon442 print *,'cdram avant=',cdram(i)443 cdram(i) = ust*ust/speed(i)/speed(i)444 print *,'cdram ust speed apres=',cdram(i),ust,speed445 ENDDO446 ENDIF447 !448 !---------Star variables----------------------------------------------------449 443 ! 450 444 DO i = 1, knon … … 606 600 ! 607 601 zref = 10.0 608 CALL screenpn(klon, knon, nsrf, speed, tpot, q1, & 609 & ts1, qsurf, z0m, zri1, & 610 & zref, & 611 & delu, delte, delq) 612 ! 613 DO i = 1, knon 614 u_zref(i) = delu(i) 615 q_zref(i) = max(qsurf(i),0.0) + delq(i) 616 te_zref(i) = ts1(i) + delte(i) 617 temp(i) = te_zref(i) * (psol(i)/pat1(i))**(-RKAPPA) 618 u_zref_p(i) = u_zref(i) 619 ENDDO 620 ! 621 ! Iteration of the variables at the reference level zref : corrector ; see Hess & McAvaney, 1995 602 ! 603 CALL screencn(klon, knon, nsrf, zxli, & 604 & speed, tpot, q1, zref, & 605 & ts1, qsurf, z0m, z0h, psol, & 606 & cdram, cdrah, okri, & 607 & ri1, 1, & 608 & pref_new, delm_new, delh_new, ri10m) 609 ! 610 DO i = 1, knon 611 u_zref(i) = delm_new(i)*speed(i) 612 q_zref(i) = delh_new(i)*max(q1(i),0.0) + & 613 & max(qsurf(i),0.0)*(1-delh_new(i)) 614 te_zref(i) = delh_new(i)*tpot(i) + ts1(i)*(1-delh_new(i)) 615 temp(i) = te_zref(i) * (psol(i)/pref_new(i))**(-RKAPPA) 616 u_zref_p(i) = u_zref(i) 617 ! 618 ! compteurs ici 619 ! 620 ok_t10m_toosmall(i)=te_zref(i).LT.tpot(i).AND. & 621 & te_zref(i).LT.ts1(i) 622 ok_t10m_toobig(i)=te_zref(i).GT.tpot(i).AND. & 623 & te_zref(i).GT.ts1(i) 624 ok_q10m_toosmall(i)=q_zref(i).LT.q1(i).AND. & 625 & q_zref(i).LT.qsurf(i) 626 ok_q10m_toobig(i)=q_zref(i).GT.q1(i).AND. & 627 & q_zref(i).GT.qsurf(i) 628 ok_u10m_toobig(i)=u_zref(i).GT.speed(i) 629 ! 630 IF(ok_t10m_toosmall(i).OR.ok_t10m_toobig(i).OR. & 631 & ok_q10m_toosmall(i).OR.ok_q10m_toobig(i).OR. & 632 & ok_u10m_toobig(i)) THEN 633 delm_new(i)=min(max(delm_new(i),0.),1.) 634 delh_new(i)=min(max(delh_new(i),0.),1.) 635 u_zref(i) = delm_new(i)*speed(i) 636 u_zref_p(i) = u_zref(i) 637 q_zref(i) = delh_new(i)*max(q1(i),0.0) + & 638 & max(qsurf(i),0.0)*(1-delh_new(i)) 639 te_zref(i) = delh_new(i)*tpot(i) + ts1(i)*(1-delh_new(i)) 640 temp(i) = te_zref(i) * (psol(i)/pref_new(i))**(-RKAPPA) 641 ENDIF 642 ! 643 ENDDO 644 ! 645 ! Iteration of the variables at the reference level zref : corrector calculation ; see Hess & McAvaney, 1995 622 646 ! 623 647 DO n = 1, niter … … 636 660 & max(qsurf(i),0.0)*(1-delh(i)) 637 661 te_zref(i) = delh(i)*tpot(i) + ts1(i)*(1-delh(i)) 662 ! 663 ! return to normal temperature 638 664 temp(i) = te_zref(i) * (psol(i)/pref(i))**(-RKAPPA) 665 ! 666 ! compteurs ici 667 ! 668 ok_t10m_toosmall(i)=te_zref(i).LT.tpot(i).AND. & 669 & te_zref(i).LT.ts1(i) 670 ok_t10m_toobig(i)=te_zref(i).GT.tpot(i).AND. & 671 & te_zref(i).GT.ts1(i) 672 ok_q10m_toosmall(i)=q_zref(i).LT.q1(i).AND. & 673 & q_zref(i).LT.qsurf(i) 674 ok_q10m_toobig(i)=q_zref(i).GT.q1(i).AND. & 675 & q_zref(i).GT.qsurf(i) 676 ok_u10m_toobig(i)=u_zref(i).GT.speed(i) 677 ! 678 IF(ok_t10m_toosmall(i).OR.ok_t10m_toobig(i)) THEN 679 n10mout(i,2)=n10mout(i,2)+1 680 ENDIF 681 IF(ok_q10m_toosmall(i).OR.ok_q10m_toobig(i)) THEN 682 n10mout(i,4)=n10mout(i,4)+1 683 ENDIF 684 IF(ok_u10m_toobig(i)) THEN 685 n10mout(i,6)=n10mout(i,6)+1 686 ENDIF 687 ! 688 IF(ok_t10m_toosmall(i).OR.ok_t10m_toobig(i).OR. & 689 & ok_q10m_toosmall(i).OR.ok_q10m_toobig(i).OR. & 690 & ok_u10m_toobig(i)) THEN 691 delm(i)=min(max(delm(i),0.),1.) 692 delh(i)=min(max(delh(i),0.),1.) 693 u_zref(i) = delm(i)*speed(i) 694 q_zref(i) = delh(i)*max(q1(i),0.0) + & 695 & max(qsurf(i),0.0)*(1-delh(i)) 696 te_zref(i) = delh(i)*tpot(i) + ts1(i)*(1-delh(i)) 697 temp(i) = te_zref(i) * (psol(i)/pref(i))**(-RKAPPA) 698 ENDIF 699 ! 700 ! 701 IF(n.EQ.ncon) THEN 702 te_zref_con(i) = te_zref(i) 703 q_zref_con(i) = q_zref(i) 704 ENDIF 705 ! 639 706 ENDDO 640 707 ! 641 ENDDO 642 ! 643 DO i = 1, knon 644 u_zref_c(i) = u_zref(i) 645 ! 646 u_10m(i) = u_zref_p(i) * ok_pred(i) + u_zref_c(i) * ok_corr(i) 647 ! 708 ENDDO 709 ! 710 DO i = 1, knon 648 711 q_zref_c(i) = q_zref(i) 649 712 temp_c(i) = temp(i) 713 ! 714 ok_pred(i)=0. 715 ok_corr(i)=1. 716 ! 650 717 t_10m(i) = temp_p(i) * ok_pred(i) + temp_c(i) * ok_corr(i) 651 718 q_10m(i) = q_zref_p(i) * ok_pred(i) + q_zref_c(i) * ok_corr(i) 652 ENDDO 653 ! 719 ! 720 u_zref_c(i) = u_zref(i) 721 u_10m(i) = u_zref_p(i) * ok_pred(i) + u_zref_c(i) * ok_corr(i) 722 ENDDO 723 ! 654 724 RETURN 655 725 END subroutine stdlevvarn
Note: See TracChangeset
for help on using the changeset viewer.