Changeset 4424


Ignore:
Timestamp:
Feb 9, 2023, 12:11:13 PM (15 months ago)
Author:
evignon
Message:

! commentaire + renommage de variables dans lscp_mod suite a
l'atelier nuages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/lscp_mod.F90

    r4420 r4424  
    241241
    242242  LOGICAL lognormale(klon)
    243   LOGICAL convergence(klon)
     243  LOGICAL keepgoing(klon)
    244244  LOGICAL,SAVE :: appel1er
    245245  !$OMP THREADPRIVATE(appel1er)
     
    501501                zq(i) = zq(i) - (zrfln(i)+zifln(i)-zrfl(i)-zifl(i)) &
    502502                * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime
    503 
    504                 ! precip thermalization
    505503                zmqc(i) = zmqc(i) + (zrfln(i)+zifln(i)-zrfl(i)-zifl(i)) &
    506504                * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime
     
    604602
    605603        ! P2.1> With the PDFs (log-normal, bigaussian)
    606         ! cloud propertues calculation with the initial values of t and q
     604        ! cloud properties calculation with the initial values of t and q
    607605        ! ----------------------------------------------------------------
    608606
     
    684682        ! Treatment of non-boundary layer clouds (lognormale)
    685683        ! 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
    688689        DO iter=1,iflag_fisrtilp_qsat+1
    689690
    690691                DO i=1,klon
    691692
    692                     ! convergence = .true. until when convergence is not satisfied
    693                     convergence(i)=ABS(DT(i)).GT.DDT0
    694 
    695                     IF ((convergence(i) .OR. (n_i(i) .EQ. 0)) .AND. lognormale(i)) THEN
     693                    ! 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
    696697
    697698                        ! if not convergence:
     
    705706                        !---------------------------------------------------------------
    706707
    707                         ! new temperature:
     708                        ! new temperature that only serves in the iteration process:
    708709                        Tbef(i)=Tbef(i)+DT(i)
    709710
     
    722723                  CALL icefrac_lscp(klon, zt(:),pplay(:,k)/paprs(:,1),zfice(:),dzfice(:))
    723724
    724                   DO i=1,klon
    725 
    726                       IF ((convergence(i) .OR. (n_i(i) .EQ. 0)) .AND. lognormale(i)) THEN
     725                  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
    727728
    728729                        zpdf_sig(i)=ratqs(i,k)*zq(i)
     
    738739                        zpdf_e2(i)=1.-erf(zpdf_e2(i))
    739740
    740                         !--ice sursaturation by Audran
    741741                        IF ((.NOT.ok_ice_sursat).OR.(Tbef(i).GT.t_glace_min)) THEN
    742742
     
    754754                          qss(i,k)=0.0      !--idem
    755755
    756                         ELSE
     756                       ELSE ! in case of ice supersaturation by Audran
    757757
    758758                        !------------------------------------
     
    793793                              -(RLSTT-RLVTT)/RCPD/(1.0+RVTMP2*(zq(i)+zmqc(i)))*rneb(i,k)      &
    794794                              *qlbef(i)*dzfice(i)
     795                        ! here we update a provisory temperature variable that only serves in the iteration
     796                        ! process
    795797                        DT(i)=num/denom
    796798                        n_i(i)=n_i(i)+1
    797799
    798                     ENDIF ! end convergence
     800                    ENDIF ! end keepgoing
    799801
    800802                ENDDO     ! end loop on i
     
    879881       
    880882        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))
    883885                d_tot_zneb(i) = tot_znebn(i) - tot_zneb(i)
    884886                tot_zneb(i) = tot_znebn(i)
     
    887889                !1) Cloudy to clear air
    888890                d_znebprecip_cld_clr(i) = znebprecipcld(i) - min(rneb(i,k),znebprecipcld(i))
    889                 IF (znebprecipcld(i) .GT. 0) THEN
     891                IF (znebprecipcld(i) .GT. 0.) THEN
    890892                        d_zrfl_cld_clr(i) = d_znebprecip_cld_clr(i)/znebprecipcld(i)*zrflcld(i)
    891893                        d_zifl_cld_clr(i) = d_znebprecip_cld_clr(i)/znebprecipcld(i)*ziflcld(i)
Note: See TracChangeset for help on using the changeset viewer.