Changeset 4424
- Timestamp:
- Feb 9, 2023, 12:11:13 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/lscp_mod.F90
r4420 r4424 241 241 242 242 LOGICAL lognormale(klon) 243 LOGICAL convergence(klon)243 LOGICAL keepgoing(klon) 244 244 LOGICAL,SAVE :: appel1er 245 245 !$OMP THREADPRIVATE(appel1er) … … 501 501 zq(i) = zq(i) - (zrfln(i)+zifln(i)-zrfl(i)-zifl(i)) & 502 502 * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime 503 504 ! precip thermalization505 503 zmqc(i) = zmqc(i) + (zrfln(i)+zifln(i)-zrfl(i)-zifl(i)) & 506 504 * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime … … 604 602 605 603 ! P2.1> With the PDFs (log-normal, bigaussian) 606 ! cloud propert ues calculation with the initial values of t and q604 ! cloud properties calculation with the initial values of t and q 607 605 ! ---------------------------------------------------------------- 608 606 … … 684 682 ! Treatment of non-boundary layer clouds (lognormale) 685 683 ! condensation with qsat(T) variation (adaptation) 686 ! Iterative Loop to converge towards qsat 687 684 ! Iterative resolution to converge towards qsat 685 ! with update of temperature, ice fraction and qsat at 686 ! each iteration 687 688 ! todoan -> sensitivity to iflag_fisrtilp_qsat 688 689 DO iter=1,iflag_fisrtilp_qsat+1 689 690 690 691 DO i=1,klon 691 692 692 ! convergence = .true. until whenconvergence is not satisfied693 convergence(i)=ABS(DT(i)).GT.DDT0694 695 IF (( convergence(i) .OR. (n_i(i) .EQ. 0)) .AND. lognormale(i)) THEN693 ! keepgoing = .true. while convergence is not satisfied 694 keepgoing(i)=ABS(DT(i)).GT.DDT0 695 696 IF ((keepgoing(i) .OR. (n_i(i) .EQ. 0)) .AND. lognormale(i)) THEN 696 697 697 698 ! if not convergence: … … 705 706 !--------------------------------------------------------------- 706 707 707 ! new temperature :708 ! new temperature that only serves in the iteration process: 708 709 Tbef(i)=Tbef(i)+DT(i) 709 710 … … 722 723 CALL icefrac_lscp(klon, zt(:),pplay(:,k)/paprs(:,1),zfice(:),dzfice(:)) 723 724 724 DO i=1,klon 725 726 IF (( convergence(i) .OR. (n_i(i) .EQ. 0)) .AND. lognormale(i)) THEN725 DO i=1,klon !todoan : check if loop in i is needed 726 727 IF ((keepgoing(i) .OR. (n_i(i) .EQ. 0)) .AND. lognormale(i)) THEN 727 728 728 729 zpdf_sig(i)=ratqs(i,k)*zq(i) … … 738 739 zpdf_e2(i)=1.-erf(zpdf_e2(i)) 739 740 740 !--ice sursaturation by Audran741 741 IF ((.NOT.ok_ice_sursat).OR.(Tbef(i).GT.t_glace_min)) THEN 742 742 … … 754 754 qss(i,k)=0.0 !--idem 755 755 756 ELSE756 ELSE ! in case of ice supersaturation by Audran 757 757 758 758 !------------------------------------ … … 793 793 -(RLSTT-RLVTT)/RCPD/(1.0+RVTMP2*(zq(i)+zmqc(i)))*rneb(i,k) & 794 794 *qlbef(i)*dzfice(i) 795 ! here we update a provisory temperature variable that only serves in the iteration 796 ! process 795 797 DT(i)=num/denom 796 798 n_i(i)=n_i(i)+1 797 799 798 ENDIF ! end convergence800 ENDIF ! end keepgoing 799 801 800 802 ENDDO ! end loop on i … … 879 881 880 882 DO i=1, klon 881 tot_znebn(i) = 1 - (1-tot_zneb(i))*(1 - max(rneb(i,k),zneb(i))) &882 /(1 -min(zneb(i),1-smallestreal))883 tot_znebn(i) = 1. - (1.-tot_zneb(i))*(1 - max(rneb(i,k),zneb(i))) & 884 /(1.-min(zneb(i),1.-smallestreal)) 883 885 d_tot_zneb(i) = tot_znebn(i) - tot_zneb(i) 884 886 tot_zneb(i) = tot_znebn(i) … … 887 889 !1) Cloudy to clear air 888 890 d_znebprecip_cld_clr(i) = znebprecipcld(i) - min(rneb(i,k),znebprecipcld(i)) 889 IF (znebprecipcld(i) .GT. 0 ) THEN891 IF (znebprecipcld(i) .GT. 0.) THEN 890 892 d_zrfl_cld_clr(i) = d_znebprecip_cld_clr(i)/znebprecipcld(i)*zrflcld(i) 891 893 d_zifl_cld_clr(i) = d_znebprecip_cld_clr(i)/znebprecipcld(i)*ziflcld(i)
Note: See TracChangeset
for help on using the changeset viewer.