Changeset 5443
- Timestamp:
- Dec 21, 2024, 6:11:15 PM (13 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/lmdz_lscp.f90
r5440 r5443 268 268 REAL, DIMENSION(klon,klev) :: ctot 269 269 REAL, DIMENSION(klon,klev) :: ctot_vol 270 REAL, DIMENSION(klon) :: zqs, zdqs 270 REAL, DIMENSION(klon) :: zqs, zdqs, zqsl, zdqsl, zqsi, zdqsi 271 271 REAL :: zdelta 272 272 REAL, DIMENSION(klon) :: zdqsdT_raw … … 278 278 REAL, DIMENSION(klon) :: qcloud, qincloud_mpc 279 279 REAL, DIMENSION(klon) :: zrfl, zifl 280 REAL, DIMENSION(klon) :: zoliq, zcond, zq, zqn 280 REAL, DIMENSION(klon) :: zoliq, zcond, zq, zqn, zqnl 281 281 REAL, DIMENSION(klon) :: zoliql, zoliqi 282 282 REAL, DIMENSION(klon) :: zt 283 REAL, DIMENSION(klon) :: zfice,zneb 283 REAL, DIMENSION(klon) :: zfice,zneb, znebl 284 284 REAL, DIMENSION(klon) :: dzfice 285 285 REAL, DIMENSION(klon) :: zfice_turb, dzfice_turb … … 306 306 307 307 ! for condensation and ice supersaturation 308 REAL, DIMENSION(klon) :: qvc, shear308 REAL, DIMENSION(klon) :: qvc, qvcl, shear 309 309 REAL :: delta_z 310 310 !--Added for ice supersaturation (ok_ice_supersat) and contrails (ok_plane_contrails) … … 377 377 rain(:) = 0.0 378 378 snow(:) = 0.0 379 zfice(:)= 0.0379 zfice(:)=1.0 ! initialized at 1 as by default we assume mpc to be at ice saturation 380 380 dzfice(:)=0.0 381 381 zfice_turb(:)=0.0 … … 668 668 ! Calculation of saturation specific humidity and ice fraction 669 669 CALL calc_qsat_ecmwf(klon,Tbef,qtot,pplay(:,k),RTT,0,.false.,zqs,zdqs) 670 671 IF (iflag_icefrac .GE. 3) THEN 672 ! consider a ice weighted qs to ensure that liquid clouds at T<0 have a consistent cloud fraction 673 ! and cloud condensed water content. idea following Dietlitcher et al. 2018, GMD 674 ! we make this option works only for the physically-based and tke-depdenent param (iflag_icefrac>=1) 675 DO i=1,klon 676 CALL calc_qsat_ecmwf(klon,Tbef,qtot,pplay(:,k),RTT,1,.false.,zqsl,zdqsl) 677 CALL calc_qsat_ecmwf(klon,Tbef,qtot,pplay(:,k),RTT,2,.false.,zqsi,zdqsi) 678 zqs(i)=zfice(i)*zqsi(i)+(1.-zfice(i))*zqsl(i) 679 zdqs(i)=zfice(i)*zdqsi(i)+zqsi(i)*dzfice(i)+(1.-zfice(i))*zdqsl(i)-zqsl(i)*dzfice(i) 680 ENDDO 681 ENDIF 682 670 683 CALL calc_gammasat(klon,Tbef,qtot,pplay(:,k),gammasat,dgammasatdt) 671 684 ! saturation may occur at a humidity different from qsat (gamma qsat), so gamma correction for dqs 672 685 zdqs(:) = gammasat(:)*zdqs(:)+zqs(:)*dgammasatdt(:) 673 ! cloud phase determination 674 IF (iflag_t_glace.GE.4) THEN 675 ! For iflag_t_glace GE 4 the phase partition function dependends on temperature AND distance to cloud top 676 CALL distance_to_cloud_top(klon,klev,k,temp,pplay,paprs,rneb,zdistcltop,ztemp_cltop) 677 ENDIF 678 679 CALL icefrac_lscp(klon, zt, iflag_ice_thermo, zdistcltop,ztemp_cltop,zfice,dzfice) 680 686 687 ! Cloud condensation based on subgrid pdf 681 688 !--AB Activates a condensation scheme that allows for 682 689 !--ice supersaturation and contrails evolution from aviation … … 733 740 ENDIF ! .NOT. ok_ice_supersat 734 741 742 ! cloud phase determination 743 IF (iflag_icefrac .GE. 2) THEN 744 ! phase partitioning depending on temperature. activates here in the iteration process if iflag_icefrac > 2 745 CALL icefrac_lscp_turb(klon, dtime, Tbef, pplay(:,k), paprs(:,k), paprs(:,k+1), omega(:,k), qice_ini, ziflcld, zqn, & 746 rneb(:,k), tke(:,k), tke_dissip(:,k), zqliq, zqvapcl, zqice, zfice, dzfice, cldfraliq(:,k),sigma2_icefracturb(:,k), mean_icefracturb(:,k)) 747 ELSE 748 ! phase partitioning depending on temperature and eventually distance to cloud top 749 IF (iflag_t_glace.GE.4) THEN 750 ! For iflag_t_glace GE 4 the phase partition function dependends on temperature AND distance to cloud top 751 CALL distance_to_cloud_top(klon,klev,k,temp,pplay,paprs,rneb,zdistcltop,ztemp_cltop) 752 ENDIF 753 CALL icefrac_lscp(klon, zt, iflag_ice_thermo, zdistcltop,ztemp_cltop,zfice,dzfice) 754 ENDIF 755 756 735 757 DO i=1,klon 736 758 IF (keepgoing(i)) THEN … … 756 778 ENDIF 757 779 758 ! LEA_R : check formule759 780 IF ( ok_unadjusted_clouds ) THEN 760 781 !--AB We relax the saturation adjustment assumption … … 796 817 797 818 819 ! Cloud phase final determination 820 !-------------------------------- 798 821 ! For iflag_t_glace GE 4 the phase partition function dependends on temperature AND distance to cloud top 799 822 IF (iflag_t_glace.GE.4) THEN … … 802 825 temp_cltop(:,k)=ztemp_cltop(:) 803 826 ENDIF 804 805 ! Partition function depending on temperature 827 ! Partition function depending on temperature for all clouds (shallow convective and stratiform) 806 828 CALL icefrac_lscp(klon, zt, iflag_ice_thermo, zdistcltop, ztemp_cltop, zfice, dzfice) 807 829 808 ! Partition function depending on tke for non shallow-convective clouds 830 ! Partition function depending on tke for non shallow-convective clouds, erase previous estimation 809 831 IF (iflag_icefrac .GE. 1) THEN 810 832 CALL icefrac_lscp_turb(klon, dtime, Tbef, pplay(:,k), paprs(:,k), paprs(:,k+1), omega(:,k), qice_ini, ziflcld, zqn, & … … 812 834 ENDIF 813 835 814 ! Water vapor update, Phase determination and subsequent latent heat exchange 836 ! Water vapor update, subsequent latent heat exchange for each cloud type 837 !------------------------------------------------------------------------ 815 838 DO i=1, klon 816 839 ! Overwrite phase partitioning in boundary layer mixed phase clouds when the … … 855 878 IF (lognormale(i)) THEN 856 879 zcond(i) = zqliq(i) + zqice(i) 857 zfice(i) =zfice_turb(i)880 zfice(i) = zfice_turb(i) 858 881 rhcl(i,k) = zqvapcl(i) * rneb(i,k) + (zq(i) - zqn(i)) * (1.-rneb(i,k)) 859 882 ENDIF … … 865 888 866 889 ENDIF 867 868 ! c_iso : routine that computes in-cloud supersaturation 869 ! c_iso condensation of isotopes (zcond, zsursat, zfice, zq in input) 870 890 891 871 892 ! temperature update due to phase change 872 893 zt(i) = zt(i) + (1.-zfice(i))*zcond(i) & … … 896 917 zoliql(i) = zcond(i) * ( 1. - zfice(i) ) 897 918 zoliqi(i) = zcond(i) * zfice(i) 898 ! c_iso : initialisation of zoliq* also for isotopes899 919 ENDDO 900 920 … … 985 1005 986 1006 zfrac_lessi = 1. - EXP(zalpha_tr*zprec_cond(i)/MAX(rneb(i,k),seuil_neb)) 987 frac_nucl(i,k)= 1.- zneb(i)*zfrac_lessi1007 frac_nucl(i,k)= 1.-MAX(rneb(i,k),seuil_neb)*zfrac_lessi 988 1008 989 1009 ! Nucleation with a factor of -1 instead of -0.5 … … 1008 1028 ENDIF 1009 1029 1010 zfrac_lessi = 1. - EXP(zalpha_tr*zprec_cond(i)/ zneb(i))1011 frac_impa(i,kk)= 1.- zneb(i)*zfrac_lessi1030 zfrac_lessi = 1. - EXP(zalpha_tr*zprec_cond(i)/MAX(rneb(i,k),seuil_neb)) 1031 frac_impa(i,kk)= 1.-MAX(rneb(i,k),seuil_neb)*zfrac_lessi 1012 1032 1013 1033 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.