Changeset 5412 for LMDZ6


Ignore:
Timestamp:
Dec 16, 2024, 5:54:52 PM (5 hours ago)
Author:
evignon
Message:

mise sous flag d'un bug sur la phase des nuages dans lscp
identifie par A. Borella

Location:
LMDZ6/trunk/libf/phylmd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/lmdz_lscp.f90

    r5411 r5412  
    119119USE lmdz_lscp_ini, ONLY : iflag_autoconversion, ffallv_con, ffallv_lsc, min_frac_th_cld
    120120USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG
    121 USE lmdz_lscp_ini, ONLY : ok_poprecip
     121USE lmdz_lscp_ini, ONLY : ok_poprecip, ok_bug_phase_lscp
    122122USE lmdz_lscp_ini, ONLY : ok_ice_supersat, ok_unadjusted_clouds, iflag_icefrac
    123123
     
    11731173               ! Note that compared to fisrtilp, we always assume iflag_bergeron=2
    11741174
     1175               IF (ok_bug_phase_lscp) THEN
    11751176                    zqpreci(i)=(zcond(i)-zoliq(i))*zfice(i)
    11761177                    zqprecl(i)=(zcond(i)-zoliq(i))*(1.-zfice(i))
     1178               ELSE
     1179                    zqpreci(i)=zcond(i)*zfice(i)-zoliqi(i)
     1180                    zqprecl(i)=zcond(i)*(1.-zfice(i))-zoliql(i)
     1181               ENDIF
    11771182                    zcp=RCPD*(1.0+RVTMP2*(zq(i)+zmqc(i)+zcond(i)))
    11781183                    coef1 = rneb(i,k)*RLSTT/zcp*zdqsdT_raw(i)
     
    12651270        DO i=1,klon
    12661271           IF (ziflprev(i) .NE. 0.0) THEN
    1267               radocondi(i,k)=zoliq(i)*zfice(i)+zqpreci(i)+ziflprev(i)/zrho(i,k+1)/velo(i,k+1)
     1272              radocondi(i,k)=zoliqi(i)+zqpreci(i)+ziflprev(i)/zrho(i,k+1)/velo(i,k+1)
    12681273           ELSE
    1269               radocondi(i,k)=zoliq(i)*zfice(i)+zqpreci(i)
     1274              radocondi(i,k)=zoliqi(i)+zqpreci(i)
    12701275           ENDIF
    12711276           radocond(i,k)=radocondl(i,k)+radocondi(i,k)
     
    13751380        subfra(i,k) = 1. - cf_seri(i,k) - issrfra(i,k)
    13761381        qsub(i,k) = zq(i) - qvc(i) - qissr(i,k)
    1377         qcld(i,k) = qvc(i) + zfice(i) * zoliq(i)
     1382        qcld(i,k) = qvc(i) + zoliq(i)
    13781383      ENDDO
    13791384    ENDIF
     
    13891394        pfraclr(i,k)=znebprecipclr(i)
    13901395        pfracld(i,k)=znebprecipcld(i)
    1391         d_ql(i,k) = (1-zfice(i))*zoliq(i)
    1392         d_qi(i,k) = zfice(i)*zoliq(i)
    13931396        d_q(i,k) = zq(i) - qt(i,k)
    1394         ! c_iso: same for isotopes
    13951397        d_t(i,k) = zt(i) - temp(i,k)
     1398
     1399        IF (ok_bug_phase_lscp) THEN
     1400           d_ql(i,k) = (1-zfice(i))*zoliq(i)
     1401           d_qi(i,k) = zfice(i)*zoliq(i)
     1402        ELSE
     1403           d_ql(i,k) = zoliql(i)
     1404           d_qi(i,k) = zoliqi(i)   
     1405        ENDIF
     1406
    13961407    ENDDO
    13971408
  • LMDZ6/trunk/libf/phylmd/lmdz_lscp_ini.f90

    r5406 r5412  
    9191  !$OMP THREADPRIVATE(iflag_autoconversion)
    9292
     93  LOGICAL, SAVE, PROTECTED :: ok_bug_phase_lscp=.true.      ! bug on phase partitioning after precipitation processes
     94  !$OMP THREADPRIVATE(ok_bug_phase_lscp)
    9395
    9496  LOGICAL, SAVE, PROTECTED :: reevap_ice=.false.            ! no liquid precip for T< threshold
     
    383385    CALL getin_p('iflag_oldbug_fisrtilp',iflag_oldbug_fisrtilp)
    384386    CALL getin_p('temp_nowater',temp_nowater)
     387    CALL getin_p('ok_bug_phase_lscp',ok_bug_phase_lscp)
    385388    ! for poprecip
    386389    CALL getin_p('ok_poprecip',ok_poprecip)
     
    468471    WRITE(lunout,*) 'lscp_ini, fl_cor_ebil', fl_cor_ebil
    469472    WRITE(lunout,*) 'lscp_ini, temp_nowater', temp_nowater
     473    WRITE(lunout,*) 'lscp_ini, ok_bug_phase_lscp', ok_bug_phase_lscp
    470474    ! for poprecip
    471475    WRITE(lunout,*) 'lscp_ini, ok_poprecip', ok_poprecip
Note: See TracChangeset for help on using the changeset viewer.