Changeset 5609
- Timestamp:
- Apr 13, 2025, 7:10:19 PM (8 weeks ago)
- Location:
- LMDZ6/branches/contrails
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/contrails/DefLists/field_def_lmdz.xml
r5601 r5609 678 678 <field id="tke_max_sic" long_name="Max Turb. Kinetic Energy sic" unit="m2/s2" operation="maximum"/> 679 679 680 <field id="qrain_lsc" long_name="LS specific rain content" unit="kg/kg" />681 <field id="qsnow_lsc" long_name="LS specific snow content" unit="kg/kg" />682 <field id="dqreva" long_name="LS rain tendency due to evaporation" unit="kg/kg/s" />683 <field id="dqssub" long_name="LS snow tendency due to sublimation" unit="kg/kg/s" />684 <field id="dqrauto" long_name="LS rain tendency due to autoconversion" unit="kg/kg/s" />685 <field id="dqrcol" long_name="LS rain tendency due to collection" unit="kg/kg/s" />686 <field id="dqrmelt" long_name="LS rain tendency due to melting" unit="kg/kg/s" />687 <field id="dqrfreez" long_name="LS rain tendency due to freezing" unit="kg/kg/s" />688 <field id="dqsauto" long_name="LS snow tendency due to autoconversion" unit="kg/kg/s" />689 <field id="dqsagg" long_name="LS snow tendency due to aggregation" unit="kg/kg/s" />690 <field id="dqsrim" long_name="LS snow tendency due to riming" unit="kg/kg/s" />691 <field id="dqsmelt" long_name="LS snow tendency due to melting" unit="kg/kg/s" />692 <field id="dqsfreez" long_name="LS snow tendency due to freezing" unit="kg/kg/s" />693 694 680 <field id="l_mix_ter" long_name="PBL mixing length ter" unit="m" /> 695 681 <field id="l_mix_lic" long_name="PBL mixing length lic" unit="m" /> … … 909 895 <field id="dcfcon" long_name="Condensation cloud fraction tendency" unit="s-1" /> 910 896 <field id="dcfmix" long_name="Cloud mixing cloud fraction tendency" unit="s-1" /> 897 <field id="dcfsed" long_name="Sedimentation cloud fraction tendency" unit="s-1" /> 911 898 <field id="dqiadj" long_name="Temperature adjustment ice tendency" unit="kg/kg/s" /> 912 899 <field id="dqisub" long_name="Sublimation ice tendency" unit="kg/kg/s" /> 913 900 <field id="dqicon" long_name="Condensation ice tendency" unit="kg/kg/s" /> 914 901 <field id="dqimix" long_name="Cloud mixing ice tendency" unit="kg/kg/s" /> 902 <field id="dqised" long_name="Sedimentation ice tendency" unit="kg/kg/s" /> 915 903 <field id="dqvcadj" long_name="Temperature adjustment cloudy water vapor tendency" unit="kg/kg/s" /> 916 904 <field id="dqvcsub" long_name="Sublimation cloudy water vapor tendency" unit="kg/kg/s" /> 917 905 <field id="dqvccon" long_name="Condensation cloudy water vapor tendency" unit="kg/kg/s" /> 918 906 <field id="dqvcmix" long_name="Cloud mixing cloudy water vapor tendency" unit="kg/kg/s" /> 907 <field id="dqvcsed" long_name="Sedimentation cloudy water vapor tendency" unit="kg/kg/s" /> 919 908 <field id="qsatl" long_name="Saturation with respect to liquid" unit="kg/kg" /> 920 909 <field id="qsati" long_name="Saturation with respect to ice" unit="kg/kg" /> 921 910 922 <field id="cfaseri" long_name="Linear contrail fraction" unit="-" /> 923 <field id="dcfadyn" long_name="Dynamics linear contrail fraction tendency" unit="s-1" /> 924 <field id="qtaseri" long_name="Linear contrail total specific humidity" unit="s-1" /> 925 <field id="dqtadyn" long_name="Dynamics linear contrail total specific humidity tendency" unit="kg/kg/s" /> 926 <field id="Tcritcont" long_name="Temperature threshold for contrail formation" unit="K" /> 927 <field id="qcritcont" long_name="Specific humidity threshold for contrail formation" unit="kg/kg" /> 911 <field id="cfaseri" long_name="Linear contrail fraction" unit="-" /> 912 <field id="dcfadyn" long_name="Dynamics linear contrail fraction tendency" unit="s-1" /> 913 <field id="pcfseri" long_name="Contrail induced cirrus fraction" unit="-" /> 914 <field id="dpcfdyn" long_name="Dynamics contrail induced cirrus fraction tendency" unit="s-1" /> 915 <field id="qvaseri" long_name="Linear contrail vapor specific humidity" unit="kg/kg" /> 916 <field id="dqvadyn" long_name="Dynamics linear contrail vapor specific humidity tendency" unit="kg/kg/s" /> 917 <field id="qiaseri" long_name="Linear contrail ice specific humidity" unit="kg/kg" /> 918 <field id="dqiadyn" long_name="Dynamics linear contrail ice specific humidity tendency" unit="kg/kg/s" /> 919 <field id="Tcritcont" long_name="Temperature threshold for contrail formation" unit="K" /> 920 <field id="qcritcont" long_name="Specific humidity threshold for contrail formation" unit="kg/kg" /> 928 921 <field id="potcontfraP" long_name="Fraction with pontential persistent contrail" unit="-" /> 929 922 <field id="potcontfraNP" long_name="Fraction with potential non-persistent contrail" unit="-" /> 930 <field id="qice_ cont" long_name="Contrails ice specific humidity" unit="kg/kg" />923 <field id="qice_perscont" long_name="Contrail induced cirrus ice specific humidity" unit="kg/kg" /> 931 924 <field id="dcfaini" long_name="Initial formation linear contrail fraction tendency" unit="s-1" /> 932 925 <field id="dqiaini" long_name="Initial formation linear contrail ice specific humidity tendency" unit="kg/kg/s" /> -
LMDZ6/branches/contrails/libf/dyn3d_common/infotrac.f90
r5536 r5609 266 266 !--------------------------------------------------------------------------------------------------------------------------- 267 267 nqtrue = SIZE(tracers) !--- "true" tracers 268 nqo = COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%name) == 'H2O') !--- Water phases 269 nbtr = nqtrue-COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%gen0Name) == 'H2O') !--- Passed to phytrac 268 ! nqo = COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%name) == 'H2O') !--- Water phases 269 nqo = COUNT(tracers(:)%component == 'lmdz' .AND. & 270 ((delPhase(tracers(:)%name) == 'H2O') .OR. & !--- Water phases 271 (delPhase(tracers(:)%name) == 'CLDFRA'))) 272 ! nbtr = nqtrue-COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%gen0Name) == 'H2O') !--- Passed to phytrac 273 nbtr = nqtrue-COUNT(tracers(:)%component == 'lmdz' .AND. & 274 ((delPhase(tracers(:)%gen0Name) == 'H2O') .OR. & !--- Passed to phytrac 275 (delPhase(tracers(:)%gen0Name) == 'CLDFRA'))) 270 276 nqCO2 = COUNT( [type_trac == 'inco', type_trac == 'co2i'] ) 271 277 IF (CPPKEY_INCA) THEN … … 335 341 t1%iadv = iad 336 342 t1%isAdvected = iad >= 0 337 t1%isInPhysics= delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz' !=== MORE EXCEPTIONS ? CO2i, SURSAT CLOUD H2O 343 ! t1%isInPhysics= delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz' !=== MORE EXCEPTIONS ? CO2i, SURSAT CLOUD H2O 344 t1%isInPhysics=((delPhase(t1%gen0Name) /= 'H2O') .AND. & 345 (delPhase(t1%gen0Name) /= 'CLDFRA')) .OR. t1%component /= 'lmdz' 338 346 ttr(iq) = t1 339 347 … … 388 396 389 397 !--- Note: nqtottr can differ from nbtr when nmom/=0 390 nqtottr = nqtot - COUNT(delPhase(tracers%gen0Name) == 'H2O' .AND. tracers%component == 'lmdz') 391 IF(COUNT(tracers%iso_iName == 0) - COUNT(delPhase(tracers%name) == 'H2O' .AND. tracers%component == 'lmdz') /= nqtottr) & 392 CALL abort_gcm(modname, 'problem with the computation of nqtottr', 1) 398 ! nqtottr = nqtot - COUNT(delPhase(tracers%gen0Name) == 'H2O' .AND. tracers%component == 'lmdz') 399 nqtottr = nqtot - COUNT(tracers(:)%component == 'lmdz' .AND. & 400 ((delPhase(tracers(:)%gen0Name) == 'H2O') .OR. & 401 (delPhase(tracers(:)%gen0Name) == 'CLDFRA'))) 402 ! IF(COUNT(tracers%iso_iName == 0) - COUNT(delPhase(tracers%name) == 'H2O' .AND. tracers%component == 'lmdz') /= nqtottr) & 403 ! IF(COUNT(tracers%iso_iName == 0) - COUNT(tracers(:)%component == 'lmdz' .AND. & 404 ! ((delPhase(tracers(:)%name) == 'H2O') .OR. & 405 ! (delPhase(tracers(:)%name) == 'CLDFRA') /= nqtottr) & 406 ! CALL abort_gcm(modname, 'problem with the computation of nqtottr', 1) 393 407 394 408 !=== DISPLAY THE RESULTS -
LMDZ6/branches/contrails/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.f90
r5601 r5609 44 44 solsw, solswfdiff, radsol, t_ancien, wake_deltat, wake_s, rain_fall, qsol, z0h, & 45 45 sollw,sollwdown, rugoro, q_ancien, wake_deltaq, wake_pe, snow_fall, ratqs,w01, & 46 sig1, ftsol, c lwcon, fm_therm, wake_Cstar, pctsrf, entr_therm,radpas, f0,&46 sig1, ftsol, cwcon, clwcon, fm_therm, wake_Cstar, pctsrf, entr_therm,radpas, f0,& 47 47 zmax0,fevap, rnebcon,falb_dir, falb_dif, wake_fip, agesno, detr_therm, pbl_tke, & 48 48 phys_state_var_init, ql_ancien, qs_ancien, prlw_ancien, prsw_ancien, & … … 50 50 ale_bl, ale_bl_trig, alp_bl, & 51 51 ale_wake, ale_bl_stat, AWAKE_S, & 52 cf_ancien, qvc_ancien, cfa_ancien, qta_ancien52 cf_ancien, qvc_ancien, cfa_ancien, pcf_ancien, qva_ancien, qia_ancien 53 53 54 54 USE comconst_mod, ONLY: pi, dtvr … … 243 243 cf_ancien = 0. 244 244 qvc_ancien = 0. 245 cwcon = 0. 245 246 cfa_ancien = 0. 246 qta_ancien = 0. 247 pcf_ancien = 0. 248 qva_ancien = 0. 249 qia_ancien = 0. 247 250 248 251 z0m(:,:)=0 ! ym missing 5th subsurface initialization -
LMDZ6/branches/contrails/libf/misc/readTracFiles_mod.f90
r5601 r5609 63 63 LOGICAL :: isAdvected = .FALSE. !--- "true" tracers: iadv > 0. COUNT(isAdvected )=nqtrue 64 64 LOGICAL :: isInPhysics = .TRUE. !--- "true" tracers: in tr_seri. COUNT(isInPhysics)=nqtottr 65 INTEGER :: iso_iGroup = 0!--- Isotopes group index in isotopes(:)65 INTEGER :: iso_iGroup = -1 !--- Isotopes group index in isotopes(:) 66 66 INTEGER :: iso_iName = 0 !--- Isotope name index in isotopes(iso_iGroup)%trac(:) 67 67 INTEGER :: iso_iZone = 0 !--- Isotope zone index in isotopes(iso_iGroup)%zone(:) … … 122 122 !--- SOME PARAMETERS THAT ARE NOT LIKELY TO CHANGE OFTEN 123 123 CHARACTER(LEN=maxlen), SAVE :: tran0 = 'air' !--- Default transporting fluid 124 CHARACTER(LEN=maxlen), PARAMETER :: old_phases = 'vlib fcaq'!--- Old phases for water (no separator)125 CHARACTER(LEN=maxlen), PARAMETER :: known_phases = 'glsb fcaq'!--- Known phases initials124 CHARACTER(LEN=maxlen), PARAMETER :: old_phases = 'vlib' !--- Old phases for water (no separator) 125 CHARACTER(LEN=maxlen), PARAMETER :: known_phases = 'glsb' !--- Known phases initials 126 126 INTEGER, PARAMETER :: nphases = LEN_TRIM(known_phases) !--- Number of phases 127 127 CHARACTER(LEN=maxlen), SAVE :: phases_names(nphases) & !--- Known phases names 128 = ['gaseous ', 'liquid ', 'solid ','blownSnow' , 'fracCloud', 'cldVapor ', 'aviContra', 'qtContra ']128 = ['gaseous ', 'liquid ', 'solid ','blownSnow'] 129 129 CHARACTER(LEN=1), SAVE :: phases_sep = '_' !--- Phase separator 130 130 CHARACTER(LEN=maxlen), SAVE :: isoFile = 'isotopes_params.def'!--- Name of the isotopes parameters file -
LMDZ6/branches/contrails/libf/phylmd/create_etat0_unstruct_mod.f90
r5601 r5609 260 260 cf_ancien = 0. 261 261 qvc_ancien = 0. 262 cwcon = 0. 262 263 263 264 wake_delta_pbl_TKE(:,:,:)=0 -
LMDZ6/branches/contrails/libf/phylmd/dyn1d/old_lmdz1d.f90
r5601 r5609 10 10 USE ioipsl, only: ju2ymds, ymds2ju, ioconf_calendar,getin 11 11 USE phys_state_var_mod, ONLY : phys_state_var_init, phys_state_var_end, & 12 c lwcon, detr_therm, &12 cwcon, clwcon, detr_therm, & 13 13 qsol, fevap, z0m, z0h, agesno, & 14 14 du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, & … … 23 23 zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, & 24 24 ql_ancien, qs_ancien, qbs_ancien, & 25 cf_ancien, qvc_ancien, cfa_ancien, qta_ancien, &25 cf_ancien, qvc_ancien, cfa_ancien, pcf_ancien, qva_ancien, qia_ancien, & 26 26 prlw_ancien, prsw_ancien, prbsw_ancien, prw_ancien, & 27 27 u10m,v10m,ale_wake,ale_bl_stat … … 874 874 cf_ancien = 0. 875 875 qvc_ancien = 0. 876 cwcon = 0. 876 877 ENDIF 877 878 IF ( ok_plane_contrail ) THEN 878 879 cfa_ancien = 0. 879 qta_ancien = 0. 880 pcf_ancien = 0. 881 qva_ancien = 0. 882 qia_ancien = 0. 880 883 ENDIF 881 884 !jyg< -
LMDZ6/branches/contrails/libf/phylmd/dyn1d/scm.f90
r5601 r5609 6 6 USE ioipsl, only: ju2ymds, ymds2ju, ioconf_calendar,getin 7 7 USE phys_state_var_mod, ONLY : phys_state_var_init, phys_state_var_end, & 8 c lwcon, detr_therm, &8 cwcon, clwcon, detr_therm, & 9 9 qsol, fevap, z0m, z0h, agesno, & 10 10 du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, & … … 19 19 zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, & 20 20 ql_ancien, qs_ancien, qbs_ancien, & 21 cf_ancien, qvc_ancien, cfa_ancien, qta_ancien, &21 cf_ancien, qvc_ancien, cfa_ancien, pcf_ancien, qva_ancien, qia_ancien, & 22 22 prlw_ancien, prsw_ancien, prbsw_ancien, prw_ancien, & 23 23 u10m,v10m,ale_wake,ale_bl_stat, ratqs_inter_ … … 616 616 cf_ancien = 0. 617 617 qvc_ancien = 0. 618 cwcon = 0. 618 619 ENDIF 619 620 IF ( ok_plane_contrail ) THEN 620 621 cfa_ancien = 0. 621 qta_ancien = 0. 622 pcf_ancien = 0. 623 qva_ancien = 0. 624 qia_ancien = 0. 622 625 ENDIF 623 626 rain_fall=0. … … 820 823 ENDIF 821 824 825 ! calculation of potential temperature for the advection 826 teta=temp*(pzero/play)**rkappa 827 822 828 ! vertical tendencies computed as d X / d t = -W d X / d z 823 829 … … 829 835 d_v_vert_adv(l)=-w_adv(l)*(v(l+1)-v(l-1))/(z_adv(l+1)-z_adv(l-1)) 830 836 ! d theta / dt = -W d theta / d z, transformed into d temp / d t dividing by (pzero/play(l))**rkappa 831 d_t_vert_adv(l)=-w_adv(l)*(te mp(l+1)-temp(l-1))/(z_adv(l+1)-z_adv(l-1))837 d_t_vert_adv(l)=-w_adv(l)*(teta(l+1)-teta(l-1))/(z_adv(l+1)-z_adv(l-1)) / (pzero/play(l))**rkappa 832 838 d_q_vert_adv(l,:)=-w_adv(l)*(q(l+1,:)-q(l-1,:))/(z_adv(l+1)-z_adv(l-1)) 833 839 enddo … … 842 848 d_u_vert_adv(l)=-w_adv(l)*(u(l)-u(l-1))/(z_adv(l)-z_adv(l-1)) 843 849 d_v_vert_adv(l)=-w_adv(l)*(v(l)-v(l-1))/(z_adv(l)-z_adv(l-1)) 844 d_t_vert_adv(l)=-w_adv(l)*(temp(l)-temp(l-1))/(z_adv(l)-z_adv(l-1)) 850 ! d theta / dt = -W d theta / d z, transformed into d temp / d t dividing by (pzero/play(l))**rkappa 851 d_t_vert_adv(l)=-w_adv(l)*(teta(l)-teta(l-1))/(z_adv(l)-z_adv(l-1)) / (pzero/play(l))**rkappa 845 852 d_q_vert_adv(l,:)=-w_adv(l)*(q(l,:)-q(l-1,:))/(z_adv(l)-z_adv(l-1)) 846 853 ELSE 847 854 d_u_vert_adv(l)=-w_adv(l)*(u(l+1)-u(l))/(z_adv(l+1)-z_adv(l)) 848 855 d_v_vert_adv(l)=-w_adv(l)*(v(l+1)-v(l))/(z_adv(l+1)-z_adv(l)) 849 d_t_vert_adv(l)=-w_adv(l)*(temp(l+1)-temp(l))/(z_adv(l+1)-z_adv(l)) 856 ! d theta / dt = -W d theta / d z, transformed into d temp / d t dividing by (pzero/play(l))**rkappa 857 d_t_vert_adv(l)=-w_adv(l)*(teta(l+1)-teta(l))/(z_adv(l+1)-z_adv(l)) / (pzero/play(l))**rkappa 850 858 d_q_vert_adv(l,:)=-w_adv(l)*(q(l+1,:)-q(l,:))/(z_adv(l+1)-z_adv(l)) 851 859 ENDIF -
LMDZ6/branches/contrails/libf/phylmd/infotrac_phy.F90
r5536 r5609 293 293 !--------------------------------------------------------------------------------------------------------------------------- 294 294 nqtrue = SIZE(tracers) !--- "true" tracers 295 nqo = COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%name) == 'H2O') !--- Water phases 296 nbtr = nqtrue-COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%gen0Name) == 'H2O') !--- Passed to phytrac 295 nqo = COUNT(tracers(:)%component == 'lmdz' .AND. & 296 ((delPhase(tracers(:)%name) == 'H2O') .OR. & !--- Water phases 297 (delPhase(tracers(:)%name) == 'CLDFRA'))) 298 nbtr = nqtrue-COUNT(tracers(:)%component == 'lmdz' .AND. & 299 ((delPhase(tracers(:)%gen0Name) == 'H2O') .OR. & !--- Passed to phytrac 300 (delPhase(tracers(:)%gen0Name) == 'CLDFRA'))) 297 301 nqCO2 = COUNT( [type_trac == 'inco', type_trac == 'co2i'] ) 298 302 IF (CPPKEY_INCA) THEN … … 350 354 t1%longName = t1%name; IF(iad > 0) t1%longName=TRIM(t1%name)//descrq(iad) 351 355 t1%isAdvected = iad >= 0 352 t1%isInPhysics= delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz' !=== MORE EXCEPTIONS ? CO2i, SURSAT CLOUD H2O 356 !t1%isInPhysics= delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz' !=== MORE EXCEPTIONS ? CO2i, SURSAT CLOUD H2O 357 t1%isInPhysics=((delPhase(t1%gen0Name) /= 'H2O') .AND. & 358 (delPhase(t1%gen0Name) /= 'CLDFRA')) .OR. t1%component /= 'lmdz' 353 359 ttr(iq) = t1 354 360 … … 397 403 398 404 !--- Note: nqtottr can differ from nbtr when nmom/=0 399 nqtottr = nqtot - COUNT(delPhase(tracers%gen0Name) == 'H2O' .AND. tracers%component == 'lmdz') 400 IF(COUNT(tracers%iso_iName == 0) - COUNT(delPhase(tracers%name) == 'H2O' .AND. tracers%component == 'lmdz') /= nqtottr) & 401 CALL abort_physic(modname, 'problem with the computation of nqtottr', 1) 405 ! nqtottr = nqtot - COUNT(delPhase(tracers%gen0Name) == 'H2O' .AND. tracers%component == 'lmdz') 406 nqtottr = nqtot - COUNT(tracers(:)%component == 'lmdz' .AND. & 407 ((delPhase(tracers(:)%gen0Name) == 'H2O') .OR. & 408 (delPhase(tracers(:)%gen0Name) == 'CLDFRA'))) 409 ! IF(COUNT(tracers%iso_iName == 0) - COUNT(delPhase(tracers%name) == 'H2O' .AND. tracers%component == 'lmdz') /= nqtottr) & 410 ! IF(COUNT(tracers%iso_iName == 0) - COUNT(tracers(:)%component == 'lmdz' .AND. & 411 ! ((delPhase(tracers(:)%name) == 'H2O') .OR. & 412 ! (delPhase(tracers(:)%name) == 'CLDFRA'))) /= nqtottr) & 413 ! CALL abort_physic(modname, 'problem with the computation of nqtottr', 1) 402 414 403 415 !=== DISPLAY THE RESULTS -
LMDZ6/branches/contrails/libf/phylmd/lmdz_aviation.f90
r5602 r5609 73 73 SUBROUTINE contrails_formation( & 74 74 klon, dtime, pplay, temp, qsat, qsatl, gamma_cond, flight_dist, & 75 clrfra, pdf_loc, pdf_scale, pdf_alpha, keepgoing, &75 clrfra, qclr, pdf_scale, pdf_alpha, pdf_gamma, keepgoing, pt_pron_clds, & 76 76 Tcritcont, qcritcont, potcontfraP, potcontfraNP, & 77 77 dcfa_ini, dqia_ini, dqta_ini) … … 97 97 REAL, INTENT(IN) , DIMENSION(klon) :: flight_dist ! aviation distance flown concentration [m/s/m3] 98 98 REAL, INTENT(IN) , DIMENSION(klon) :: clrfra ! clear sky fraction [-] 99 REAL, INTENT(IN) , DIMENSION(klon) :: pdf_loc ! location parameter of the clear sky PDF [%]99 REAL, INTENT(IN) , DIMENSION(klon) :: qclr ! clear sky specific humidity [kg/kg] 100 100 REAL, INTENT(IN) , DIMENSION(klon) :: pdf_scale ! scale parameter of the clear sky PDF [%] 101 101 REAL, INTENT(IN) , DIMENSION(klon) :: pdf_alpha ! shape parameter of the clear sky PDF [-] 102 REAL, INTENT(IN) , DIMENSION(klon) :: pdf_gamma ! tmp parameter of the clear sky PDF [-] 102 103 LOGICAL, INTENT(IN) , DIMENSION(klon) :: keepgoing ! .TRUE. if a new condensation loop should be computed 104 LOGICAL, INTENT(IN) , DIMENSION(klon) :: pt_pron_clds ! .TRUE. if clouds are prognostic in this mesh 103 105 ! 104 106 ! Output … … 119 121 REAL, DIMENSION(klon) :: qsatl_crit, dqsatl_crit 120 122 REAL :: Gcont, psatl_crit, pcrit 121 REAL :: pdf_x, pdf_y, pdf_e2, pdf_e3 122 REAL :: pdf_fra_above_qcritcont, pdf_fra_above_qsat, pdf_fra_above_qnuc 123 REAL :: pdf_q_above_qcritcont, pdf_q_above_qsat, pdf_q_above_qnuc 123 REAL :: rhl_clr, pdf_loc 124 REAL :: pdf_x, pdf_y, pdf_e3 125 REAL :: pdf_fra_above_qcritcont, pdf_fra_above_qsat 126 REAL :: pdf_q_above_qcritcont, pdf_q_above_qsat 124 127 REAL :: qpotcontP 125 128 ! … … 159 162 160 163 DO i = 1, klon 161 IF ( keepgoing(i) .AND. ( temp(i) .LE. temp_nowater ) ) THEN164 IF ( keepgoing(i) .AND. pt_pron_clds(i) .AND. ( temp(i) .LE. temp_nowater ) ) THEN 162 165 163 166 psatl_crit = qsatl_crit(i) / ( EPS_W + ( 1. - EPS_W ) * qsatl_crit(i) ) * pplay(i) … … 168 171 IF ( ( clrfra(i) .GT. eps ) .AND. ( temp(i) .LT. Tcritcont(i) ) ) THEN 169 172 173 rhl_clr = qclr(i) / clrfra(i) / qsatl(i) * 100. 174 pdf_loc = rhl_clr - pdf_scale(i) * pdf_gamma(i) 170 175 pdf_x = qcritcont(i) / qsatl(i) * 100. 171 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 172 pdf_e2 = GAMMA(1. + 1. / pdf_alpha(i)) 176 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 173 177 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 174 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_ e2178 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 175 179 pdf_fra_above_qcritcont = EXP( - pdf_y ) * clrfra(i) 176 180 pdf_q_above_qcritcont = ( pdf_e3 * clrfra(i) & 177 + pdf_loc(i) * pdf_fra_above_qcritcont ) * qsatl(i) / 100. 178 179 pdf_x = gamma_cond(i) * qsat(i) / qsatl(i) * 100. 180 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 181 pdf_e2 = GAMMA(1. + 1. / pdf_alpha(i)) 181 + pdf_loc * pdf_fra_above_qcritcont ) * qsatl(i) / 100. 182 183 pdf_x = qsat(i) / qsatl(i) * 100. 184 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 182 185 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 183 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 184 pdf_fra_above_qnuc = EXP( - pdf_y ) * clrfra(i) 185 pdf_q_above_qnuc = ( pdf_e3 * clrfra(i) & 186 + pdf_loc(i) * pdf_fra_above_qnuc ) * qsatl(i) / 100. 187 188 pdf_x = qsat(i) / qsatl(i) * 100. 189 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 190 pdf_e2 = GAMMA(1. + 1. / pdf_alpha(i)) 191 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 192 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 186 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 193 187 pdf_fra_above_qsat = EXP( - pdf_y ) * clrfra(i) 194 188 pdf_q_above_qsat = ( pdf_e3 * clrfra(i) & 195 + pdf_loc (i)* pdf_fra_above_qsat ) * qsatl(i) / 100.189 + pdf_loc * pdf_fra_above_qsat ) * qsatl(i) / 100. 196 190 197 191 potcontfraNP(i) = MAX(0., pdf_fra_above_qcritcont - pdf_fra_above_qsat) 198 potcontfraP(i) = MAX(0., MIN(pdf_fra_above_qsat - pdf_fra_above_qnuc, & 199 pdf_fra_above_qcritcont - pdf_fra_above_qnuc)) 200 qpotcontP = MAX(0., MIN(pdf_q_above_qsat - pdf_q_above_qnuc, & 201 pdf_q_above_qcritcont - pdf_q_above_qnuc)) 192 potcontfraP(i) = MIN(pdf_fra_above_qsat, pdf_fra_above_qcritcont) 193 qpotcontP = MIN(pdf_q_above_qsat, pdf_q_above_qcritcont) 202 194 203 195 ENDIF ! temp .LT. Tcritcont … … 219 211 220 212 !********************************************************************************** 221 FUNCTION QVAPINCLD_DEPSUB_CONTRAILS( & 222 qvapincld, qiceincld, temp, qsat, pplay, dtime) 223 224 USE lmdz_lscp_ini, ONLY: RV, RLSTT, RTT, EPS_W 225 USE lmdz_lscp_ini, ONLY: depo_coef_cirrus, capa_cond_cirrus, rho_ice 226 USE lmdz_lscp_ini, ONLY: rm_ice_crystals_contrails 213 FUNCTION contrail_cross_section_onera() 214 215 USE lmdz_lscp_ini, ONLY: initial_width_contrails, initial_height_contrails 227 216 228 217 IMPLICIT NONE 229 218 230 ! inputs231 REAL :: qvapincld !232 REAL :: qiceincld !233 REAL :: temp !234 REAL :: qsat !235 REAL :: pplay !236 REAL :: dtime ! time step [s]237 ! output238 REAL :: qvapincld_depsub_contrails239 ! local240 REAL :: pres_sat, rho, kappa241 REAL :: air_thermal_conduct, water_vapor_diff242 REAL :: rm_ice243 244 !--If ok_unadjusted_clouds is set to TRUE, then the saturation adjustment245 !--hypothesis is lost, and the vapor in the cloud is purely prognostic.246 !247 !--The deposition equation is248 !-- dmi/dt = alpha*4pi*C*Svi / ( R_v*T/esi/Dv + Ls/ka/T * (Ls/R_v/T - 1) )249 !--from Lohmann et al. (2016), where250 !--alpha is the deposition coefficient [-]251 !--mi is the mass of one ice crystal [kg]252 !--C is the capacitance of an ice crystal [m]253 !--Svi is the supersaturation ratio equal to (qvc - qsat)/qsat [-]254 !--R_v is the specific gas constant for humid air [J/kg/K]255 !--T is the temperature [K]256 !--esi is the saturation pressure w.r.t. ice [Pa]257 !--Dv is the diffusivity of water vapor [m2/s]258 !--Ls is the specific latent heat of sublimation [J/kg/K]259 !--ka is the thermal conductivity of dry air [J/m/s/K]260 !261 !--alpha is a coefficient to take into account the fact that during deposition, a water262 !--molecule cannot join the crystal from everywhere, it must do so that the crystal stays263 !--coherent (with the same structure). It has no impact for sublimation.264 !--We fix alpha = depo_coef_cirrus (=0.5 by default following Lohmann et al. (2016))265 !--during deposition, and alpha = 1. during sublimation.266 !--The capacitance of the ice crystals is proportional to a parameter capa_cond_cirrus267 !-- C = capa_cond_cirrus * rm_ice268 !269 !--We have qice = Nice * mi, where Nice is the ice crystal270 !--number concentration per kg of moist air271 !--HYPOTHESIS 1: the ice crystals are spherical, therefore272 !-- mi = 4/3 * pi * rm_ice**3 * rho_ice273 !--HYPOTHESIS 2: the ice crystals are monodisperse with the274 !--initial radius rm_ice_0.275 !--NB. this is notably different than the assumption276 !--of a distributed qice in the cloud made in the sublimation process;277 !--should it be consistent?278 !279 !--As the deposition process does not create new ice crystals,280 !--and because we assume a same rm_ice value for all crystals281 !--therefore the sublimation process does not destroy ice crystals282 !--(or, in a limit case, it destroys all ice crystals), then283 !--Nice is a constant during the sublimation/deposition process.284 !-- dmi = dqi, et Nice = qi_0 / ( 4/3 RPI rm_ice_0**3 rho_ice )285 !286 !--The deposition equation then reads:287 !-- dqi/dt = alpha*4pi*capa_cond_cirrus*rm_ice*(qvc-qsat)/qsat / ( R_v*T/esi/Dv + Ls/ka/T * (Ls/R_v/T - 1) ) * Nice288 !-- dqi/dt = alpha*4pi*capa_cond_cirrus* (qi / qi_0)**(1/3) *rm_ice_0*(qvc-qsat)/qsat &289 !-- / ( R_v*T/esi/Dv + Ls/ka/T * (Ls*R_v/T - 1) ) &290 !-- * qi_0 / ( 4/3 RPI rm_ice_0**3 rho_ice )291 !-- dqi/dt = qi**(1/3) * (qvc - qsat) * qi_0**(2/3) &292 !-- *alpha/qsat*capa_cond_cirrus/ (R_v*T/esi/Dv + Ls/ka/T*(Ls*R_v/T - 1)) / ( 1/3 rm_ice_0**2 rho_ice )293 !--and we have294 !-- dqvc/dt = - qi**(1/3) * (qvc - qsat) / kappa * alpha * qi_0**(2/3) / rm_ice_0**2295 !-- dqi/dt = qi**(1/3) * (qvc - qsat) / kappa * alpha * qi_0**(2/3) / rm_ice_0**2296 !--where kappa = 1/3*rho_ice/capa_cond_cirrus*qsat*(R_v*T/esi/Dv + Ls/ka/T*(Ls/R_v/T - 1))297 !298 !--This system of equations can be resolved with an exact299 !--explicit numerical integration, having one variable resolved300 !--explicitly, the other exactly. The exactly resolved variable is301 !--the one decreasing, so it is qvc if the process is302 !--condensation, qi if it is sublimation.303 !304 !--kappa is computed as an initialisation constant, as it depends only305 !--on temperature and other pre-computed values306 pres_sat = qsat / ( EPS_W + ( 1. - EPS_W ) * qsat ) * pplay307 !--This formula for air thermal conductivity comes from Beard and Pruppacher (1971)308 air_thermal_conduct = ( 5.69 + 0.017 * ( temp - RTT ) ) * 1.e-3 * 4.184309 !--This formula for water vapor diffusivity comes from Hall and Pruppacher (1976)310 water_vapor_diff = 0.211 * ( temp / RTT )**1.94 * ( 101325. / pplay ) * 1.e-4311 kappa = 1. / 3. * rho_ice / capa_cond_cirrus * qsat &312 * ( RV * temp / water_vapor_diff / pres_sat &313 + RLSTT / air_thermal_conduct / temp * ( RLSTT / RV / temp - 1. ) )314 !--NB. the greater kappa, the lower the efficiency of the deposition/sublimation process315 316 !--Here, the initial vapor in the cloud is qvapincld, and we compute317 !--the new vapor qvapincld_depsub_contrails318 319 rm_ice = rm_ice_crystals_contrails320 321 IF ( qvapincld .GE. qsat ) THEN322 !--If the cloud is initially supersaturated323 !--Exact explicit integration (qvc exact, qice explicit)324 qvapincld_depsub_contrails = qsat + ( qvapincld - qsat ) &325 * EXP( - depo_coef_cirrus * dtime * qiceincld / kappa / rm_ice**2 )326 ELSE327 !--If the cloud is initially subsaturated328 !--Exact explicit integration (qvc exact, qice explicit)329 !--Same but depo_coef_cirrus = 1330 qvapincld_depsub_contrails = qsat + ( qvapincld - qsat ) &331 * EXP( - dtime * qiceincld / kappa / rm_ice**2 )332 IF ( qvapincld_depsub_contrails .GE. ( qvapincld + qiceincld ) ) &333 qvapincld_depsub_contrails = 0.334 ENDIF ! qvapincld .GT. qsat335 336 END FUNCTION QVAPINCLD_DEPSUB_CONTRAILS337 338 339 !**********************************************************************************340 FUNCTION contrail_cross_section_onera()341 342 USE lmdz_lscp_ini, ONLY: initial_width_contrails, initial_height_contrails343 344 IMPLICIT NONE345 346 219 ! 347 220 ! Output … … 355 228 356 229 END FUNCTION contrail_cross_section_onera 230 357 231 358 232 SUBROUTINE read_aviation_emissions(klon, klev) -
LMDZ6/branches/contrails/libf/phylmd/lmdz_call_cloud_optics_prop.f90
r5601 r5609 12 12 icefrac_optics, dNovrN, ptconv,rnebcon, ccwcon, & 13 13 !--AB contrails 14 contfra, qice_cont, pclc_nocont, pcltau_nocont, pclemi_nocont, &15 pcltau_ cont, pclemi_cont, pch_nocont, pct_cont, &14 contfra, perscontfra, qice_cont, qice_perscont, pclc_nocont, & 15 pcltau_nocont, pclemi_nocont, pcltau_cont, pclemi_cont, pch_nocont, pct_cont, & 16 16 xfiwp_nocont, xfiwc_nocont, reice_nocont) 17 17 … … 95 95 96 96 !--AB for contrails. All these are used / outputed only if ok_plane_contrail=y 97 REAL, INTENT(IN) :: contfra(klon, klev) ! contrails fraction [-] 98 REAL, INTENT(IN) :: qice_cont(klon, klev) ! contrails condensed water [kg/kg] 97 REAL, INTENT(IN) :: contfra(klon, klev) ! linear contrails fraction [-] 98 REAL, INTENT(IN) :: perscontfra(klon, klev) ! contrail induced cirrus fraction [-] 99 REAL, INTENT(IN) :: qice_cont(klon, klev) ! linear contrails condensed water [kg/kg] 100 REAL, INTENT(IN) :: qice_perscont(klon, klev) ! contrail induced cirrus condensed water [kg/kg] 99 101 REAL, INTENT(OUT) :: pch_nocont(klon) ! 2D high cloud cover without contrails[-] 100 102 REAL, INTENT(OUT) :: pct_cont(klon) ! 2D total contrails cover[-] … … 137 139 icefrac_optics, dNovrN, ptconv,rnebcon, ccwcon, & 138 140 !--AB for contrails 139 contfra, qice_cont, pclc_nocont, pcltau_nocont, pclemi_nocont, &140 pcl tau_cont, pclemi_cont, pch_nocont, pct_cont, &141 contfra, perscontfra, qice_cont, qice_perscont, pclc_nocont, pcltau_nocont, & 142 pclemi_nocont, pcltau_cont, pclemi_cont, pch_nocont, pct_cont, & 141 143 xfiwp_nocont, xfiwc_nocont, reice_nocont) 142 144 ELSE -
LMDZ6/branches/contrails/libf/phylmd/lmdz_cloud_optics_prop.f90
r5601 r5609 11 11 icefrac_optics, dNovrN, ptconv, rnebcon, ccwcon, & 12 12 !--AB contrails 13 contfra, qice_cont, pclc_nocont, pcltau_nocont, pclemi_nocont, &14 pcl tau_cont, pclemi_cont, pch_nocont, pct_cont, &13 contfra, perscontfra, qice_cont, qice_perscont, pclc_nocont, pcltau_nocont, & 14 pclemi_nocont, pcltau_cont, pclemi_cont, pch_nocont, pct_cont, & 15 15 xfiwp_nocont, xfiwc_nocont, reice_nocont) 16 16 … … 119 119 120 120 !--AB for contrails. All these are used / outputed only if ok_plane_contrail=y 121 REAL, INTENT(IN) :: contfra(klon, klev) ! contrails fraction [-] 122 REAL, INTENT(IN) :: qice_cont(klon, klev) ! contrails condensed water [kg/kg] 121 REAL, INTENT(IN) :: contfra(klon, klev) ! linear contrails fraction [-] 122 REAL, INTENT(IN) :: perscontfra(klon, klev) ! contrail induced cirrus fraction [-] 123 REAL, INTENT(IN) :: qice_cont(klon, klev) ! linear contrails condensed water [kg/kg] 124 REAL, INTENT(IN) :: qice_perscont(klon, klev) ! contrail induced cirrus condensed water [kg/kg] 123 125 REAL, INTENT(OUT) :: pch_nocont(klon) ! 2D high cloud cover without contrails[-] 124 126 REAL, INTENT(OUT) :: pct_cont(klon) ! 2D total contrails cover[-] … … 171 173 REAL zflwp_var, zfiwp_var 172 174 REAL d_rei_dt 173 REAL pclc_var 175 REAL pclc_cont, pclc_perscont 176 REAL rei_cont, rei_perscont 174 177 175 178 … … 252 255 DO k = 1, klev 253 256 DO i = 1, klon 254 pclc_nocont(i,k) = pclc(i, k) - contfra(i, k) 255 xfiwc_nocont(i, k) = xfiwc(i, k) - qice_cont(i, k) 257 pclc_nocont(i,k) = pclc(i, k) - contfra(i, k) - perscontfra(i, k) 258 xfiwc_nocont(i, k) = xfiwc(i, k) - qice_cont(i, k) - qice_perscont(i, k) 256 259 ENDDO 257 260 ENDDO … … 393 396 394 397 IF (zfiwp_var==0. .OR. rei<=0.) rei = 1. 395 IF ( ok_plane_contrail ) THEN 396 !--If contrails are activated, rei is a weighted average between the natural 397 !--rei and the contrails rei, with the weights being the fraction of natural 398 !--vs contrail cirrus in the gridbox 399 !--Beware, re_ice_crystals_contrails is in m, while rei is in microns 400 rei = ( rei * pclc_nocont(i,k) & 401 + re_ice_crystals_contrails * 1.E6 * contfra(i,k) ) / pclc(i,k) 402 ENDIF 398 403 399 pcldtaupi(i, k) = 3.0/2.0*zflwp_var/rad_chaud_pi(i, k) + & 404 400 zfiwp_var*(3.448E-03+2.431/rei) … … 687 683 reice_nocont(i,k) = 1. 688 684 pclc_nocont(i,k) = 0. 689 pclc(i,k) = contfra(i,k) 685 pclc(i,k) = contfra(i,k) + perscontfra(i,k) 690 686 pcltau_nocont(i, k) = 0. 691 687 pclemi_nocont(i, k) = 0. … … 695 691 696 692 IF ( contfra(i,k) .GT. 0.01 * seuil_neb ) THEN 693 pclc_cont = contfra(i,k) 694 rei_cont = re_ice_crystals_contrails * 1.E6 695 ELSE 696 pclc_cont = 0. 697 rei_cont = 1. 698 ENDIF 699 700 701 IF ( perscontfra(i,k) .GT. 0.01 * seuil_neb ) THEN 697 702 !--Everything is the same but with contrails 698 zfiwp_var = 1000.*qice_cont(i, k)/contfra(i, k)*rhodz(i, k) 699 pclc_var = contfra(i,k) 700 701 pcltau_cont(i, k) = zfiwp_var*(3.448E-03+2.431/(re_ice_crystals_contrails*1.E6)) 703 pclc_perscont = perscontfra(i,k) 704 705 tc = temp(i, k) - 273.15 706 rei_perscont = d_rei_dt*tc + rei_max 707 IF (tc<=-81.4) rei_perscont = rei_min 708 709 ELSE 710 pclc_perscont = 0. 711 rei_perscont = 1. 712 ENDIF 713 714 IF ( MAX(contfra(i,k), perscontfra(i,k)) .GT. 0.01 * seuil_neb ) THEN 715 716 rei = ( rei_cont * pclc_cont + rei_perscont * pclc_perscont ) & 717 / ( pclc_cont + pclc_perscont ) 718 zfiwp_var = 1000.*(xfiwc(i, k)-xfiwc_nocont(i, k))& 719 / (pclc(i, k)-pclc_nocont(i, k))*rhodz(i, k) 720 721 pcltau_cont(i, k) = zfiwp_var*(3.448E-03+2.431/rei) 702 722 ! -- cloud infrared emissivity: 703 723 ! [the broadband infrared absorption coefficient is PARAMETERized 704 724 ! as a function of the effective cld droplet radius] 705 725 ! Ebert and Curry (1992) formula as used by Kiehl & Zender (1995): 706 k_ice = k_ice0 + 1.0/ (re_ice_crystals_contrails*1.E6)726 k_ice = k_ice0 + 1.0/rei 707 727 pclemi_cont(i, k) = 1.0 - exp(-df*k_ice*zfiwp_var) 708 728 709 729 ELSE 710 pclc_var = 0.711 730 pcltau_cont(i, k) = 0. 712 731 pclemi_cont(i, k) = 0. 713 732 ENDIF 714 733 715 rei = ( re_ice_crystals_contrails*1.E6 * pclc_var & 716 + reice_nocont(i, k) * pclc_nocont(i,k) ) / ( pclc_var + pclc_nocont(i,k) ) 734 735 rei = ( rei_cont * pclc_cont + rei_perscont * pclc_perscont & 736 + reice_nocont(i, k) * pclc_nocont(i, k) ) & 737 / ( pclc_cont + pclc_perscont + pclc_nocont(i,k) ) 717 738 718 739 zflwp_var = 1000.*xflwc(i, k)/pclc(i, k)*rhodz(i, k) … … 861 882 DO k = klev, 1, -1 862 883 DO i = 1, klon 863 zclear(i) = zclear(i)*(1.-max(contfra(i,k) ,zcloud(i)))/(1.-min(real(&864 zcloud(i),kind=8),1.-zepsec))884 zclear(i) = zclear(i)*(1.-max(contfra(i,k)+perscontfra(i,k),zcloud(i)))/& 885 (1.-min(real(zcloud(i),kind=8),1.-zepsec)) 865 886 pct_cont(i) = 1. - zclear(i) 866 zcloud(i) = contfra(i,k) 887 zcloud(i) = contfra(i,k) + perscontfra(i,k) 867 888 IF (paprs(i,k)<prmhc) THEN 868 889 pch_nocont(i) = pch_nocont(i)*(1.-max(pclc_nocont(i,k),zcloudh(i)))/(1.-min(real( & -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp.f90
r5602 r5609 8 8 SUBROUTINE lscp(klon,klev,dtime,missing_val, & 9 9 paprs, pplay, omega, temp, qt, ql_seri, qi_seri, & 10 ptconv, cldfracv, qcondcv, ratqs, sigma_qtherm, & 10 ratqs, sigma_qtherm, ptconv, cfcon_old, qvcon_old, & 11 qccon_old, cfcon, qvcon, qccon, & 11 12 d_t, d_q, d_ql, d_qi, rneb, rneblsvol, & 12 13 pfraclr, pfracld, & … … 24 25 dqi_adj, dqi_sub, dqi_con, dqi_mix, dqvc_adj, & 25 26 dqvc_sub, dqvc_con, dqvc_mix, qsatl, qsati, & 26 cfa_seri, qta_seri, flight_dist, flight_h2o,&27 qice_cont, Tcritcont,&27 cfa_seri, pcf_seri, qva_seri, qia_seri,flight_dist,& 28 flight_h2o, qice_perscont, Tcritcont, & 28 29 qcritcont, potcontfraP, potcontfraNP, & 29 30 cloudth_sth, & … … 117 118 USE lmdz_lscp_ini, ONLY : ok_radocond_snow, a_tr_sca 118 119 USE lmdz_lscp_ini, ONLY : iflag_cloudth_vert, iflag_t_glace, iflag_fisrtilp_qsat 119 USE lmdz_lscp_ini, ONLY : t_glace_min, min_frac_th_cld120 USE lmdz_lscp_ini, ONLY : t_glace_min, temp_nowater, min_frac_th_cld 120 121 USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RVTMP2, RTT, RD, RG 121 122 USE lmdz_lscp_ini, ONLY : ok_poprecip, ok_bug_phase_lscp 122 123 USE lmdz_lscp_ini, ONLY : ok_ice_supersat, ok_unadjusted_clouds, iflag_icefrac 123 USE lmdz_lscp_ini, ONLY : ok_plane_contrail 124 USE lmdz_lscp_ini, ONLY : ok_weibull_warm_clouds, ok_no_issr_strato 125 USE lmdz_lscp_ini, ONLY : ok_plane_contrail, ok_ice_sedim 124 126 125 127 ! Temporary call for Lamquin et al (2012) diagnostics … … 153 155 ! CR: if iflag_ice_thermo=2, only convection is active 154 156 LOGICAL, DIMENSION(klon,klev), INTENT(IN) :: ptconv ! grid points where deep convection scheme is active 155 REAL, DIMENSION(klon,klev), INTENT(IN) :: cldfracv ! cloud fraction from deep convection [-] 156 REAL, DIMENSION(klon,klev), INTENT(IN) :: qcondcv ! in-cloud condensed specific humidity from deep convection [kg/kg] 157 REAL, DIMENSION(klon,klev), INTENT(IN) :: cfcon_old ! cloud fraction from deep convection from previous timestep [-] 158 REAL, DIMENSION(klon,klev), INTENT(IN) :: qvcon_old ! in-cloud vapor specific humidity from deep convection from previous timestep [kg/kg] 159 REAL, DIMENSION(klon,klev), INTENT(IN) :: qccon_old ! in-cloud condensed specific humidity from deep convection from previous timestep [kg/kg] 160 REAL, DIMENSION(klon,klev), INTENT(IN) :: cfcon ! cloud fraction from deep convection [-] 161 REAL, DIMENSION(klon,klev), INTENT(IN) :: qvcon ! in-cloud vapor specific humidity from deep convection [kg/kg] 162 REAL, DIMENSION(klon,klev), INTENT(IN) :: qccon ! in-cloud condensed specific humidity from deep convection [kg/kg] 157 163 158 164 !Inputs associated with thermal plumes … … 185 191 !-------------------------------------------------- 186 192 REAL, DIMENSION(klon,klev), INTENT(INOUT):: cfa_seri ! linear contrails fraction [-] 187 REAL, DIMENSION(klon,klev), INTENT(INOUT):: qta_seri ! linear contrails total specific humidity [kg/kg] 193 REAL, DIMENSION(klon,klev), INTENT(INOUT):: pcf_seri ! contrails induced cirrus fraction [-] 194 REAL, DIMENSION(klon,klev), INTENT(INOUT):: qva_seri ! linear contrails total specific humidity [kg/kg] 195 REAL, DIMENSION(klon,klev), INTENT(INOUT):: qia_seri ! linear contrails total specific humidity [kg/kg] 188 196 REAL, DIMENSION(klon,klev), INTENT(IN) :: flight_dist ! aviation distance flown within the mesh [m/s/mesh] 189 197 REAL, DIMENSION(klon,klev), INTENT(IN) :: flight_h2o ! aviation H2O emitted within the mesh [kgH2O/s/mesh] … … 243 251 ! for contrails and aviation 244 252 245 REAL, DIMENSION(klon,klev), INTENT(OUT) :: qice_ cont !--condensed water in linear contrails used in the radiation scheme [kg/kg]253 REAL, DIMENSION(klon,klev), INTENT(OUT) :: qice_perscont !--condensed water in contrail induced cirrus used in the radiation scheme [kg/kg] 246 254 REAL, DIMENSION(klon,klev), INTENT(OUT) :: Tcritcont !--critical temperature for contrail formation [K] 247 255 REAL, DIMENSION(klon,klev), INTENT(OUT) :: qcritcont !--critical specific humidity for contrail formation [kg/kg] … … 279 287 ! LOCAL VARIABLES: 280 288 !---------------- 281 REAL, DIMENSION(klon) :: qliq_in, qice_in 289 REAL, DIMENSION(klon) :: qliq_in, qice_in, qvc_in, cldfra_in 282 290 REAL, DIMENSION(klon,klev) :: ctot 283 291 REAL, DIMENSION(klon,klev) :: ctot_vol … … 307 315 REAL, DIMENSION(klon) :: ztupnew 308 316 REAL, DIMENSION(klon) :: zqvapclr, zqupnew ! for poprecip evap / subl 309 REAL, DIMENSION(klon) :: zqice_sedim! for sedimentation of ice crystals317 REAL, DIMENSION(klon) :: cldfra_above, icesed_flux ! for sedimentation of ice crystals 310 318 REAL, DIMENSION(klon) :: zrflclr, zrflcld 311 319 REAL, DIMENSION(klon) :: ziflclr, ziflcld … … 324 332 REAL :: delta_z 325 333 ! for contrails 326 REAL, DIMENSION(klon) :: contfra, qcont 334 REAL, DIMENSION(klon) :: contfra, perscontfra, qcont 335 LOGICAL, DIMENSION(klon) :: pt_pron_clds 327 336 !--Added for ice supersaturation (ok_ice_supersat) and contrails (ok_plane_contrail) 328 337 ! Constants used for calculating ratios that are advected (using a parent-child … … 424 433 dcf_con(:,:) = 0. 425 434 dcf_mix(:,:) = 0. 435 dcfsed(:,:) = 0. 426 436 dqi_adj(:,:) = 0. 427 437 dqi_sub(:,:) = 0. 428 438 dqi_con(:,:) = 0. 429 439 dqi_mix(:,:) = 0. 440 dqised(:,:) = 0. 430 441 dqvc_adj(:,:) = 0. 431 442 dqvc_sub(:,:) = 0. 432 443 dqvc_con(:,:) = 0. 433 444 dqvc_mix(:,:) = 0. 445 dqvcsed(:,:) = 0. 434 446 qvc(:) = 0. 435 447 shear(:) = 0. … … 467 479 zqupnew(:) = 0. 468 480 zqvapclr(:) = 0. 469 zqice_sedim(:)= 0. 481 cldfra_above(:)= 0. 482 icesed_flux(:)= 0. 470 483 471 484 … … 506 519 !c_iso init of iso 507 520 ENDDO 521 IF ( ok_ice_supersat ) THEN 522 cldfra_in(:) = cf_seri(:,k) 523 qvc_in(:) = qvc_seri(:,k) 524 ENDIF 508 525 509 526 ! -------------------------------------------------------------------- … … 519 536 CALL poprecip_precld(klon, dtime, iftop, paprs(:,k), paprs(:,k+1), pplay(:,k), & 520 537 zt, ztupnew, zq, zmqc, znebprecipclr, znebprecipcld, & 521 zqvapclr, zqupnew, zqice_sedim, &522 c f_seri(:,k), qvc_seri(:,k), qliq_in, qice_in, &538 zqvapclr, zqupnew, icesed_flux, & 539 cldfra_in, qvc_in, qliq_in, qice_in, & 523 540 zrfl, zrflclr, zrflcld, & 524 541 zifl, ziflclr, ziflcld, & 525 dqreva(:,k), dqssub(:,k), & 526 dcfsed(:,k), dqvcsed(:,k) & 542 dqreva(:,k), dqssub(:,k) & 527 543 ) 528 544 … … 531 547 532 548 CALL histprecip_precld(klon, dtime, iftop, paprs(:,k), paprs(:,k+1), pplay(:,k), & 533 zt, ztupnew, zq, zmqc, zneb, znebprecip, znebprecipclr, &549 zt, ztupnew, zq, zmqc, zneb, znebprecip, znebprecipclr, icesed_flux, & 534 550 zrfl, zrflclr, zrflcld, & 535 551 zifl, ziflclr, ziflcld, & … … 646 662 lognormale(:) = .FALSE. 647 663 664 ENDIF 665 666 667 IF ( ok_ice_supersat ) THEN 668 669 !--Initialisation 670 IF ( ok_plane_contrail ) THEN 671 contfra(:) = 0. 672 qcont(:) = 0. 673 perscontfra(:) = 0. 674 ENDIF 675 676 DO i = 1, klon 677 678 pt_pron_clds(i) = ( ( ( ( zt(i) .LE. temp_nowater ) .OR. ok_weibull_warm_clouds ) & 679 .AND. ( .NOT. ok_no_issr_strato .OR. ( stratomask(i,k) .EQ. 0. ) ) ) & 680 .AND. ( cfcon(i,k) .LT. ( 1. - eps ) ) ) 681 682 IF ( pt_pron_clds(i) ) THEN 683 684 !--If deep convection is activated, the condensation scheme activates 685 !--only in the environment. NB. the clear sky fraction will the be 686 !--maximised by 1. - cfcon(i,k) 687 IF ( ptconv(i,k) ) zq(i) = zq(i) - ( qvcon(i,k) + qccon(i,k) ) * cfcon(i,k) 688 689 IF ( ( cfcon(i,k) * qccon(i,k) ) .LT. ( cfcon_old(i,k) * qccon_old(i,k) ) ) THEN 690 !--If deep convection is weakening, we add the clouds that are not anymore 691 !--'in' deep convection to the advected clouds 692 cldfra_in(i) = cldfra_in(i) + MAX(0., cfcon_old(i,k) - cfcon(i,k)) 693 qvc_in(i) = qvc_in(i) + qvcon_old(i,k) * MAX(0., cfcon_old(i,k) - cfcon(i,k)) 694 qice_in(i) = qice_in(i) + ( qccon_old(i,k) * cfcon_old(i,k) & 695 - qccon(i,k) * cfcon(i,k) ) 696 ELSEIF ( cfcon(i,k) .GT. cfcon_old(i,k) ) THEN 697 !--Else if deep convection is strengthening, it consumes the existing cloud 698 !--fraction (which does not at this moment represent deep convection) 699 !--NB. if deep convection is strengthening while the fraction decreases, 700 !--clear sky water vapor will be transfered in priority 701 cldfra_in(i) = cldfra_in(i) * ( 1. & 702 - ( cfcon(i,k) - cfcon_old(i,k) ) / ( 1. - cfcon_old(i,k) ) ) 703 qvc_in(i) = qvc_in(i) * ( 1. & 704 - ( cfcon(i,k) - cfcon_old(i,k) ) / ( 1. - cfcon_old(i,k) ) ) 705 qice_in(i) = qice_in(i) * ( 1. & 706 - ( cfcon(i,k) - cfcon_old(i,k) ) / ( 1. - cfcon_old(i,k) ) ) 707 ENDIF 708 709 !--Barriers 710 cldfra_in(i) = MAX(0., MIN(1. - cfcon(i,k), cldfra_in(i))) 711 qvc_in(i) = MAX(0., MIN(zq(i), qvc_in(i))) 712 qice_in(i) = MAX(0., MIN(zq(i) - qvc_in(i), qice_in(i))) 713 714 !--Calculate the shear value (input for condensation and ice supersat) 715 !--Cell thickness [m] 716 delta_z = ( paprs(i,k) - paprs(i,k+1) ) / RG / pplay(i,k) * zt(i) * RD 717 IF ( iftop ) THEN 718 ! top 719 shear(i) = SQRT( ( (u_seri(i,k) - u_seri(i,k-1)) / delta_z )**2. & 720 + ( (v_seri(i,k) - v_seri(i,k-1)) / delta_z )**2. ) 721 ELSEIF ( k .EQ. 1 ) THEN 722 ! surface 723 shear(i) = SQRT( ( (u_seri(i,k+1) - u_seri(i,k)) / delta_z )**2. & 724 + ( (v_seri(i,k+1) - v_seri(i,k)) / delta_z )**2. ) 725 ELSE 726 ! other layers 727 shear(i) = SQRT( ( ( (u_seri(i,k+1) + u_seri(i,k)) / 2. & 728 - (u_seri(i,k) + u_seri(i,k-1)) / 2. ) / delta_z )**2. & 729 + ( ( (v_seri(i,k+1) + v_seri(i,k)) / 2. & 730 - (v_seri(i,k) + v_seri(i,k-1)) / 2. ) / delta_z )**2. ) 731 ENDIF 732 ENDIF 733 ENDDO 648 734 ENDIF 649 735 … … 717 803 IF (ok_ice_supersat) THEN 718 804 719 !--Calculate the shear value (input for condensation and ice supersat) 720 DO i = 1, klon 721 !--Cell thickness [m] 722 delta_z = ( paprs(i,k) - paprs(i,k+1) ) / RG / pplay(i,k) * Tbef(i) * RD 723 IF ( iftop ) THEN 724 ! top 725 shear(i) = SQRT( ( (u_seri(i,k) - u_seri(i,k-1)) / delta_z )**2. & 726 + ( (v_seri(i,k) - v_seri(i,k-1)) / delta_z )**2. ) 727 ELSEIF ( k .EQ. 1 ) THEN 728 ! surface 729 shear(i) = SQRT( ( (u_seri(i,k+1) - u_seri(i,k)) / delta_z )**2. & 730 + ( (v_seri(i,k+1) - v_seri(i,k)) / delta_z )**2. ) 731 ELSE 732 ! other layers 733 shear(i) = SQRT( ( ( (u_seri(i,k+1) + u_seri(i,k)) / 2. & 734 - (u_seri(i,k) + u_seri(i,k-1)) / 2. ) / delta_z )**2. & 735 + ( ( (v_seri(i,k+1) + v_seri(i,k)) / 2. & 736 - (v_seri(i,k) + v_seri(i,k-1)) / 2. ) / delta_z )**2. ) 737 ENDIF 738 ENDDO 805 IF ( iftop ) THEN 806 cldfra_above(:) = 0. 807 ELSE 808 cldfra_above(:) = rneb(:,k+1) 809 ENDIF 739 810 740 811 !--------------------------------------------- … … 744 815 CALL condensation_ice_supersat( & 745 816 klon, dtime, pplay(:,k), paprs(:,k), paprs(:,k+1), & 746 c ldfracv(:,k), qcondcv(:,k), &747 cf_seri(:,k), qvc_seri(:,k), qliq_in, qice_in, &748 shear, tke_dissip(:,k), cell_area, stratomask(:,k), &749 Tbef, zq, zqs, gammasat, ratqs(:,k), keepgoing,&817 cfcon(:,k), cldfra_in, qvc_in, qliq_in, qice_in, & 818 shear, tke_dissip(:,k), cell_area, Tbef, zq, zqs, & 819 gammasat, ratqs(:,k), keepgoing, pt_pron_clds, & 820 cldfra_above, icesed_flux,& 750 821 rneb(:,k), zqn, qvc, issrfra(:,k), qissr(:,k), & 751 dcf_sub(:,k), dcf_con(:,k), dcf_mix(:,k), &752 dqi_adj(:,k), dqi_sub(:,k), dqi_con(:,k), dqi_mix(:,k), &753 dqvc_adj(:,k), dqvc_sub(:,k), dqvc_con(:,k), dqvc_mix(:,k), &754 cfa_seri(:,k), qta_seri(:,k), flight_dist(:,k), flight_h2o(:,k), &755 contfra, qcont, Tcritcont(:,k), qcritcont(:,k), &756 potcontfraP(:,k), potcontfraNP(:,k), &822 dcf_sub(:,k), dcf_con(:,k), dcf_mix(:,k), dcfsed(:,k), & 823 dqi_adj(:,k), dqi_sub(:,k), dqi_con(:,k), dqi_mix(:,k), dqised(:,k), & 824 dqvc_adj(:,k), dqvc_sub(:,k), dqvc_con(:,k), dqvc_mix(:,k), dqvcsed(:,k), & 825 cfa_seri(:,k), pcf_seri(:,k), qva_seri(:,k), qia_seri(:,k), & 826 flight_dist(:,k), flight_h2o(:,k), contfra, perscontfra, qcont, & 827 Tcritcont(:,k), qcritcont(:,k), potcontfraP(:,k), potcontfraNP(:,k), & 757 828 dcfa_ini(:,k), dqia_ini(:,k), dqta_ini(:,k), & 758 829 dcfa_sub(:,k), dqia_sub(:,k), dqta_sub(:,k), & … … 951 1022 952 1023 IF (ok_plane_contrail) THEN 953 !!--Contrails do not precipitate. We remove then from the variables temporarily954 !DO i = 1, klon955 ! rneb(i,k) = rneb(i,k) - contfra(i)956 ! zoliqi(i) = zoliqi(i) - ( qcont(i) - zqs(i) * contfra(i) )957 !ENDDO958 1024 !--Contrails precipitate as natural clouds. We save the partition of ice 959 1025 !--between natural clouds and contrails … … 975 1041 ctot_vol(:,k), ptconv(:,k), & 976 1042 zt, zq, zoliql, zoliqi, zfice, & 977 rneb(:,k), zqice_sedim, znebprecipclr, znebprecipcld, &1043 rneb(:,k), icesed_flux, znebprecipclr, znebprecipcld, & 978 1044 zrfl, zrflclr, zrflcld, & 979 1045 zifl, ziflclr, ziflcld, & … … 991 1057 992 1058 CALL histprecip_postcld(klon, dtime, iftop, paprs(:,k), paprs(:,k+1), pplay(:,k), & 993 ctot_vol(:,k), ptconv(:,k), zdqsdT_raw, &994 zt, zq, zoliq, zoliql, zoliqi, zcond, zfice, zmqc, &1059 ctot_vol(:,k), ptconv(:,k), pt_pron_clds, zdqsdT_raw, & 1060 zt, zq, zoliq, zoliql, zoliqi, zcond, zfice, zmqc, icesed_flux, & 995 1061 rneb(:,k), znebprecipclr, znebprecipcld, & 996 1062 zneb, tot_zneb, zrho_up, zvelo_up, & 997 1063 zrfl, zrflclr, zrflcld, zifl, ziflclr, ziflcld, & 998 zradocond, zradoice, dqrauto(:,k), dqsauto(:,k) &1064 zradocond, zradoice, dqrauto(:,k), dqsauto(:,k), dqised(:,k) & 999 1065 ) 1000 1066 … … 1002 1068 1003 1069 IF (ok_plane_contrail) THEN 1004 !!--Contrails are reintroduced in the variables1005 !DO i = 1, klon1006 ! rneb(i,k) = rneb(i,k) + contfra(i)1007 ! zoliqi(i) = zoliqi(i) + ( qcont(i) - zqs(i) * contfra(i) )1008 !ENDDO1009 1070 !--Contrails fraction is left unchanged, but contrails water has changed 1010 1071 DO i = 1, klon … … 1106 1167 ! P6 > write diagnostics and outputs 1107 1168 !------------------------------------------------------------ 1169 1170 CALL calc_qsat_ecmwf(klon,zt,qzero,pplay(:,k),RTT,1,.false.,qsatl(:,k),zdqs) 1171 CALL calc_qsat_ecmwf(klon,zt,qzero,pplay(:,k),RTT,2,.false.,qsati(:,k),zdqs) 1108 1172 1109 1173 !--AB Write diagnostics and tracers for ice supersaturation 1110 1174 IF ( ok_plane_contrail ) THEN 1111 1175 cfa_seri(:,k) = contfra(:) 1112 qta_seri(:,k) = qcont(:) 1113 qice_cont(:,k) = qcont(:) - zqs(:) * contfra(:) 1176 pcf_seri(:,k) = perscontfra(:) 1177 qva_seri(:,k) = zqs(:) * contfra(:) 1178 qia_seri(:,k) = qcont(:) - zqs(:) * contfra(:) 1179 DO i = 1, klon 1180 IF ( ( rneb(i,k) - cfa_seri(i,k) ) .GT. eps ) THEN 1181 qice_perscont(i,k) = ( radocond(i,k) - qia_seri(i,k) ) & 1182 * perscontfra(i) / ( rneb(i,k) - cfa_seri(i,k) ) 1183 ELSE 1184 qice_perscont(i,k) = 0. 1185 ENDIF 1186 ENDDO 1114 1187 ENDIF 1115 1188 1116 IF ( ok_ice_supersat .AND. .NOT. ok_unadjusted_clouds) qvc(:) = zqs(:) * rneb(:,k)1117 1118 1189 IF ( ok_ice_supersat ) THEN 1119 CALL calc_qsat_ecmwf(klon,zt,qzero,pplay(:,k),RTT,1,.false.,qsatl(:,k),zdqs)1120 CALL calc_qsat_ecmwf(klon,zt,qzero,pplay(:,k),RTT,2,.false.,qsati(:,k),zdqs)1121 1190 1122 1191 DO i = 1, klon 1192 1193 !--If prognostic clouds are activated, deep convection vapor is 1194 !--re-added to the total water vapor 1195 IF ( ptconv(i,k) .AND. pt_pron_clds(i) ) & 1196 zq(i) = zq(i) + ( qvcon(i,k) + qccon(i,k) ) * cfcon(i,k) 1123 1197 1124 1198 cf_seri(i,k) = rneb(i,k) … … 1236 1310 ENDDO 1237 1311 1312 IF ( ok_ice_sedim ) THEN 1313 DO i = 1, klon 1314 snow(i) = snow(i) + icesed_flux(i) 1315 ENDDO 1316 ENDIF 1317 1238 1318 IF (ncoreczq>0) THEN 1239 1319 WRITE(lunout,*)'WARNING : ZQ in LSCP ',ncoreczq,' val < 1.e-15.' -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_condensation.f90
r5602 r5609 94 94 !********************************************************************************** 95 95 SUBROUTINE condensation_ice_supersat( & 96 klon, dtime, pplay, paprsdn, paprsup, cldfracv, qcondcv, & 97 cldfra_in, qvc_in, qliq_in, qice_in, shear, pbl_eps, cell_area, stratomask, & 98 temp, qtot_in, qsat, gamma_cond, ratqs, keepgoing, & 99 cldfra, qincld, qvc, issrfra, qissr, dcf_sub, dcf_con, dcf_mix, & 100 dqi_adj, dqi_sub, dqi_con, dqi_mix, dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, & 101 contfra_in, qcont_in, flight_dist, flight_h2o, contfra, qcont, & 102 Tcritcont, qcritcont, potcontfraP, potcontfraNP, & 96 klon, dtime, pplay, paprsdn, paprsup, cfcon, & 97 cldfra_in, qvc_in, qliq_in, qice_in, shear, pbl_eps, cell_area, & 98 temp, qtot_in, qsat, gamma_cond, ratqs, keepgoing, pt_pron_clds, & 99 cldfra_above, icesed_flux, & 100 cldfra, qincld, qvc, issrfra, qissr, dcf_sub, dcf_con, dcf_mix, dcf_sed, & 101 dqi_adj, dqi_sub, dqi_con, dqi_mix, dqi_sed, & 102 dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, dqvc_sed, & 103 contfra_in, perscontfra_in, qva_in, qia_in, flight_dist, flight_h2o, & 104 contfra, perscontfra, qcont, Tcritcont, qcritcont, potcontfraP, potcontfraNP, & 103 105 dcfa_ini, dqia_ini, dqta_ini, dcfa_sub, dqia_sub, dqta_sub, & 104 106 dcfa_cir, dqta_cir, dcfa_mix, dqia_mix, dqta_mix) … … 118 120 119 121 USE lmdz_lscp_tools, ONLY: calc_qsat_ecmwf, calc_gammasat, GAMMAINC 120 USE lmdz_lscp_ini, ONLY: RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RV, RPI, EPS_W 121 USE lmdz_lscp_ini, ONLY: eps, temp_nowater, ok_weibull_warm_clouds 122 USE lmdz_lscp_ini, ONLY: ok_unadjusted_clouds, ok_no_issr_strato 123 124 USE lmdz_lscp_ini, ONLY: depo_coef_cirrus, capa_cond_cirrus, std_subl_pdf_lscp 125 USE lmdz_lscp_ini, ONLY: beta_pdf_lscp, temp_thresh_pdf_lscp 122 USE lmdz_lscp_ini, ONLY: RLSTT, RTT, RD, RG, RV, RPI, EPS_W 123 USE lmdz_lscp_ini, ONLY: eps, temp_nowater, ok_unadjusted_clouds 124 125 USE lmdz_lscp_ini, ONLY: depo_coef_cirrus, capa_cond_cirrus, rho_ice 126 USE lmdz_lscp_ini, ONLY: mu_subl_pdf_lscp, beta_pdf_lscp, temp_thresh_pdf_lscp 126 127 USE lmdz_lscp_ini, ONLY: std100_pdf_lscp, k0_pdf_lscp, kappa_pdf_lscp 127 128 USE lmdz_lscp_ini, ONLY: coef_mixing_lscp, coef_shear_lscp … … 143 144 REAL, INTENT(IN) , DIMENSION(klon) :: paprsdn ! pressure at the lower interface [Pa] 144 145 REAL, INTENT(IN) , DIMENSION(klon) :: paprsup ! pressure at the upper interface [Pa] 145 REAL, INTENT(IN) , DIMENSION(klon) :: cldfracv ! cloud fraction from deep convection [-] 146 REAL, INTENT(IN) , DIMENSION(klon) :: qcondcv ! in-cloud condensed specific humidity from deep convection [kg/kg] 146 REAL, INTENT(IN) , DIMENSION(klon) :: cfcon ! cloud fraction from deep convection [-] 147 147 REAL, INTENT(IN) , DIMENSION(klon) :: cldfra_in ! cloud fraction [-] 148 148 REAL, INTENT(IN) , DIMENSION(klon) :: qvc_in ! gridbox-mean water vapor in cloud [kg/kg] … … 152 152 REAL, INTENT(IN) , DIMENSION(klon) :: pbl_eps ! TKE dissipation [m2/s3] 153 153 REAL, INTENT(IN) , DIMENSION(klon) :: cell_area ! cell area [m2] 154 REAL, INTENT(IN) , DIMENSION(klon) :: stratomask ! fraction of stratosphere in the mesh (1 or 0)155 154 REAL, INTENT(IN) , DIMENSION(klon) :: temp ! temperature [K] 156 155 REAL, INTENT(IN) , DIMENSION(klon) :: qtot_in ! total specific humidity (without precip) [kg/kg] … … 159 158 REAL, INTENT(IN) , DIMENSION(klon) :: ratqs ! ratio between the variance of the total water distribution and its average [-] 160 159 LOGICAL, INTENT(IN) , DIMENSION(klon) :: keepgoing ! .TRUE. if a new condensation loop should be computed 160 LOGICAL, INTENT(IN) , DIMENSION(klon) :: pt_pron_clds ! .TRUE. if clouds are prognostic in this mesh 161 REAL, INTENT(IN) , DIMENSION(klon) :: cldfra_above ! cloud fraction IN THE LAYER ABOVE [-] 162 REAL, INTENT(IN) , DIMENSION(klon) :: icesed_flux ! sedimentated ice flux [kg/s/m2] 161 163 ! 162 164 ! Input for aviation 163 165 ! 164 166 REAL, INTENT(IN) , DIMENSION(klon) :: contfra_in ! input linear contrails fraction [-] 165 REAL, INTENT(IN) , DIMENSION(klon) :: qcont_in ! input linear contrails total specific humidity [kg/kg] 167 REAL, INTENT(IN) , DIMENSION(klon) :: perscontfra_in! input contrail induced cirrus fraction [-] 168 REAL, INTENT(IN) , DIMENSION(klon) :: qva_in ! input linear contrails total specific humidity [kg/kg] 169 REAL, INTENT(IN) , DIMENSION(klon) :: qia_in ! input linear contrails total specific humidity [kg/kg] 166 170 REAL, INTENT(IN) , DIMENSION(klon) :: flight_dist ! aviation distance flown concentration [m/s/m3] 167 171 REAL, INTENT(IN) , DIMENSION(klon) :: flight_h2o ! aviation emitted H2O concentration [kgH2O/s/m3] … … 186 190 REAL, INTENT(INOUT), DIMENSION(klon) :: dcf_con ! cloud fraction tendency because of condensation [s-1] 187 191 REAL, INTENT(INOUT), DIMENSION(klon) :: dcf_mix ! cloud fraction tendency because of cloud mixing [s-1] 192 REAL, INTENT(INOUT), DIMENSION(klon) :: dcf_sed ! cloud fraction tendency because of sedimentation [s-1] 188 193 REAL, INTENT(INOUT), DIMENSION(klon) :: dqi_adj ! specific ice content tendency because of temperature adjustment [kg/kg/s] 189 194 REAL, INTENT(INOUT), DIMENSION(klon) :: dqi_sub ! specific ice content tendency because of sublimation [kg/kg/s] 190 195 REAL, INTENT(INOUT), DIMENSION(klon) :: dqi_con ! specific ice content tendency because of condensation [kg/kg/s] 191 196 REAL, INTENT(INOUT), DIMENSION(klon) :: dqi_mix ! specific ice content tendency because of cloud mixing [kg/kg/s] 197 REAL, INTENT(INOUT), DIMENSION(klon) :: dqi_sed ! specific ice content tendency because of sedimentation [kg/kg/s] 192 198 REAL, INTENT(INOUT), DIMENSION(klon) :: dqvc_adj ! specific cloud water vapor tendency because of temperature adjustment [kg/kg/s] 193 199 REAL, INTENT(INOUT), DIMENSION(klon) :: dqvc_sub ! specific cloud water vapor tendency because of sublimation [kg/kg/s] 194 200 REAL, INTENT(INOUT), DIMENSION(klon) :: dqvc_con ! specific cloud water vapor tendency because of condensation [kg/kg/s] 195 201 REAL, INTENT(INOUT), DIMENSION(klon) :: dqvc_mix ! specific cloud water vapor tendency because of cloud mixing [kg/kg/s] 202 REAL, INTENT(INOUT), DIMENSION(klon) :: dqvc_sed ! specific cloud water vapor tendency because of sedimentation [kg/kg/s] 196 203 ! 197 204 ! Diagnostics for aviation … … 199 206 ! 200 207 REAL, INTENT(INOUT), DIMENSION(klon) :: contfra ! linear contrail fraction [-] 208 REAL, INTENT(INOUT), DIMENSION(klon) :: perscontfra ! linear contrail induced cirrus fraction [-] 201 209 REAL, INTENT(INOUT), DIMENSION(klon) :: qcont ! linear contrail specific humidity [kg/kg] 202 210 REAL, INTENT(INOUT), DIMENSION(klon) :: Tcritcont ! critical temperature for contrail formation [K] … … 220 228 INTEGER :: i 221 229 LOGICAL :: ok_warm_cloud 222 REAL, DIMENSION(klon) :: q tot, qcld, qzero230 REAL, DIMENSION(klon) :: qcld, qzero 223 231 REAL, DIMENSION(klon) :: clrfra, qclr 224 232 ! … … 228 236 ! 229 237 ! for unadjusted clouds 230 REAL :: qvapincld, qiceincld, qvapincld_new 231 ! 232 ! for sublimation 233 REAL :: dqt_sub 238 REAL :: qiceincld, qvapincld, qvapincld_new 239 ! 240 ! for deposition / sublimation 241 REAL :: pres_sat, kappa_depsub, tau_depsub 242 REAL :: air_thermal_conduct, water_vapor_diff 243 REAL :: N_ice 244 ! 245 ! for dissipation 246 REAL :: pdf_shape 234 247 ! 235 248 ! for condensation 236 249 REAL, DIMENSION(klon) :: qsatl, dqsatl 237 REAL, DIMENSION(klon) :: pdf_alpha, pdf_scale, pdf_loc 238 REAL :: rhl_clr 239 REAL :: pdf_ratqs, pdf_skew 240 REAL :: pdf_x, pdf_y, pdf_T 241 REAL :: pdf_e3, pdf_e4 242 REAL :: cf_cond, qt_cond, dqt_con 250 REAL, DIMENSION(klon) :: pdf_alpha, pdf_scale, pdf_gamma 251 REAL :: rhl_clr, pdf_loc 252 REAL :: pdf_e3, pdf_x, pdf_y 253 REAL :: dqt_con 254 ! 255 ! for sedimentation 256 REAL, DIMENSION(klon) :: qice_sedim 257 REAL :: clrfra_sed 243 258 ! 244 259 ! for mixing 245 260 REAL :: a_mix, bovera, Povera, N_cld_mix, L_mix 246 REAL :: cl rfra_mix, sigma_mix261 REAL :: cldfra_mix, clrfra_mix, sigma_mix 247 262 REAL :: L_shear, shear_fra 248 REAL :: q vapinclr_lim263 REAL :: qiceinmix, qvapinmix_lim, qvapinclr_lim 249 264 REAL :: pdf_fra_above_nuc, pdf_q_above_nuc 250 265 REAL :: pdf_fra_above_lim, pdf_q_above_lim 251 REAL :: pdf_fra_below_lim 266 REAL :: pdf_fra_below_lim, pdf_q_below_lim 267 REAL :: mixed_fraction 252 268 ! 253 269 ! for cell properties 254 REAL, DIMENSION(klon) :: dz 270 REAL :: rho, rhodz, dz 271 ! 272 ! for contrails 273 REAL :: perscontfra_ratio 274 REAL :: contrails_conversion_factor 255 275 256 276 qzero(:) = 0. 257 qtot = qtot_in258 277 259 278 !--Calculation of qsat w.r.t. liquid … … 269 288 !--formed elsewhere) 270 289 IF (keepgoing(i)) THEN 271 272 !--Initialisation273 issrfra(i) = 0.274 qissr(i) = 0.275 contfra(i) = 0.276 qcont(i) = 0.277 290 278 291 !--If the temperature is higher than the threshold below which … … 281 294 !--If ok_weibull_warm_clouds = .TRUE., the Weibull law is used for 282 295 !--all clouds, and the lognormal scheme is not activated 283 IF ( ( ( temp(i) .GT. temp_nowater ) .AND. .NOT. ok_weibull_warm_clouds ) .OR. & 284 ( ok_no_issr_strato .AND. ( stratomask(i) .EQ. 1. ) ) ) THEN 285 286 pdf_std = ratqs(i) * qtot(i) 287 pdf_k = -SQRT( LOG( 1. + (pdf_std / qtot(i))**2 ) ) 288 pdf_delta = LOG( qtot(i) / ( gamma_cond(i) * qsat(i) ) ) 296 IF ( .NOT. pt_pron_clds(i) ) THEN 297 298 pdf_std = ratqs(i) * qtot_in(i) 299 pdf_k = -SQRT( LOG( 1. + (pdf_std / qtot_in(i))**2 ) ) 300 pdf_delta = LOG( qtot_in(i) / ( gamma_cond(i) * qsat(i) ) ) 289 301 pdf_a = pdf_delta / ( pdf_k * SQRT(2.) ) 290 302 pdf_b = pdf_k / (2. * SQRT(2.)) … … 303 315 ELSE 304 316 cldfra(i) = 0.5 * pdf_e1 305 qincld(i) = qtot (i) * pdf_e2 / pdf_e1317 qincld(i) = qtot_in(i) * pdf_e2 / pdf_e1 306 318 qvc(i) = qsat(i) * cldfra(i) 307 319 ENDIF … … 319 331 ok_warm_cloud = ( temp(i) .GT. temp_nowater ) 320 332 321 !--We remove the convection water from the total available water322 qtot(i) = qtot(i) - ( qcondcv(i) + qsat(i) ) * cldfracv(i)323 324 333 !--The following barriers ensure that the traced cloud properties 325 334 !--are consistent. In some rare cases, i.e. the cloud water vapor 326 335 !--can be greater than the total water in the gridbox 327 cldfra(i) = MAX(0., MIN(1. - c ldfracv(i), cldfra_in(i)))328 qcld(i) = MAX(0., MIN(qtot (i), qliq_in(i) + qice_in(i) + qvc_in(i)))336 cldfra(i) = MAX(0., MIN(1. - cfcon(i), cldfra_in(i))) 337 qcld(i) = MAX(0., MIN(qtot_in(i), qliq_in(i) + qice_in(i) + qvc_in(i))) 329 338 qvc(i) = MAX(0., MIN(qcld(i), qvc_in(i))) 330 339 331 340 !--Initialise clear fraction properties 332 clrfra(i) = ( 1. - cldfracv(i) ) - cldfra(i)333 qclr(i) = qtot (i) - qcld(i)341 clrfra(i) = MAX(0., MIN(1., ( 1. - cfcon(i) ) - cldfra(i))) 342 qclr(i) = qtot_in(i) - qcld(i) 334 343 335 344 dcf_sub(i) = 0. … … 344 353 dqi_mix(i) = 0. 345 354 dqvc_mix(i) = 0. 355 dcf_sed(i) = 0. 356 dqi_sed(i) = 0. 357 dqvc_sed(i) = 0. 358 359 IF ( icesed_flux(i) .GT. 0. ) THEN 360 !--If ice sedimentation is activated, the quantity of sedimentated ice was added 361 !--to the total water vapor in the precipitation routine. Here we remove it 362 !--(it will be reincluded later) 363 qice_sedim(i) = icesed_flux(i) / ( paprsdn(i) - paprsup(i) ) * RG * dtime 364 qclr(i) = qclr(i) - qice_sedim(i) 365 ENDIF 346 366 347 367 !--Initialisation of the cell properties 348 368 !--Dry density [kg/m3] 349 !rho = pplay(i) / temp(i) / RD369 rho = pplay(i) / temp(i) / RD 350 370 !--Dry air mass [kg/m2] 351 !rhodz = ( paprsdn(i) - paprsup(i) ) / RG371 rhodz = ( paprsdn(i) - paprsup(i) ) / RG 352 372 !--Cell thickness [m] 353 !dz = rhodz / rho 354 dz(i) = ( paprsdn(i) - paprsup(i) ) / pplay(i) * temp(i) * RD / RG 373 dz = rhodz / rho 374 375 !--If ok_unadjusted_clouds is set to TRUE, then the saturation adjustment 376 !--hypothesis is lost, and the vapor in the cloud is purely prognostic. 377 ! 378 !--The deposition equation is 379 !-- dmi/dt = alpha*4pi*C*Svi / ( R_v*T/esi/Dv + Ls/ka/T * (Ls/R_v/T - 1) ) 380 !--from Lohmann et al. (2016), where 381 !--alpha is the deposition coefficient [-] 382 !--mi is the mass of one ice crystal [kg] 383 !--C is the capacitance of an ice crystal [m] 384 !--Svi is the supersaturation ratio equal to (qvc - qsat)/qsat [-] 385 !--R_v is the specific gas constant for humid air [J/kg/K] 386 !--T is the temperature [K] 387 !--esi is the saturation pressure w.r.t. ice [Pa] 388 !--Dv is the diffusivity of water vapor [m2/s] 389 !--Ls is the specific latent heat of sublimation [J/kg/K] 390 !--ka is the thermal conductivity of dry air [J/m/s/K] 391 ! 392 !--alpha is a coefficient to take into account the fact that during deposition, a water 393 !--molecule cannot join the crystal from everywhere, it must do so that the crystal stays 394 !--coherent (with the same structure). It has no impact for sublimation. 395 !--We fix alpha = depo_coef_cirrus (=0.5 by default following Lohmann et al. (2016)) 396 !--during deposition, and alpha = 1. during sublimation. 397 !--The capacitance of the ice crystals is proportional to a parameter capa_cond_cirrus 398 !-- C = capa_cond_cirrus * rm_ice 399 ! 400 !--We have qice = Nice * mi, where Nice is the ice crystal 401 !--number concentration per kg of moist air 402 !--HYPOTHESIS 1: the ice crystals are spherical, therefore 403 !-- mi = 4/3 * pi * rm_ice**3 * rho_ice 404 !--HYPOTHESIS 2: the ice crystals are monodisperse with the 405 !--initial radius rm_ice_0. 406 !--NB. this is notably different than the assumption 407 !--of a distributed qice in the cloud made in the sublimation process; 408 !--should it be consistent? 409 ! 410 !--As the deposition process does not create new ice crystals, 411 !--and because we assume a same rm_ice value for all crystals 412 !--therefore the sublimation process does not destroy ice crystals 413 !--(or, in a limit case, it destroys all ice crystals), then 414 !--Nice is a constant during the sublimation/deposition process. 415 !-- dmi = dqi, et Nice = qi_0 / ( 4/3 RPI rm_ice_0**3 rho_ice ) 416 ! 417 !--The deposition equation then reads: 418 !-- dqi/dt = alpha*4pi*capa_cond_cirrus*rm_ice*(qvc-qsat)/qsat / ( R_v*T/esi/Dv + Ls/ka/T * (Ls/R_v/T - 1) ) * Nice 419 !-- dqi/dt = alpha*4pi*capa_cond_cirrus* (qi / qi_0)**(1/3) *rm_ice_0*(qvc-qsat)/qsat & 420 !-- / ( R_v*T/esi/Dv + Ls/ka/T * (Ls*R_v/T - 1) ) & 421 !-- * qi_0 / ( 4/3 RPI rm_ice_0**3 rho_ice ) 422 !-- dqi/dt = qi**(1/3) * (qvc - qsat) * qi_0**(2/3) & 423 !-- *alpha/qsat*capa_cond_cirrus/ (R_v*T/esi/Dv + Ls/ka/T*(Ls*R_v/T - 1)) / ( 1/3 rm_ice_0**2 rho_ice ) 424 !--and we have 425 !-- dqvc/dt = - qi**(1/3) * (qvc - qsat) / kappa * alpha * qi_0**(2/3) / rm_ice_0**2 426 !-- dqi/dt = qi**(1/3) * (qvc - qsat) / kappa * alpha * qi_0**(2/3) / rm_ice_0**2 427 !--where kappa = 1/3*rho_ice/capa_cond_cirrus*qsat*(R_v*T/esi/Dv + Ls/ka/T*(Ls/R_v/T - 1)) 428 ! 429 !--This system of equations can be resolved with an exact 430 !--explicit numerical integration, having one variable resolved 431 !--explicitly, the other exactly. The exactly resolved variable is 432 !--the one decreasing, so it is qvc if the process is 433 !--condensation, qi if it is sublimation. 434 ! 435 !--kappa is computed as an initialisation constant, as it depends only 436 !--on temperature and other pre-computed values 437 pres_sat = qsat(i) / ( EPS_W + ( 1. - EPS_W ) * qsat(i) ) * pplay(i) 438 !--This formula for air thermal conductivity comes from Beard and Pruppacher (1971) 439 air_thermal_conduct = ( 5.69 + 0.017 * ( temp(i) - RTT ) ) * 1.e-3 * 4.184 440 !--This formula for water vapor diffusivity comes from Hall and Pruppacher (1976) 441 water_vapor_diff = 0.211 * ( temp(i) / RTT )**1.94 * ( 101325. / pplay(i) ) * 1.e-4 442 !--Median ice crystal concentration [#/m3] in cirrus clouds from Kramer et al (2020) 443 N_ice = 0.003 * 1e6 444 !--NB. the greater kappa_depsub, the lower the efficiency of the 445 !--deposition/sublimation process 446 kappa_depsub = ( 4. / 3. * RPI * N_ice / rho * rho_ice )**(1./3.) & 447 * qsat(i) / ( 4. * RPI * capa_cond_cirrus * N_ice / rho ) & 448 * ( RV * temp(i) / water_vapor_diff / pres_sat & 449 + RLSTT / air_thermal_conduct / temp(i) * ( RLSTT / RV / temp(i) - 1. ) ) 355 450 356 451 !--If contrails are activated 357 452 IF ( ok_plane_contrail ) THEN 358 contfra(i) = contfra_in(i) 359 qcont(i) = qcont_in(i) 453 contfra(i) = MAX(0., MIN(cldfra(i), contfra_in(i))) 454 perscontfra(i) = MAX(0., MIN(cldfra(i), perscontfra_in(i))) 455 qcont(i) = MAX(0., MIN(qcld(i), qva_in(i) + qia_in(i))) 360 456 361 457 dcfa_ini(i) = 0. … … 370 466 dqia_mix(i) = 0. 371 467 dqta_mix(i) = 0. 468 ELSE 469 contfra(i) = 0. 470 perscontfra(i) = 0. 471 qcont(i) = 0. 372 472 ENDIF 373 473 … … 379 479 !--If there is a contrail 380 480 IF ( contfra(i) .GT. eps ) THEN 481 !--We remove contrails from the main class 482 cldfra(i) = cldfra(i) - contfra(i) 483 qcld(i) = qcld(i) - qcont(i) 484 qvc(i) = qvc(i) - qsat(i) * contfra(i) 485 381 486 !--The contrail is always adjusted to saturation 382 487 qiceincld = ( qcont(i) / contfra(i) - qsat(i) ) 383 488 384 489 !--If the ice water content is too low, the cloud is purely sublimated 385 IF ( qiceincld .LT. eps) THEN490 IF ( qiceincld .LT. ( 0.005 * qsat(i) ) ) THEN 386 491 dcfa_sub(i) = - contfra(i) 387 492 dqia_sub(i) = - qiceincld * contfra(i) … … 389 494 contfra(i) = 0. 390 495 qcont(i) = 0. 391 clrfra(i) = clrfra(i) + dcfa_sub(i) 392 qclr(i) = qclr(i) + dqta_sub(i) 393 ELSE 394 !--We remove contrails from the main class 395 cldfra(i) = cldfra(i) - contfra(i) 396 qcld(i) = qcld(i) - qcont(i) 397 qvc(i) = qvc(i) - qsat(i) * contfra(i) 496 clrfra(i) = MIN(1., clrfra(i) - dcfa_sub(i)) 497 qclr(i) = qclr(i) - dqta_sub(i) 398 498 ENDIF ! qiceincld .LT. eps 399 499 ENDIF ! contfra(i) .GT. eps 500 501 !--If there is a contrail induced cirrus, we save the ratio 502 perscontfra_ratio = perscontfra(i) / MAX(eps, cldfra(i)) 400 503 401 504 … … 421 524 qcld(i) = 0. 422 525 qvc(i) = 0. 423 clrfra(i) = clrfra(i) - dcf_sub(i)526 clrfra(i) = MIN(1., clrfra(i) - dcf_sub(i)) 424 527 qclr(i) = qclr(i) - dqvc_sub(i) - dqi_sub(i) 425 426 !--If all the ice has been sublimated, we sublimate427 !--completely the cloud and do not activate the sublimation428 !--process429 qvapincld_new = 0.430 528 431 529 !--Else, the cloud is adjusted and sublimated 432 530 ELSE 433 531 434 !--The vapor in cloud cannot be higher than the 435 !--condensation threshold 436 qvapincld = MIN(qvapincld, gamma_cond(i) * qsat(i)) 437 qiceincld = ( qcld(i) / cldfra(i) - qvapincld ) 532 !IF ( qiceincld .LT. ( 0.005 * qsat(i) ) ) THEN 533 ! dcf_sub(i) = ( qiceincld / ( 0.005 * qsat(i) ) - 1. ) * cldfra(i) 534 ! dqvc_sub(i) = qvapincld * dcf_sub(i) 535 536 ! cldfra(i) = cldfra(i) + dcf_sub(i) 537 ! qcld(i) = qcld(i) + dqvc_sub(i) 538 ! qvc(i) = qvc(i) + dqvc_sub(i) 539 ! clrfra(i) = MIN(1., clrfra(i) - dcf_sub(i)) 540 ! qclr(i) = qclr(i) - dqvc_sub(i) 541 !ENDIF 438 542 439 543 IF ( ok_unadjusted_clouds .AND. .NOT. ok_warm_cloud ) THEN 440 qvapincld_new = QVAPINCLD_DEPSUB( & 441 qvapincld, qiceincld, temp(i), qsat(i), pplay(i), dtime) 442 IF ( qvapincld_new .EQ. 0. ) THEN 443 !--If all the ice has been sublimated, we sublimate 444 !--completely the cloud and do not activate the dissipation 445 !--process 446 !--Tendencies and diagnostics 447 dcf_sub(i) = - cldfra(i) 448 dqvc_sub(i) = - qvc(i) 449 dqi_sub(i) = - ( qcld(i) - qvc(i) ) 450 451 cldfra(i) = 0. 452 qcld(i) = 0. 453 qvc(i) = 0. 454 clrfra(i) = clrfra(i) - dcf_sub(i) 455 qclr(i) = qclr(i) - dqvc_sub(i) - dqi_sub(i) 456 ENDIF 544 IF ( qvapincld .GE. qsat(i) ) THEN 545 !--If the cloud is initially supersaturated 546 !--Exact explicit integration (qvc exact, qice explicit) 547 tau_depsub = 1. / ( depo_coef_cirrus * qiceincld**(1./3.) * kappa_depsub ) 548 ELSE 549 !--If the cloud is initially subsaturated 550 !--Exact explicit integration (qvc exact, qice explicit) 551 !--Same but depo_coef_cirrus = 1 552 tau_depsub = 1. / ( qiceincld**(1./3.) * kappa_depsub ) 553 ENDIF ! qvapincld .GT. qsat 554 qvapincld_new = qsat(i) + ( qvapincld - qsat(i) ) * EXP( - dtime / tau_depsub ) 555 !--If all the ice is sublimated 556 IF ( qvapincld_new .GE. ( qvapincld + qiceincld ) ) qvapincld_new = 0. 457 557 ELSE 458 558 !--We keep the saturation adjustment hypothesis, and the vapor in the 459 559 !--cloud is set equal to the saturation vapor 460 qvapincld_new = qsat(i) 560 IF ( ( qvapincld + qiceincld ) .GT. qsat(i) ) THEN 561 qvapincld_new = qsat(i) 562 ELSE 563 qvapincld_new = 0. 564 ENDIF 461 565 ENDIF ! ok_unadjusted_clouds 462 463 !--Adjustment of the IWC to the new vapor in cloud464 !--(this can be either positive or negative)465 dqvc_adj(i) = ( qvapincld_new * cldfra(i) - qvc(i) )466 dqi_adj(i) = - dqvc_adj(i)467 468 !--Add tendencies469 !--The vapor in the cloud is updated, but not qcld as it is constant470 !--through this process, as well as cldfra which is unmodified471 qvc(i) = MAX(0., MIN(qcld(i), qvc(i) + dqvc_adj(i)))472 566 473 567 … … 477 571 478 572 !--If the dissipation process must be activated 479 IF ( qvapincld_new .GT. 0. ) THEN 480 !--Normal distribution around qvapincld + qiceincld with width 481 !--constant in the RHi space 482 pdf_y = ( qvapincld_new - qvapincld - qiceincld ) & 483 / ( std_subl_pdf_lscp / 100. * qsat(i)) 484 pdf_e1 = 0.5 * ( 1. + ERF( pdf_y / SQRT(2.) ) ) 485 pdf_e2 = EXP( - pdf_y**2 / 2. ) / SQRT( 2. * RPI ) 486 487 dcf_sub(i) = - cldfra(i) * pdf_e1 488 dqt_sub = - cldfra(i) * ( ( qvapincld + qiceincld ) * pdf_e1 & 489 - std_subl_pdf_lscp / 100. * qsat(i) * pdf_e2 ) 573 !IF ( cldfra(i) .GT. eps ) THEN 574 IF ( qvapincld_new .GT. qvapincld ) THEN 575 !--Gamma distribution starting at qvapincld 576 pdf_shape = ( mu_subl_pdf_lscp + 1. ) / qiceincld 577 pdf_y = pdf_shape * ( qvapincld_new - qvapincld ) 578 pdf_e1 = GAMMAINC ( mu_subl_pdf_lscp + 1. , pdf_y ) 579 pdf_e2 = GAMMAINC ( mu_subl_pdf_lscp + 2. , pdf_y ) 490 580 491 581 !--Tendencies and diagnostics 492 dqvc_sub(i) = dqt_sub 582 dcf_sub(i) = - cldfra(i) * pdf_e1 583 dqi_sub(i) = - cldfra(i) * pdf_e2 / pdf_shape 584 dqvc_sub(i) = dcf_sub(i) * qvapincld 493 585 494 586 !--Add tendencies 495 cldfra(i) = cldfra(i) + dcf_sub(i)496 qcld(i) = qcld(i) + dq t_sub587 cldfra(i) = MAX(0., cldfra(i) + dcf_sub(i)) 588 qcld(i) = qcld(i) + dqvc_sub(i) + dqi_sub(i) 497 589 qvc(i) = qvc(i) + dqvc_sub(i) 498 clrfra(i) = clrfra(i) - dcf_sub(i)499 qclr(i) = qclr(i) - dq t_sub590 clrfra(i) = MIN(1., clrfra(i) - dcf_sub(i)) 591 qclr(i) = qclr(i) - dqvc_sub(i) - dqi_sub(i) 500 592 ENDIF ! qvapincld_new .GT. 0. 593 594 595 !------------------------------------ 596 !-- PHASE ADJUSTMENT -- 597 !------------------------------------ 598 599 IF ( qvapincld_new .EQ. 0. ) THEN 600 !--If all the ice has been sublimated, we sublimate 601 !--completely the cloud and do not activate the dissipation 602 !--process 603 !--Tendencies and diagnostics 604 dcf_sub(i) = - cldfra(i) 605 dqvc_sub(i) = - qvc(i) 606 dqi_sub(i) = - ( qcld(i) - qvc(i) ) 607 608 cldfra(i) = 0. 609 qcld(i) = 0. 610 qvc(i) = 0. 611 clrfra(i) = MIN(1., clrfra(i) - dcf_sub(i)) 612 qclr(i) = qclr(i) - dqvc_sub(i) - dqi_sub(i) 613 ELSE 614 !--Adjustment of the IWC to the new vapor in cloud 615 !--(this can be either positive or negative) 616 dqvc_adj(i) = ( qvapincld_new * cldfra(i) - qvc(i) ) 617 dqi_adj(i) = - dqvc_adj(i) 618 619 !--Add tendencies 620 !--The vapor in the cloud is updated, but not qcld as it is constant 621 !--through this process, as well as cldfra which is unmodified 622 qvc(i) = MAX(0., MIN(qcld(i), qvc(i) + dqvc_adj(i))) 623 ENDIF 501 624 502 625 ENDIF ! qiceincld .LT. eps 503 626 ENDIF ! cldfra(i) .GT. eps 627 628 !--If there is a contrail induced cirrus, we restore it 629 perscontfra(i) = perscontfra_ratio * cldfra(i) 504 630 505 631 … … 519 645 !--Calculation of the properties of the PDF 520 646 !--Parameterization from IAGOS observations 521 !--pdf_ e1 and pdf_e2will be reused below647 !--pdf_alpha, pdf_scale and pdf_gamma will be reused below 522 648 523 649 !--Coefficient for standard deviation: … … 537 663 pdf_alpha(i) = EXP( rhl_clr / 100. ) * pdf_e3 538 664 539 IF ( ok_warm_cloud ) THEN 540 !--If the statistical scheme is activated, the standard deviation is adapted 541 !--to depend on the pressure level. It is multiplied by ratqs, so that near the 542 !--surface std is almost 0, and upper than about 450 hPa the std is left untouched 543 pdf_std = pdf_std * ratqs(i) 544 ENDIF 545 546 pdf_e2 = GAMMA(1. + 1. / pdf_alpha(i)) 547 pdf_scale(i) = MAX(eps, pdf_std / SQRT( GAMMA(1. + 2. / pdf_alpha(i)) - pdf_e2**2 )) 548 pdf_loc(i) = rhl_clr - pdf_scale(i) * pdf_e2 665 !IF ( ok_warm_cloud ) THEN 666 ! !--If the statistical scheme is activated, the standard deviation is adapted 667 ! !--to depend on the pressure level. It is multiplied by ratqs, so that near the 668 ! !--surface std is almost 0, and upper than about 450 hPa the std is left untouched 669 ! pdf_std = pdf_std * ratqs(i) 670 !ENDIF 671 672 pdf_gamma(i) = GAMMA(1. + 1. / pdf_alpha(i)) 673 pdf_scale(i) = MAX(eps, pdf_std / SQRT( & 674 GAMMA(1. + 2. / pdf_alpha(i)) - pdf_gamma(i)**2 )) 675 pdf_loc = rhl_clr - pdf_scale(i) * pdf_gamma(i) 549 676 550 677 !--Calculation of the newly condensed water and fraction (pronostic) … … 553 680 554 681 pdf_x = gamma_cond(i) * qsat(i) / qsatl(i) * 100. 555 pdf_y = ( MAX( pdf_x - pdf_loc (i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i)682 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 556 683 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 557 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_ e2558 cf_cond= EXP( - pdf_y )559 qt_cond = ( pdf_e3 + pdf_loc(i) * cf_cond) * qsatl(i) / 100.560 561 IF ( cf_cond.GT. eps ) THEN562 563 dcf_con(i) = clrfra(i) * cf_cond564 dqt_con = clrfra(i) * qt_cond684 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 685 pdf_fra_above_nuc = EXP( - pdf_y ) 686 pdf_q_above_nuc = ( pdf_e3 + pdf_loc * pdf_fra_above_nuc ) * qsatl(i) / 100. 687 688 IF ( pdf_fra_above_nuc .GT. eps ) THEN 689 690 dcf_con(i) = clrfra(i) * pdf_fra_above_nuc 691 dqt_con = clrfra(i) * pdf_q_above_nuc 565 692 566 693 !--Barriers (should be useless … … 574 701 qvapincld = gamma_cond(i) * qsat(i) 575 702 qiceincld = dqt_con / dcf_con(i) - gamma_cond(i) * qsat(i) 576 qvapincld_new = QVAPINCLD_DEPSUB( & 577 qvapincld, qiceincld, temp(i), qsat(i), pplay(i), dtime / 2.) 578 qvapincld = qvapincld_new 703 tau_depsub = 1. / ( depo_coef_cirrus * qiceincld**(1./3.) * kappa_depsub ) 704 qvapincld_new = qsat(i) + ( qvapincld - qsat(i) ) * EXP( - dtime / 2. / tau_depsub ) 579 705 ELSE 580 706 !--We keep the saturation adjustment hypothesis, and the vapor in the 581 707 !--newly formed cloud is set equal to the saturation vapor. 582 qvapincld = qsat(i)708 qvapincld_new = qsat(i) 583 709 ENDIF 584 710 585 711 !--Tendency on cloud vapor and diagnostic 586 dqvc_con(i) = qvapincld * dcf_con(i)712 dqvc_con(i) = qvapincld_new * dcf_con(i) 587 713 dqi_con(i) = dqt_con - dqvc_con(i) 588 714 589 715 !--Add tendencies 590 cldfra(i) = cldfra(i) + dcf_con(i)716 cldfra(i) = MIN(1., cldfra(i) + dcf_con(i)) 591 717 qcld(i) = qcld(i) + dqt_con 592 718 qvc(i) = qvc(i) + dqvc_con(i) 593 clrfra(i) = clrfra(i) - dcf_con(i)719 clrfra(i) = MAX(0., clrfra(i) - dcf_con(i)) 594 720 qclr(i) = qclr(i) - dqt_con 595 721 … … 597 723 ENDIF ! ( 1. - cldfra(i) ) .GT. eps 598 724 725 726 !--If there is a contrail induced cirrus, we save the ratio 727 perscontfra_ratio = perscontfra(i) / MAX(eps, cldfra(i)) 599 728 600 729 !-------------------------------------- … … 658 787 clrfra_mix = N_cld_mix * RPI / cell_area(i) & 659 788 * ( a_mix * ( 1. + bovera ) * L_mix + L_mix**2 ) 789 !--The fraction of clear sky mixed is 790 !-- N_cld_mix * ( a * b - (a - L_mix) * (b - L_mix) ) * RPI / cell_area 791 cldfra_mix = N_cld_mix * RPI / cell_area(i) & 792 * ( a_mix * ( 1. + bovera ) * L_mix - L_mix**2 ) 660 793 661 794 … … 666 799 !--semi-major axis (a_mix), on the entire cell heigh dz. 667 800 !--The increase in size is 668 L_shear = coef_shear_lscp * shear(i) * dz (i)* dtime801 L_shear = coef_shear_lscp * shear(i) * dz * dtime 669 802 !--therefore, the fraction of clear sky mixed is 670 803 !-- N_cld_mix * ( (a + L_shear) * b - a * b ) * RPI / 2. / cell_area … … 678 811 !--mixed clouds are different. 679 812 clrfra_mix = clrfra_mix + shear_fra 680 813 cldfra_mix = cldfra_mix + shear_fra 681 814 682 815 !-- PART 3 - CALCULATION OF THE MIXING PROPERTIES 683 816 684 clrfra_mix = MIN( clrfra_mix, clrfra(i) ) 817 clrfra_mix = MAX(eps, MIN(clrfra(i), clrfra_mix)) 818 cldfra_mix = MAX(eps, MIN(cldfra(i), cldfra_mix)) 685 819 686 820 !--We compute the limit vapor in clear sky where the mixed cloud could not … … 690 824 !--diagnostic, and if the cloud size is increased, we add the new vapor to the 691 825 !--cloud's vapor without condensing or sublimating ice crystals 692 qvapinclr_lim = ( ( cldfra(i) + clrfra_mix ) * qsat(i) - qcld(i) ) / clrfra_mix 826 IF ( ok_unadjusted_clouds .AND. .NOT. ok_warm_cloud ) THEN 827 qiceinmix = ( qcld(i) - qvc(i) ) / cldfra(i) / ( 1. + clrfra_mix / cldfra_mix ) 828 tau_depsub = 1. / ( qiceinmix**(1./3.) * kappa_depsub ) 829 qvapinmix_lim = qsat(i) - qiceinmix / ( 1. - EXP( - dtime / tau_depsub ) ) 830 qvapinclr_lim = qvapinmix_lim * ( 1. + cldfra_mix / clrfra_mix ) & 831 - qvc(i) / cldfra(i) * cldfra_mix / clrfra_mix 832 ELSE 833 !--NB. if tau_depsub = 0, we get the same result as above 834 qvapinclr_lim = qsat(i) * ( 1. + cldfra_mix / clrfra_mix ) & 835 - qcld(i) / cldfra(i) * cldfra_mix / clrfra_mix 836 ENDIF 693 837 694 838 IF ( qvapinclr_lim .LT. 0. ) THEN … … 696 840 dcf_mix(i) = clrfra_mix 697 841 dqvc_mix(i) = clrfra_mix * qclr(i) / clrfra(i) 698 dqi_mix(i) = 0.699 842 ELSE 700 843 !--We then calculate the clear sky part where the humidity is lower than … … 704 847 !--because the clear sky fraction can only be reduced by condensation. 705 848 !--Thus the `pdf_xxx` variables are well defined. 706 pdf_x = gamma_cond(i) * qsat(i) / qsatl(i) * 100. 707 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 849 850 rhl_clr = qclr(i) / clrfra(i) / qsatl(i) * 100. 851 pdf_loc = rhl_clr - pdf_scale(i) * pdf_gamma(i) 852 pdf_x = qvapinclr_lim / qsatl(i) * 100. 853 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 708 854 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 709 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 710 pdf_fra_above_nuc = EXP( - pdf_y ) * clrfra(i) 711 pdf_q_above_nuc = ( pdf_e3 * clrfra(i) & 712 + pdf_loc(i) * pdf_fra_above_nuc ) * qsatl(i) / 100. 713 714 pdf_x = qvapinclr_lim / qsatl(i) * 100. 715 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 716 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 717 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 855 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 718 856 pdf_fra_above_lim = EXP( - pdf_y ) * clrfra(i) 719 857 pdf_q_above_lim = ( pdf_e3 * clrfra(i) & 720 + pdf_loc (i)* pdf_fra_above_lim ) * qsatl(i) / 100.858 + pdf_loc * pdf_fra_above_lim ) * qsatl(i) / 100. 721 859 722 860 pdf_fra_below_lim = clrfra(i) - pdf_fra_above_lim 723 pdf_fra_above_lim = pdf_fra_above_lim - pdf_fra_above_nuc 724 pdf_q_above_lim = pdf_q_above_lim - pdf_q_above_nuc 861 pdf_q_below_lim = qclr(i) - pdf_q_above_lim 725 862 726 863 !--sigma_mix is the ratio of the surroundings of the clouds where mixing … … 733 870 dcf_mix(i) = clrfra_mix * sigma_mix 734 871 dqvc_mix(i) = clrfra_mix * sigma_mix * pdf_q_above_lim / pdf_fra_above_lim 735 dqi_mix(i) = 0.736 872 ENDIF 737 873 738 874 IF ( pdf_fra_below_lim .GT. eps ) THEN 739 dcf_mix(i) = dcf_mix(i) - cldfra (i)* ( 1. - sigma_mix )740 dqvc_mix(i) = dqvc_mix(i) - cldfra (i)* ( 1. - sigma_mix ) &741 742 dqi_mix(i) = dqi_mix(i) - cldfra (i)* ( 1. - sigma_mix ) &743 875 dcf_mix(i) = dcf_mix(i) - cldfra_mix * ( 1. - sigma_mix ) 876 dqvc_mix(i) = dqvc_mix(i) - cldfra_mix * ( 1. - sigma_mix ) & 877 * qvc(i) / cldfra(i) 878 dqi_mix(i) = dqi_mix(i) - cldfra_mix * ( 1. - sigma_mix ) & 879 * ( qcld(i) - qvc(i) ) / cldfra(i) 744 880 ENDIF 881 745 882 ENDIF 746 747 !--Add tendencies748 cldfra(i) = cldfra(i) + dcf_mix(i)749 qcld(i) = qcld(i) + dqvc_mix(i) + dqi_mix(i)750 qvc(i) = qvc(i) + dqvc_mix(i)751 clrfra(i) = clrfra(i) - dcf_mix(i)752 qclr(i) = qclr(i) - dqvc_mix(i) - dqi_mix(i)753 754 883 ENDIF ! ( cldfra(i) .GT. eps ) .AND. ( clrfra(i) .GT. eps ) 755 884 … … 812 941 clrfra_mix = N_cld_mix * RPI / cell_area(i) & 813 942 * ( a_mix * ( 1. + bovera ) * L_mix + L_mix**2 ) 943 !--The fraction of clear sky mixed is 944 !-- N_cld_mix * ( a * b - (a - L_mix) * (b - L_mix) ) * RPI / cell_area 945 cldfra_mix = N_cld_mix * RPI / cell_area(i) & 946 * ( a_mix * ( 1. + bovera ) * L_mix - L_mix**2 ) 814 947 815 948 … … 823 956 !--With this, the clouds increase in size along b only, by a factor 824 957 !--L_shear * SQRT(2.) / 2. (to account for the 45 degrees orientation of the wind) 825 L_shear = coef_shear_contrails * shear(i) * dz (i)* dtime958 L_shear = coef_shear_contrails * shear(i) * dz * dtime 826 959 !--therefore, the fraction of clear sky mixed is 827 960 !-- N_cld_mix * ( a * (b + L_shear * SQRT(2.) / 2.) - a * b ) * RPI / 2. / cell_area … … 835 968 !--mixed clouds are different. 836 969 clrfra_mix = clrfra_mix + shear_fra 970 cldfra_mix = cldfra_mix + shear_fra 837 971 838 972 839 973 !-- PART 3 - CALCULATION OF THE MIXING PROPERTIES 840 974 841 clrfra_mix = MIN( clrfra_mix, clrfra(i) ) 975 clrfra_mix = MAX(eps, MIN(clrfra(i), clrfra_mix)) 976 cldfra_mix = MAX(eps, MIN(cldfra(i), cldfra_mix)) 842 977 843 978 !--We compute the limit vapor in clear sky where the mixed cloud could not … … 847 982 !--diagnostic, and if the cloud size is increased, we add the new vapor to the 848 983 !--cloud's vapor without condensing or sublimating ice crystals 849 qvapinclr_lim = ( ( contfra(i) + clrfra_mix ) * qsat(i) - qcont(i) ) / clrfra_mix 984 qvapinclr_lim = qsat(i) * ( 1. + cldfra_mix / clrfra_mix ) & 985 - qcont(i) / contfra(i) * cldfra_mix / clrfra_mix 850 986 851 987 IF ( qvapinclr_lim .LT. 0. ) THEN … … 853 989 dcfa_mix(i) = clrfra_mix 854 990 dqta_mix(i) = clrfra_mix * qclr(i) / clrfra(i) 855 dqia_mix(i) = 0.856 991 ELSE 857 992 !--We then calculate the clear sky part where the humidity is lower than … … 861 996 !--because the clear sky fraction can only be reduced by condensation. 862 997 !--Thus the `pdf_xxx` variables are well defined. 863 pdf_x = gamma_cond(i) * qsat(i) / qsatl(i) * 100. 864 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 998 999 rhl_clr = qclr(i) / clrfra(i) / qsatl(i) * 100. 1000 pdf_loc = rhl_clr - pdf_scale(i) * pdf_gamma(i) 1001 pdf_x = qvapinclr_lim / qsatl(i) * 100. 1002 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 865 1003 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 866 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 867 pdf_fra_above_nuc = EXP( - pdf_y ) * clrfra(i) 868 pdf_q_above_nuc = ( pdf_e3 * clrfra(i) & 869 + pdf_loc(i) * pdf_fra_above_nuc ) * qsatl(i) / 100. 870 871 pdf_x = qvapinclr_lim / qsatl(i) * 100. 872 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 873 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 874 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 1004 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 875 1005 pdf_fra_above_lim = EXP( - pdf_y ) * clrfra(i) 876 1006 pdf_q_above_lim = ( pdf_e3 * clrfra(i) & 877 + pdf_loc (i)* pdf_fra_above_lim ) * qsatl(i) / 100.1007 + pdf_loc * pdf_fra_above_lim ) * qsatl(i) / 100. 878 1008 879 1009 pdf_fra_below_lim = clrfra(i) - pdf_fra_above_lim 880 pdf_fra_above_lim = pdf_fra_above_lim - pdf_fra_above_nuc881 pdf_q_above_lim = pdf_q_above_lim - pdf_q_above_nuc882 1010 883 1011 !--sigma_mix is the ratio of the surroundings of the clouds where mixing … … 893 1021 dcfa_mix(i) = clrfra_mix * sigma_mix 894 1022 dqta_mix(i) = clrfra_mix * sigma_mix * pdf_q_above_lim / pdf_fra_above_lim 895 dqia_mix(i) = 0.896 1023 ENDIF 897 1024 898 1025 IF ( pdf_fra_below_lim .GT. eps ) THEN 899 dcfa_mix(i) = dcfa_mix(i) - contfra(i) * ( 1. - sigma_mix)900 dqta_mix(i) = dqta_mix(i) - contfra(i) * ( 1. - sigma_mix ) &901 * qcont(i) / contfra(i)902 dq ia_mix(i) = dqia_mix(i) - contfra(i) * ( 1. - sigma_mix ) &903 * ( qcont(i) / contfra(i) - qsat(i) )1026 qvapincld = qcont(i) / contfra(i) 1027 qiceincld = qvapincld - qsat(i) 1028 dcfa_mix(i) = dcfa_mix(i) - cldfra_mix * ( 1. - sigma_mix ) 1029 dqta_mix(i) = dqta_mix(i) - cldfra_mix * ( 1. - sigma_mix ) * qvapincld 1030 dqia_mix(i) = dqia_mix(i) - cldfra_mix * ( 1. - sigma_mix ) * qiceincld 904 1031 ENDIF 1032 1033 ENDIF 1034 ENDIF ! ( contfra(i) .GT. eps ) .AND. ( clrfra(i) .GT. eps ) 1035 1036 IF ( contfra(i) .GT. eps ) THEN 1037 !--We balance the mixing tendencies between the different cloud classes 1038 mixed_fraction = dcf_mix(i) + dcfa_mix(i) 1039 IF ( mixed_fraction .GT. clrfra(i) ) THEN 1040 mixed_fraction = clrfra(i) / mixed_fraction 1041 dcf_mix(i) = dcf_mix(i) * mixed_fraction 1042 dqvc_mix(i) = dqvc_mix(i) * mixed_fraction 1043 dqi_mix(i) = dqi_mix(i) * mixed_fraction 1044 dcfa_mix(i) = dcfa_mix(i) * mixed_fraction 1045 dqta_mix(i) = dqta_mix(i) * mixed_fraction 905 1046 ENDIF 906 1047 … … 910 1051 clrfra(i) = clrfra(i) - dcfa_mix(i) 911 1052 qclr(i) = qclr(i) - dqta_mix(i) 912 913 ENDIF ! ( contfra(i) .GT. eps ) .AND. ( clrfra(i) .GT. eps ) 1053 ENDIF 1054 1055 !--Add tendencies 1056 cldfra(i) = cldfra(i) + dcf_mix(i) 1057 qcld(i) = qcld(i) + dqvc_mix(i) + dqi_mix(i) 1058 qvc(i) = qvc(i) + dqvc_mix(i) 1059 clrfra(i) = clrfra(i) - dcf_mix(i) 1060 qclr(i) = qclr(i) - dqvc_mix(i) - dqi_mix(i) 1061 1062 !--If there is a contrail induced cirrus, we restore it 1063 perscontfra(i) = perscontfra_ratio * cldfra(i) 1064 1065 1066 !--------------------------------------- 1067 !-- ICE SEDIMENTATION -- 1068 !--------------------------------------- 1069 ! 1070 !--If ice supersaturation is activated, the cloud properties are prognostic. 1071 !--The falling ice is then considered a new cloud in the gridbox. 1072 !--BEWARE with this parameterisation, we can create a new cloud with a much 1073 !--different ice water content and water vapor content than the existing cloud 1074 !--(if it exists). This implies than unphysical fluxes of ice and vapor 1075 !--occur between the existing cloud and the newly formed cloud (from sedimentation). 1076 !--Note also that currently, the precipitation scheme assume a maximum 1077 !--random overlap, meaning that the new formed clouds will not be affected 1078 !--by vertical wind shear. 1079 ! 1080 IF ( icesed_flux(i) .GT. 0. ) THEN 1081 1082 clrfra_sed = MIN(clrfra(i), cldfra_above(i) - cldfra(i)) 1083 1084 IF ( ( clrfra_sed .GT. eps ) .AND. ( clrfra(i) .GT. eps ) ) THEN 1085 1086 qiceincld = qice_sedim(i) / cldfra_above(i) 1087 IF ( ok_unadjusted_clouds .AND. .NOT. ok_warm_cloud ) THEN 1088 tau_depsub = 1. / ( qiceincld**(1./3.) * kappa_depsub ) 1089 qvapinclr_lim = qsat(i) - qiceincld / ( 1. - EXP( - dtime / tau_depsub ) ) 1090 ELSE 1091 qvapinclr_lim = qsat(i) - qiceincld 1092 ENDIF 1093 1094 rhl_clr = qclr(i) / clrfra(i) / qsatl(i) * 100. 1095 pdf_loc = rhl_clr - pdf_scale(i) * pdf_gamma(i) 1096 pdf_x = qvapinclr_lim / qsatl(i) * 100. 1097 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 1098 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 1099 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 1100 pdf_fra_above_lim = EXP( - pdf_y ) * clrfra(i) 1101 pdf_q_above_lim = ( pdf_e3 * clrfra(i) & 1102 + pdf_loc * pdf_fra_above_lim ) * qsatl(i) / 100. 1103 1104 IF ( pdf_fra_above_lim .GT. eps ) THEN 1105 dcf_sed(i) = clrfra_sed * pdf_fra_above_lim / clrfra(i) 1106 dqvc_sed(i) = dcf_sed(i) * pdf_q_above_lim / pdf_fra_above_lim 1107 !--We include the sedimentated ice: 1108 dqi_sed(i) = qiceincld & !--We include the sedimentated ice: 1109 * ( dcf_sed(i) & !--the part that falls in the newly formed cloud and 1110 + cldfra(i) ) !--the part that falls in the existing cloud 1111 1112 ENDIF 1113 1114 ELSE 1115 1116 dqi_sed(i) = qice_sedim(i) 1117 1118 ENDIF ! clrfra(i) .GT. eps 1119 1120 !--Add tendencies 1121 cldfra(i) = MIN(1., cldfra(i) + dcf_sed(i)) 1122 qcld(i) = qcld(i) + dqvc_sed(i) + dqi_sed(i) 1123 qvc(i) = qvc(i) + dqvc_sed(i) 1124 clrfra(i) = MAX(0., clrfra(i) - dcf_sed(i)) 1125 !--We re-include sublimated sedimentated ice into clear sky water vapor 1126 qclr(i) = qclr(i) - dqvc_sed(i) + qice_sedim(i) - dqi_sed(i) 1127 1128 ENDIF ! qice_sedim(i) .GT. 0. 1129 914 1130 915 1131 !--We put back contrails in the clouds class … … 919 1135 920 1136 921 !--Diagnostics922 dcf_sub(i) = dcf_sub(i) / dtime923 dcf_con(i) = dcf_con(i) / dtime924 dcf_mix(i) = dcf_mix(i) / dtime925 dqi_adj(i) = dqi_adj(i) / dtime926 dqi_sub(i) = dqi_sub(i) / dtime927 dqi_con(i) = dqi_con(i) / dtime928 dqi_mix(i) = dqi_mix(i) / dtime929 dqvc_adj(i) = dqvc_adj(i) / dtime930 dqvc_sub(i) = dqvc_sub(i) / dtime931 dqvc_con(i) = dqvc_con(i) / dtime932 dqvc_mix(i) = dqvc_mix(i) / dtime933 934 1137 !--Diagnose ISSRs 935 1138 IF ( clrfra(i) .GT. eps ) THEN 936 !--We then calculate the part that is greater than qsat937 !--and lower than gamma_cond * qsat, which is the ice supersaturated region938 pdf_x = gamma_cond(i) *qsat(i) / qsatl(i) * 100.939 pdf_y = ( MAX( pdf_x - pdf_loc (i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i)1139 rhl_clr = qclr(i) / clrfra(i) / qsatl(i) * 100. 1140 pdf_loc = rhl_clr - pdf_scale(i) * pdf_gamma(i) 1141 pdf_x = qsat(i) / qsatl(i) * 100. 1142 pdf_y = ( MAX( pdf_x - pdf_loc, 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 940 1143 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 941 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 942 pdf_fra_above_nuc = EXP( - pdf_y ) * clrfra(i) 943 pdf_q_above_nuc = ( pdf_e3 * clrfra(i) & 944 + pdf_loc(i) * pdf_fra_above_nuc ) * qsatl(i) / 100. 945 946 pdf_x = qsat(i) / qsatl(i) * 100. 947 pdf_y = ( MAX( pdf_x - pdf_loc(i), 0. ) / pdf_scale(i) ) ** pdf_alpha(i) 948 pdf_e3 = GAMMAINC ( 1. + 1. / pdf_alpha(i) , pdf_y ) 949 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_e2 1144 pdf_e3 = pdf_scale(i) * ( 1. - pdf_e3 ) * pdf_gamma(i) 950 1145 issrfra(i) = EXP( - pdf_y ) * clrfra(i) 951 qissr(i) = ( pdf_e3 * clrfra(i) + pdf_loc (i)* issrfra(i) ) * qsatl(i) / 100.952 953 issrfra(i) = issrfra(i) - pdf_fra_above_nuc954 qissr(i) = qissr(i) - pdf_q_above_nuc1146 qissr(i) = ( pdf_e3 * clrfra(i) + pdf_loc * issrfra(i) ) * qsatl(i) / 100. 1147 ELSE 1148 issrfra(i) = 0. 1149 qissr(i) = 0. 955 1150 ENDIF 956 1151 … … 969 1164 ENDIF ! cldfra .LT. eps 970 1165 1166 !--Diagnostics 1167 dcf_sub(i) = dcf_sub(i) / dtime 1168 dcf_con(i) = dcf_con(i) / dtime 1169 dcf_mix(i) = dcf_mix(i) / dtime 1170 dcf_sed(i) = dcf_sed(i) / dtime 1171 dqi_adj(i) = dqi_adj(i) / dtime 1172 dqi_sub(i) = dqi_sub(i) / dtime 1173 dqi_con(i) = dqi_con(i) / dtime 1174 dqi_mix(i) = dqi_mix(i) / dtime 1175 dqi_sed(i) = dqi_sed(i) / dtime 1176 dqvc_adj(i) = dqvc_adj(i) / dtime 1177 dqvc_sub(i) = dqvc_sub(i) / dtime 1178 dqvc_con(i) = dqvc_con(i) / dtime 1179 dqvc_mix(i) = dqvc_mix(i) / dtime 1180 dqvc_sed(i) = dqvc_sed(i) / dtime 1181 971 1182 ENDIF ! ( temp(i) .GT. temp_nowater ) .AND. .NOT. ok_weibull_warm_clouds 972 1183 … … 983 1194 CALL contrails_formation( & 984 1195 klon, dtime, pplay, temp, qsat, qsatl, gamma_cond, & 985 flight_dist, clrfra, pdf_loc, pdf_scale, pdf_alpha, keepgoing, & 1196 flight_dist, clrfra, qclr, pdf_scale, pdf_alpha, pdf_gamma, & 1197 keepgoing, pt_pron_clds, & 986 1198 Tcritcont, qcritcont, potcontfraP, potcontfraNP, & 987 1199 dcfa_ini, dqia_ini, dqta_ini) 988 1200 989 1201 DO i = 1, klon 990 IF ( keepgoing(i) .AND. ( temp(i) .LE. temp_nowater) ) THEN1202 IF ( keepgoing(i) .AND. pt_pron_clds(i) ) THEN 991 1203 992 1204 !--Convert existing contrail fraction into "natural" cirrus cloud fraction 993 dcfa_cir(i) = contfra(i) * ( EXP( - dtime / linear_contrails_lifetime ) - 1. ) 994 dqta_cir(i) = qcont(i) * ( EXP( - dtime / linear_contrails_lifetime ) - 1. ) 1205 IF ( cldfra(i) .GE. ( 1. - cfcon(i) - eps ) ) THEN 1206 contrails_conversion_factor = 1. 1207 ELSE 1208 contrails_conversion_factor = ( 1. - & 1209 !--First, the linear contrails are continuously degraded in induced cirrus 1210 EXP( - dtime / linear_contrails_lifetime ) & 1211 !--Second, if the cloud fills the entire gridbox, the linear contrails 1212 !--cannot exist. The exponent is set so that this only happens for 1213 !--very cloudy gridboxes 1214 * ( 1. - cldfra(i) / ( 1. - cfcon(i) ) )**0.1 ) 1215 ENDIF 1216 dcfa_cir(i) = - contrails_conversion_factor * contfra(i) 1217 dqta_cir(i) = - contrails_conversion_factor * qcont(i) 995 1218 996 1219 !--Add tendencies 997 1220 issrfra(i) = MAX(0., issrfra(i) - dcfa_ini(i)) 998 1221 qissr(i) = MAX(0., qissr(i) - dqta_ini(i)) 999 cldfra(i) = MAX(0., MIN(1. - cldfracv(i), cldfra(i) + dcfa_ini(i))) 1000 qcld(i) = MAX(0., MIN(qtot(i), qcld(i) + dqta_ini(i))) 1222 clrfra(i) = MAX(0., clrfra(i) - dcfa_ini(i)) 1223 qclr(i) = MAX(0., qclr(i) - dqta_ini(i)) 1224 1225 cldfra(i) = MAX(0., MIN(1. - cfcon(i), cldfra(i) + dcfa_ini(i))) 1226 qcld(i) = MAX(0., MIN(qtot_in(i), qcld(i) + dqta_ini(i))) 1001 1227 qvc(i) = MAX(0., MIN(qcld(i), qvc(i) + dcfa_ini(i) * qsat(i))) 1002 1228 contfra(i) = MAX(0., MIN(cldfra(i), contfra(i) + dcfa_cir(i) + dcfa_ini(i))) 1003 1229 qcont(i) = MAX(0., MIN(qcld(i), qcont(i) + dqta_cir(i) + dqta_ini(i))) 1230 perscontfra(i) = perscontfra(i) - dcfa_cir(i) 1004 1231 1005 1232 !--Diagnostics … … 1024 1251 cldfra(i) = 0. 1025 1252 contfra(i)= 0. 1253 perscontfra(i) = 0. 1026 1254 qcld(i) = 0. 1027 1255 qvc(i) = 0. 1256 qcont(i) = 0. 1028 1257 qincld(i) = qsat(i) 1029 1258 ELSE … … 1036 1265 ENDIF 1037 1266 1267 IF ( perscontfra(i) .LT. eps ) perscontfra(i) = 0. 1268 1038 1269 ENDIF ! keepgoing 1039 1270 ENDDO … … 1044 1275 !********************************************************************************** 1045 1276 1046 FUNCTION QVAPINCLD_DEPSUB( &1047 qvapincld, qiceincld, temp, qsat, pplay, dtime)1048 1049 USE lmdz_lscp_ini, ONLY: RV, RLSTT, RTT, RD, EPS_W1050 USE lmdz_lscp_ini, ONLY: depo_coef_cirrus, capa_cond_cirrus, rho_ice1051 USE lmdz_lscp_ini, ONLY: eps1052 1053 IMPLICIT NONE1054 1055 ! inputs1056 REAL :: qvapincld !1057 REAL :: qiceincld !1058 REAL :: temp !1059 REAL :: qsat !1060 REAL :: pplay !1061 REAL :: dtime ! time step [s]1062 ! outpu1063 REAL :: qvapincld_depsub1064 1065 !1066 ! local1067 REAL :: pres_sat, rho, kappa1068 REAL :: air_thermal_conduct, water_vapor_diff1069 REAL :: iwc1070 REAL :: iwc_log_inf100, iwc_log_sup1001071 REAL :: iwc_inf100, alpha_inf100, coef_inf1001072 REAL :: mu_sup100, sigma_sup100, coef_sup1001073 REAL :: Dm_ice, rm_ice1074 1075 !--If ok_unadjusted_clouds is set to TRUE, then the saturation adjustment1076 !--hypothesis is lost, and the vapor in the cloud is purely prognostic.1077 !1078 !--The deposition equation is1079 !-- dmi/dt = alpha*4pi*C*Svi / ( R_v*T/esi/Dv + Ls/ka/T * (Ls/R_v/T - 1) )1080 !--from Lohmann et al. (2016), where1081 !--alpha is the deposition coefficient [-]1082 !--mi is the mass of one ice crystal [kg]1083 !--C is the capacitance of an ice crystal [m]1084 !--Svi is the supersaturation ratio equal to (qvc - qsat)/qsat [-]1085 !--R_v is the specific gas constant for humid air [J/kg/K]1086 !--T is the temperature [K]1087 !--esi is the saturation pressure w.r.t. ice [Pa]1088 !--Dv is the diffusivity of water vapor [m2/s]1089 !--Ls is the specific latent heat of sublimation [J/kg/K]1090 !--ka is the thermal conductivity of dry air [J/m/s/K]1091 !1092 !--alpha is a coefficient to take into account the fact that during deposition, a water1093 !--molecule cannot join the crystal from everywhere, it must do so that the crystal stays1094 !--coherent (with the same structure). It has no impact for sublimation.1095 !--We fix alpha = depo_coef_cirrus (=0.5 by default following Lohmann et al. (2016))1096 !--during deposition, and alpha = 1. during sublimation.1097 !--The capacitance of the ice crystals is proportional to a parameter capa_cond_cirrus1098 !-- C = capa_cond_cirrus * rm_ice1099 !1100 !--We have qice = Nice * mi, where Nice is the ice crystal1101 !--number concentration per kg of moist air1102 !--HYPOTHESIS 1: the ice crystals are spherical, therefore1103 !-- mi = 4/3 * pi * rm_ice**3 * rho_ice1104 !--HYPOTHESIS 2: the ice crystals are monodisperse with the1105 !--initial radius rm_ice_0.1106 !--NB. this is notably different than the assumption1107 !--of a distributed qice in the cloud made in the sublimation process;1108 !--should it be consistent?1109 !1110 !--As the deposition process does not create new ice crystals,1111 !--and because we assume a same rm_ice value for all crystals1112 !--therefore the sublimation process does not destroy ice crystals1113 !--(or, in a limit case, it destroys all ice crystals), then1114 !--Nice is a constant during the sublimation/deposition process.1115 !-- dmi = dqi, et Nice = qi_0 / ( 4/3 RPI rm_ice_0**3 rho_ice )1116 !1117 !--The deposition equation then reads:1118 !-- dqi/dt = alpha*4pi*capa_cond_cirrus*rm_ice*(qvc-qsat)/qsat / ( R_v*T/esi/Dv + Ls/ka/T * (Ls/R_v/T - 1) ) * Nice1119 !-- dqi/dt = alpha*4pi*capa_cond_cirrus* (qi / qi_0)**(1/3) *rm_ice_0*(qvc-qsat)/qsat &1120 !-- / ( R_v*T/esi/Dv + Ls/ka/T * (Ls*R_v/T - 1) ) &1121 !-- * qi_0 / ( 4/3 RPI rm_ice_0**3 rho_ice )1122 !-- dqi/dt = qi**(1/3) * (qvc - qsat) * qi_0**(2/3) &1123 !-- *alpha/qsat*capa_cond_cirrus/ (R_v*T/esi/Dv + Ls/ka/T*(Ls*R_v/T - 1)) / ( 1/3 rm_ice_0**2 rho_ice )1124 !--and we have1125 !-- dqvc/dt = - qi**(1/3) * (qvc - qsat) / kappa * alpha * qi_0**(2/3) / rm_ice_0**21126 !-- dqi/dt = qi**(1/3) * (qvc - qsat) / kappa * alpha * qi_0**(2/3) / rm_ice_0**21127 !--where kappa = 1/3*rho_ice/capa_cond_cirrus*qsat*(R_v*T/esi/Dv + Ls/ka/T*(Ls/R_v/T - 1))1128 !1129 !--This system of equations can be resolved with an exact1130 !--explicit numerical integration, having one variable resolved1131 !--explicitly, the other exactly. The exactly resolved variable is1132 !--the one decreasing, so it is qvc if the process is1133 !--condensation, qi if it is sublimation.1134 !1135 !--kappa is computed as an initialisation constant, as it depends only1136 !--on temperature and other pre-computed values1137 pres_sat = qsat / ( EPS_W + ( 1. - EPS_W ) * qsat ) * pplay1138 !--This formula for air thermal conductivity comes from Beard and Pruppacher (1971)1139 air_thermal_conduct = ( 5.69 + 0.017 * ( temp - RTT ) ) * 1.e-3 * 4.1841140 !--This formula for water vapor diffusivity comes from Hall and Pruppacher (1976)1141 water_vapor_diff = 0.211 * ( temp / RTT )**1.94 * ( 101325. / pplay ) * 1.e-41142 kappa = 1. / 3. * rho_ice / capa_cond_cirrus * qsat &1143 * ( RV * temp / water_vapor_diff / pres_sat &1144 + RLSTT / air_thermal_conduct / temp * ( RLSTT / RV / temp - 1. ) )1145 !--NB. the greater kappa, the lower the efficiency of the deposition/sublimation process1146 1147 !--Dry density [kg/m3]1148 rho = pplay / temp / RD1149 1150 !--Here, the initial vapor in the cloud is qvapincld, and we compute1151 !--the new vapor qvapincld_new1152 1153 !--rm_ice formula from McFarquhar and Heymsfield (1997)1154 iwc = qiceincld * rho * 1e31155 iwc_inf100 = MIN(iwc, 0.252 * iwc**0.837)1156 iwc_log_inf100 = LOG10( MAX(eps, iwc_inf100) )1157 iwc_log_sup100 = LOG10( MAX(eps, iwc - iwc_inf100) )1158 1159 alpha_inf100 = - 4.99E-3 - 0.0494 * iwc_log_inf1001160 coef_inf100 = iwc_inf100 * alpha_inf100**3 / 120.1161 1162 mu_sup100 = ( 5.2 + 0.0013 * ( temp - RTT ) ) &1163 + ( 0.026 - 1.2E-3 * ( temp - RTT ) ) * iwc_log_sup1001164 sigma_sup100 = ( 0.47 + 2.1E-3 * ( temp - RTT ) ) &1165 + ( 0.018 - 2.1E-4 * ( temp - RTT ) ) * iwc_log_sup1001166 coef_sup100 = ( iwc - iwc_inf100 ) / EXP( 3. * mu_sup100 + 4.5 * sigma_sup100**2 )1167 1168 Dm_ice = ( 2. / alpha_inf100 * coef_inf100 + EXP( mu_sup100 + 0.5 * sigma_sup100**2 ) &1169 * coef_sup100 ) / ( coef_inf100 + coef_sup100 )1170 rm_ice = Dm_ice / 2. * 1.E-61171 1172 IF ( qvapincld .GE. qsat ) THEN1173 !--If the cloud is initially supersaturated1174 !--Exact explicit integration (qvc exact, qice explicit)1175 qvapincld_depsub = qsat + ( qvapincld - qsat ) &1176 * EXP( - depo_coef_cirrus * dtime * qiceincld / kappa / rm_ice**2 )1177 ELSE1178 !--If the cloud is initially subsaturated1179 !--Exact explicit integration (qvc exact, qice explicit)1180 !--Same but depo_coef_cirrus = 11181 qvapincld_depsub = qsat + ( qvapincld - qsat ) &1182 * EXP( - dtime * qiceincld / kappa / rm_ice**2 )1183 IF ( qvapincld_depsub .GE. ( qvapincld + qiceincld ) ) &1184 qvapincld_depsub = 0.1185 ENDIF ! qvapincld .GT. qsat1186 1187 END FUNCTION QVAPINCLD_DEPSUB1188 1189 1277 END MODULE lmdz_lscp_condensation -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_ini.f90
r5602 r5609 162 162 !$OMP THREADPRIVATE(ok_weibull_warm_clouds) 163 163 164 REAL, SAVE, PROTECTED :: ffallv_issr ! tuning coefficient crystal fall velocity, cirrus clouds (with ISSR) 165 !$OMP THREADPRIVATE(ffallv_issr) 166 164 167 REAL, SAVE, PROTECTED :: depo_coef_cirrus=.7 ! [-] deposition coefficient for growth of ice crystals in cirrus clouds 165 168 !$OMP THREADPRIVATE(depo_coef_cirrus) … … 168 171 !$OMP THREADPRIVATE(capa_cond_cirrus) 169 172 170 REAL, SAVE, PROTECTED :: std_subl_pdf_lscp=2. ! [%] standard deviation of the gaussian distribution of water inside iceclouds171 !$OMP THREADPRIVATE( std_subl_pdf_lscp)172 173 REAL, SAVE, PROTECTED :: beta_pdf_lscp= 1.E-3! [SI] tuning coefficient for the standard deviation of the PDF of water vapor in the clear sky region173 REAL, SAVE, PROTECTED :: mu_subl_pdf_lscp=1./3. ! [-] factor for the ice distribution inside cirrus clouds 174 !$OMP THREADPRIVATE(mu_subl_pdf_lscp) 175 176 REAL, SAVE, PROTECTED :: beta_pdf_lscp=8.75E-4 ! [SI] tuning coefficient for the standard deviation of the PDF of water vapor in the clear sky region 174 177 !$OMP THREADPRIVATE(beta_pdf_lscp) 175 178 … … 192 195 !$OMP THREADPRIVATE(b_homofreez) 193 196 194 REAL, SAVE, PROTECTED :: delta_hetfreez= 1.! [-] value between 0 and 1 to simulate for heterogeneous freezing.197 REAL, SAVE, PROTECTED :: delta_hetfreez=0.85 ! [-] value between 0 and 1 to simulate for heterogeneous freezing. 195 198 !$OMP THREADPRIVATE(delta_hetfreez) 196 199 … … 344 347 !$OMP THREADPRIVATE(ok_ice_sedim) 345 348 346 REAL, SAVE, PROTECTED :: ice_fallspeed_sedim=0.1 ! Ice fallspeed velocity for sedimentation [m/s]347 !$OMP THREADPRIVATE( ice_fallspeed_sedim)349 REAL, SAVE, PROTECTED :: fallice_sedim=1. ! Tuning factor for ice fallspeed velocity for sedimentation [-] 350 !$OMP THREADPRIVATE(fallice_sedim) 348 351 !--End of the parameters for poprecip 349 352 … … 466 469 CALL getin_p('snow_fallspeed_cld',snow_fallspeed_cld) 467 470 CALL getin_p('ok_ice_sedim',ok_ice_sedim) 468 CALL getin_p(' ice_fallspeed_sedim',ice_fallspeed_sedim)471 CALL getin_p('fallice_sedim',fallice_sedim) 469 472 ! for condensation and ice supersaturation 470 473 CALL getin_p('ok_unadjusted_clouds',ok_unadjusted_clouds) 471 474 CALL getin_p('ok_weibull_warm_clouds',ok_weibull_warm_clouds) 475 ffallv_issr=ffallv_lsc 476 CALL getin_p('ffallv_issr',ffallv_issr) 472 477 CALL getin_p('depo_coef_cirrus',depo_coef_cirrus) 473 478 CALL getin_p('capa_cond_cirrus',capa_cond_cirrus) 474 CALL getin_p(' std_subl_pdf_lscp',std_subl_pdf_lscp)479 CALL getin_p('mu_subl_pdf_lscp',mu_subl_pdf_lscp) 475 480 CALL getin_p('beta_pdf_lscp',beta_pdf_lscp) 476 481 CALL getin_p('temp_thresh_pdf_lscp',temp_thresh_pdf_lscp) … … 562 567 WRITE(lunout,*) 'lscp_ini, snow_fallspeed_cld:', snow_fallspeed_cld 563 568 WRITE(lunout,*) 'lscp_ini, ok_ice_sedim:', ok_ice_sedim 564 WRITE(lunout,*) 'lscp_ini, ice_fallspeed_sedim:', ice_fallspeed_sedim569 WRITE(lunout,*) 'lscp_ini, fallice_sedim:', fallice_sedim 565 570 ! for condensation and ice supersaturation 566 571 WRITE(lunout,*) 'lscp_ini, ok_ice_supersat:', ok_ice_supersat 567 572 WRITE(lunout,*) 'lscp_ini, ok_unadjusted_clouds:', ok_unadjusted_clouds 568 573 WRITE(lunout,*) 'lscp_ini, ok_weibull_warm_clouds:', ok_weibull_warm_clouds 574 WRITE(lunout,*) 'lscp_ini, ffallv_issr', ffallv_issr 569 575 WRITE(lunout,*) 'lscp_ini, depo_coef_cirrus:', depo_coef_cirrus 570 576 WRITE(lunout,*) 'lscp_ini, capa_cond_cirrus:', capa_cond_cirrus 571 WRITE(lunout,*) 'lscp_ini, std_subl_pdf_lscp:', std_subl_pdf_lscp577 WRITE(lunout,*) 'lscp_ini, mu_subl_pdf_lscp:', mu_subl_pdf_lscp 572 578 WRITE(lunout,*) 'lscp_ini, beta_pdf_lscp:', beta_pdf_lscp 573 579 WRITE(lunout,*) 'lscp_ini, temp_thresh_pdf_lscp:', temp_thresh_pdf_lscp -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_precip.f90
r5589 r5609 18 18 SUBROUTINE histprecip_precld( & 19 19 klon, dtime, iftop, paprsdn, paprsup, pplay, zt, ztupnew, zq, & 20 zmqc, zneb, znebprecip, znebprecipclr, &20 zmqc, zneb, znebprecip, znebprecipclr, icesed_flux, & 21 21 zrfl, zrflclr, zrflcld, zifl, ziflclr, ziflcld, dqreva, dqssub & 22 22 ) 23 23 24 USE lmdz_lscp_ini, ONLY : iflag_evap_prec 24 USE lmdz_lscp_ini, ONLY : iflag_evap_prec, ok_ice_sedim 25 25 USE lmdz_lscp_ini, ONLY : coef_eva, coef_sub, ztfondue 26 26 USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG … … 44 44 REAL, INTENT(INOUT), DIMENSION(klon) :: zq !--current water vapor specific humidity (includes evaporated qi and ql) [kg/kg] 45 45 REAL, INTENT(INOUT), DIMENSION(klon) :: zmqc !--specific humidity in the precipitation falling from the upper layer [kg/kg] 46 REAL, INTENT(IN), DIMENSION(klon) :: icesed_flux !--sedimentated ice flux [kg/s/m2] 46 47 47 48 REAL, INTENT(IN), DIMENSION(klon) :: zneb !--cloud fraction IN THE LAYER ABOVE [-] … … 74 75 75 76 REAL :: zmelt 77 REAL :: qice_sedim 76 78 INTEGER :: i 77 79 … … 118 120 ENDDO 119 121 122 ENDIF 123 124 !-------------------- 125 !-- ICE SEDIMENTATION 126 !-------------------- 127 IF ( ok_ice_sedim ) THEN 128 DO i =1, klon 129 !--If the sedimentation of ice crystals is activated, the falling ice is sublimated and 130 !--added to the total water content of the gridbox 131 IF ( icesed_flux(i) .GT. 0. ) THEN 132 qice_sedim = icesed_flux(i) / ( paprsdn(i) - paprsup(i) ) * RG * dtime 133 !--Vapor is updated after evaporation/sublimation (it is increased) 134 zq(i) = zq(i) + qice_sedim 135 !--Air and precip temperature (i.e., gridbox temperature) 136 !--is updated due to latent heat cooling 137 zt(i) = zt(i) & 138 - qice_sedim * RLSTT / RCPD & 139 / ( 1. + RVTMP2 * ( zq(i) + zmqc(i) ) ) 140 ENDIF ! ok_ice_sedim 141 ENDDO 120 142 ENDIF 121 143 … … 307 329 308 330 SUBROUTINE histprecip_postcld( & 309 klon, dtime, iftop, paprsdn, paprsup, pplay, ctot_vol, ptconv, zdqsdT_raw, &310 z t, zq, zoliq, zoliql, zoliqi, zcond, zfice, zmqc, &331 klon, dtime, iftop, paprsdn, paprsup, pplay, ctot_vol, ptconv, pt_pron_clds, & 332 zdqsdT_raw, zt, zq, zoliq, zoliql, zoliqi, zcond, zfice, zmqc, icesed_flux, & 311 333 rneb, znebprecipclr, znebprecipcld, zneb, tot_zneb, zrho_up, zvelo_up, & 312 334 zrfl, zrflclr, zrflcld, zifl, ziflclr, ziflcld, & 313 zradocond, zradoice, dqrauto, dqsauto &335 zradocond, zradoice, dqrauto, dqsauto, dqised & 314 336 ) 315 337 … … 321 343 iflag_autoconversion, ok_radocond_snow, ok_bug_phase_lscp, & 322 344 niter_lscp 345 USE lmdz_lscp_ini, ONLY : ok_ice_sedim, fallice_sedim, eps 323 346 USE lmdz_lscp_tools, ONLY : fallice_velocity 324 347 … … 335 358 REAL, INTENT(IN), DIMENSION(klon) :: ctot_vol !--volumic cloud fraction [-] 336 359 LOGICAL, INTENT(IN), DIMENSION(klon) :: ptconv !--true if we are in a convective point 360 LOGICAL, INTENT(IN), DIMENSION(klon) :: pt_pron_clds !--true if we are in a prognostic clouds point 337 361 REAL, INTENT(IN), DIMENSION(klon) :: zdqsdT_raw !--derivative of qsat w.r.t. temperature times L/Cp [SI] 338 362 … … 360 384 REAL, INTENT(INOUT), DIMENSION(klon) :: ziflclr !--flux of snow gridbox-mean in clear sky [kg/s/m2] 361 385 REAL, INTENT(INOUT), DIMENSION(klon) :: ziflcld !--flux of snow gridbox-mean in cloudy air [kg/s/m2] 386 REAL, INTENT(OUT), DIMENSION(klon) :: icesed_flux !--flux of sedimentated ice [kg/s/m2] 362 387 363 388 REAL, INTENT(OUT), DIMENSION(klon) :: zradocond !--condensed water used in the radiation scheme [kg/kg] … … 365 390 REAL, INTENT(OUT), DIMENSION(klon) :: dqrauto !--rain tendency due to autoconversion of cloud liquid [kg/kg/s] 366 391 REAL, INTENT(OUT), DIMENSION(klon) :: dqsauto !--snow tendency due to autoconversion of cloud ice [kg/kg/s] 392 REAL, INTENT(INOUT), DIMENSION(klon) :: dqised !--ice water content tendency due to sedimentation of ice crystals [kg/kg/s] 367 393 368 394 … … 390 416 REAL, DIMENSION(klon) :: ziflprev 391 417 418 ! Local variable for sedimentation 419 REAL :: iwcg, tempc, icevelo 420 REAL :: qice_sedim 421 392 422 ! Misc 393 423 INTEGER :: i, n … … 398 428 zqpreci(:) = 0. 399 429 ziflprev(:) = 0. 430 431 icesed_flux(:) = 0. 400 432 401 433 … … 474 506 ENDDO 475 507 476 CALL fallice_velocity(klon, iwc, zt, zrho, pplay, ptconv, zvelo)508 CALL fallice_velocity(klon, iwc, zt, zrho, pplay, ptconv, pt_pron_clds, zvelo) 477 509 478 510 DO i = 1, klon … … 656 688 ENDDO 657 689 690 !--------------------------------------------------------- 691 !-- ICE SEDIMENTATION 692 !--------------------------------------------------------- 693 IF ( ok_ice_sedim ) THEN 694 695 DO i = 1, klon 696 IF ( ( zoliqi(i) .GT. 0. ) .AND. ( rneb(i) .GT. eps ) .AND. pt_pron_clds(i) ) THEN 697 698 iwcg = MAX( zrho(i) * zoliqi(i) / zneb(i) * 1000., eps ) ! iwc in g/m3 699 tempc = zt(i) - RTT ! celcius temp 700 ! so-called 'empirical parameterization' in Stubenrauch et al. 2019 701 IF ( tempc .GE. -60. ) THEN 702 icevelo = EXP( 1.9714 + 0.00216078 * tempc & 703 - ( 0.0000414122 * tempc**2 + 0.00538922 * tempc + 0.0516344 ) * LOG(iwcg) ) 704 ELSE 705 icevelo = 65. * iwcg**0.2 * ( 15000. / pplay(i) )**0.15 706 ENDIF 707 icevelo = fallice_sedim * icevelo / 100.0 ! from cm/s to m/s 708 709 qice_sedim = zoliqi(i) * MIN(1., icevelo * dtime / zdz(i)) 710 !--We remove the ice that was sedimentated in the gridbox (it cannot sedimentate two 711 !--times in the same timestep) 712 !qice_sedim = MAX(0., qice_sedim - dqised(i) * dtime) 713 !--Add tendencies 714 zoliqi(i) = zoliqi(i) - qice_sedim 715 zoliq(i) = zoliq(i) - qice_sedim 716 !--Convert to flux 717 icesed_flux(i) = qice_sedim * ( paprsdn(i) - paprsup(i) ) / RG / dtime 718 719 !--Diagnostic tendencies 720 dqised(i) = dqised(i) - qice_sedim / dtime 721 ENDIF 722 ENDDO 723 ENDIF 724 658 725 ! LTP: limit of surface cloud fraction covered by precipitation when the local intensity of the flux is below rain_int_min 659 726 ! if iflag_evap_prec>=4 … … 713 780 SUBROUTINE poprecip_precld( & 714 781 klon, dtime, iftop, paprsdn, paprsup, pplay, temp, tempupnew, qvap, & 715 qprecip, precipfracclr, precipfraccld, qvapclrup, qtotupnew, qice_sedim, &782 qprecip, precipfracclr, precipfraccld, qvapclrup, qtotupnew, icesed_flux, & 716 783 cldfra, qvc, qliq, qice, & 717 784 rain, rainclr, raincld, snow, snowclr, snowcld, & 718 dqreva, dqssub, dcfsed, dqvcsed & 719 ) 785 dqreva, dqssub) 720 786 721 787 USE lmdz_lscp_ini, ONLY : coef_eva, coef_sub, expo_eva, expo_sub, thresh_precip_frac … … 749 815 REAL, INTENT(IN), DIMENSION(klon) :: qvapclrup !--clear-sky specific humidity IN THE LAYER ABOVE [kg/kg] 750 816 REAL, INTENT(IN), DIMENSION(klon) :: qtotupnew !--total specific humidity IN THE LAYER ABOVE [kg/kg] 751 REAL, INTENT(IN), DIMENSION(klon) :: qice_sedim !--ice water content that sedimentated from the layer above [kg/kg]817 REAL, INTENT(IN), DIMENSION(klon) :: icesed_flux !--sedimentated ice water flux [kg/s/m2] 752 818 753 819 REAL, INTENT(INOUT), DIMENSION(klon) :: cldfra !--cloud fraction at the beginning of lscp - used only if the cloud properties are advected [-] … … 766 832 REAL, INTENT(OUT), DIMENSION(klon) :: dqreva !--rain tendency due to evaporation [kg/kg/s] 767 833 REAL, INTENT(OUT), DIMENSION(klon) :: dqssub !--snow tendency due to sublimation [kg/kg/s] 768 REAL, INTENT(OUT), DIMENSION(klon) :: dcfsed !--cloud fraction tendency due to sedimentation of ice crystals [s-1]769 REAL, INTENT(OUT), DIMENSION(klon) :: dqvcsed !--cloud water vapor tendency due to sedimentation of ice crystals [kg/kg/s]770 834 771 835 … … 791 855 !--Specific heat constant 792 856 REAL :: cpair, cpw 857 !--Specific ice water content sedimentated 858 REAL :: qice_sedim 793 859 794 860 !--Initialisation … … 796 862 dqreva(:) = 0. 797 863 dqssub(:) = 0. 798 IF ( ok_ice_sedim .AND. ok_ice_supersat ) THEN799 dcfsed(:) = 0.800 dqvcsed(:) = 0.801 ENDIF802 864 803 865 !-- dhum_to_dflux = rho * dz/dt = 1 / g * dP/dt … … 943 1005 !--If the sedimentation of ice crystals is activated, the falling ice is sublimated and 944 1006 !--added to the total water content of the gridbox 945 IF ( ok_ice_sedim .AND. ( qice_sedim(i) .GT. 0. ) ) THEN 1007 IF ( icesed_flux(i) .GT. 0. ) THEN 1008 qice_sedim = icesed_flux(i) / dhum_to_dflux(i) 946 1009 !--Vapor is updated after evaporation/sublimation (it is increased) 947 qvap(i) = qvap(i) + qice_sedim (i)1010 qvap(i) = qvap(i) + qice_sedim 948 1011 !--Air and precip temperature (i.e., gridbox temperature) 949 1012 !--is updated due to latent heat cooling 950 1013 temp(i) = temp(i) & 951 - qice_sedim (i)* RLSTT / RCPD &1014 - qice_sedim * RLSTT / RCPD & 952 1015 / ( 1. + RVTMP2 * ( qvap(i) + qprecip(i) ) ) 953 954 IF ( ok_ice_supersat ) THEN955 !--If ice supersaturation is activated, the cloud properties are prognostic.956 !--The falling ice is then considered a new cloud in the gridbox.957 !--BEWARE with this parameterisation, we can create a new cloud with a much958 !--different ice water content and water vapor content than the existing cloud959 !--(if it exists). This implies than unphysical fluxes of ice and vapor960 !--occur between the existing cloud and the newly formed cloud (from sedimentation).961 !--Note also that currently, the precipitation scheme assume a maximum962 !--random overlap, meaning that the new formed clouds will not be affected963 !--by vertical wind shear.964 ! Maybe we should reduce dcfsed?965 dcfsed(i) = precipfracclr_tmp(i)966 dqvcsed(i) = qvapclr * dcfsed(i)967 !--Add tendencies968 cldfra(i) = cldfra(i) + dcfsed(i)969 qvc(i) = qvc(i) + dqvcsed(i)970 qice(i) = qice(i) + qice_sedim(i)971 !--Normalisation972 dcfsed(i) = dcfsed(i) / dtime973 dqvcsed(i) = dqvcsed(i) / dtime974 ENDIF975 1016 ENDIF ! ok_ice_sedim 976 1017 … … 1326 1367 SUBROUTINE poprecip_postcld( & 1327 1368 klon, dtime, paprsdn, paprsup, pplay, ctot_vol, ptconv, & 1328 temp, qvap, qliq, qice, icefrac, cldfra, qice_sedim, &1369 temp, qvap, qliq, qice, icefrac, cldfra, icesed_flux, & 1329 1370 precipfracclr, precipfraccld, & 1330 1371 rain, rainclr, raincld, snow, snowclr, snowcld, & … … 1347 1388 rain_fallspeed_clr, rain_fallspeed_cld, & 1348 1389 snow_fallspeed_clr, snow_fallspeed_cld, & 1349 ok_ice_sedim, ice_fallspeed_sedim1390 ok_ice_sedim, fallice_sedim 1350 1391 1351 1392 … … 1368 1409 REAL, INTENT(IN), DIMENSION(klon) :: icefrac !--ice fraction [-] 1369 1410 REAL, INTENT(IN), DIMENSION(klon) :: cldfra !--cloud fraction [-] 1370 REAL, INTENT(INOUT), DIMENSION(klon) :: qice_sedim !--quantity of sedimentated ice [kg/kg]1371 1411 1372 1412 REAL, INTENT(INOUT), DIMENSION(klon) :: precipfracclr !--fraction of precipitation in the clear sky IN THE LAYER ABOVE [-] … … 1382 1422 REAL, INTENT(INOUT), DIMENSION(klon) :: snowcld !--flux of snow gridbox-mean in cloudy air coming from the layer above [kg/s/m2] 1383 1423 1424 REAL, INTENT(OUT), DIMENSION(klon) :: icesed_flux !--flux of sedimentated ice [kg/s/m2] 1384 1425 REAL, INTENT(OUT), DIMENSION(klon) :: qraindiag !--DIAGNOSTIC specific rain content [kg/kg] 1385 1426 REAL, INTENT(OUT), DIMENSION(klon) :: qsnowdiag !--DIAGNOSTIC specific snow content [kg/kg] … … 1393 1434 REAL, INTENT(OUT), DIMENSION(klon) :: dqsfreez !--snow tendency due to freezing [kg/kg/s] 1394 1435 REAL, INTENT(OUT), DIMENSION(klon) :: dqrfreez !--rain tendency due to freezing [kg/kg/s] 1395 REAL, INTENT( OUT),DIMENSION(klon) :: dqised !--ice water content tendency due to sedimentation of ice crystals [kg/kg/s]1436 REAL, INTENT(INOUT), DIMENSION(klon) :: dqised !--ice water content tendency due to sedimentation of ice crystals [kg/kg/s] 1396 1437 1397 1438 … … 1436 1477 1437 1478 !--Ice sedimentation 1438 REAL :: dz, qice_sedim_tmp 1479 REAL :: iwcg, tempc, icevelo 1480 REAL :: dz, qice_sedim 1439 1481 1440 1482 … … 1443 1485 1444 1486 qzero(:) = 0. 1487 icesed_flux(:) = 0. 1445 1488 1446 1489 dqrcol(:) = 0. … … 1453 1496 dqrfreez(:) = 0. 1454 1497 dqsfreez(:) = 0. 1455 IF ( ok_ice_sedim ) dqised(:) = 0.1456 1498 1457 1499 … … 1917 1959 !--------------------------------------------------------- 1918 1960 IF ( ok_ice_sedim ) THEN 1919 qice_sedim_tmp = 0. 1920 1921 IF ( temp(i) .LE. temp_nowater ) THEN 1961 1962 IF ( ( qice(i) .GT. 0. ) .AND. ( cldfra(i) .GT. eps ) ) THEN 1963 1922 1964 rho = pplay(i) / temp(i) / RD 1965 iwcg = MAX( rho * qice(i) / cldfra(i) * 1000., eps ) ! iwc in g/m3 1966 tempc = temp(i) - RTT ! celcius temp 1967 ! so-called 'empirical parameterization' in Stubenrauch et al. 2019 1968 IF ( tempc .GE. -60. ) THEN 1969 icevelo = EXP( 1.9714 + 0.00216078 * tempc & 1970 - ( 0.0000414122 * tempc**2 + 0.00538922 * tempc + 0.0516344 ) * LOG(iwcg) ) 1971 ELSE 1972 icevelo = 65. * iwcg**0.2 * ( 15000. / pplay(i) )**0.15 1973 ENDIF 1974 icevelo = fallice_sedim * icevelo / 100.0 ! from cm/s to m/s 1975 1923 1976 dz = ( paprsdn(i) - paprsup(i) ) / RG / rho 1924 qice_sedim _tmp = qice(i) * MIN(1., ice_fallspeed_sedim* dtime / dz)1977 qice_sedim = qice(i) * MIN(1., icevelo * dtime / dz) 1925 1978 !--Add tendencies 1926 qice(i) = qice(i) - qice_sedim _tmp1927 ENDIF1928 1929 !--Diagnostic tendencies 1930 dqised(i) = ( qice_sedim(i) - qice_sedim_tmp ) / dtime1931 !--Save quantity that will be sedimentated in the layer below1932 qice_sedim(i) = qice_sedim_tmp1979 qice(i) = qice(i) - qice_sedim 1980 !--Convert to flux 1981 icesed_flux(i) = qice_sedim * dhum_to_dflux(i) 1982 1983 !--Diagnostic tendencies 1984 dqised(i) = dqised(i) - qice_sedim / dtime 1985 ENDIF 1933 1986 ENDIF 1934 1987 -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_tools.f90
r5577 r5609 6 6 7 7 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 8 SUBROUTINE FALLICE_VELOCITY(klon,iwc,temp,rho,pres,ptconv, velo)8 SUBROUTINE FALLICE_VELOCITY(klon,iwc,temp,rho,pres,ptconv,ptpronclds,velo) 9 9 10 10 ! Ref: … … 16 16 ! 3212–3234. https://doi.org/10.1029/2019MS001642 17 17 18 use lmdz_lscp_ini, only: iflag_vice, ffallv_con, ffallv_lsc 18 use lmdz_lscp_ini, only: iflag_vice, ffallv_con, ffallv_lsc, ffallv_issr 19 19 use lmdz_lscp_ini, only: cice_velo, dice_velo 20 use lmdz_lscp_ini, only: ok_bug_ice_fallspeed 20 use lmdz_lscp_ini, only: ok_bug_ice_fallspeed, eps 21 21 22 22 IMPLICIT NONE … … 28 28 REAL, INTENT(IN), DIMENSION(klon) :: pres ! air pressure [Pa] 29 29 LOGICAL, INTENT(IN), DIMENSION(klon) :: ptconv ! convective point [-] 30 LOGICAL, INTENT(IN), DIMENSION(klon) :: ptpronclds! prognostic clouds point [-] 30 31 31 32 REAL, INTENT(OUT), DIMENSION(klon) :: velo ! fallspeed velocity of crystals [m/s] … … 42 43 IF (ptconv(i)) THEN 43 44 fallv_tun=ffallv_con 45 ELSEIF (ptpronclds(i)) THEN 46 fallv_tun=ffallv_issr 44 47 ELSE 45 48 fallv_tun=ffallv_lsc … … 51 54 ELSE 52 55 ! AB the threshold is way too high, we reduce it 53 iwcg=MAX(iwc(i)*1000., 1E-10) ! iwc in g/m3. We set a minimum value to prevent from division by 056 iwcg=MAX(iwc(i)*1000.,eps) ! iwc in g/m3. We set a minimum value to prevent from division by 0 54 57 ENDIF 55 58 phpa=pres(i)/100. ! pressure in hPa -
LMDZ6/branches/contrails/libf/phylmd/phyetat0_mod.f90
r5601 r5609 18 18 USE surface_data, ONLY : type_ocean, version_ocean 19 19 USE phyetat0_get_mod, ONLY : phyetat0_get, phyetat0_srf 20 USE phys_state_var_mod, ONLY : ancien_ok, c lwcon, detr_therm, phys_tstep, &20 USE phys_state_var_mod, ONLY : ancien_ok, cwcon, clwcon, detr_therm, phys_tstep, & 21 21 qsol, fevap, z0m, z0h, agesno, & 22 22 du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, & 23 23 falb_dir, falb_dif, prw_ancien, prlw_ancien, prsw_ancien, prbsw_ancien, & 24 24 ftsol, pbl_tke, pctsrf, q_ancien, ql_ancien, qs_ancien, qbs_ancien, & 25 cf_ancien, qvc_ancien, cfa_ancien, qta_ancien, radpas, radsol, rain_fall, ratqs, & 26 rnebcon, rugoro, sig1, snow_fall, bs_fall, solaire_etat0, sollw, sollwdown, & 25 cf_ancien, qvc_ancien, cfa_ancien, pcf_ancien, qva_ancien, qia_ancien, & 26 radpas, radsol, rain_fall, & 27 ratqs, rnebcon, rugoro, sig1, snow_fall, bs_fall, solaire_etat0, sollw, sollwdown, & 27 28 solsw, solswfdiff, t_ancien, u_ancien, v_ancien, w01, wake_cstar, wake_deltaq, & 28 29 wake_deltat, wake_delta_pbl_TKE, delta_tsurf, beta_aridity, wake_fip, wake_pe, & … … 415 416 ancien_ok=ancien_ok.AND.phyetat0_get(cf_ancien,"CFANCIEN","CFANCIEN",0.) 416 417 ancien_ok=ancien_ok.AND.phyetat0_get(qvc_ancien,"QVCANCIEN","QVCANCIEN",0.) 418 found=phyetat0_get(cwcon,"CWCON","CWCON",0.) 417 419 ELSE 418 420 cf_ancien(:,:)=0. … … 423 425 IF ( ok_plane_contrail ) THEN 424 426 ancien_ok=ancien_ok.AND.phyetat0_get(cfa_ancien,"CFAANCIEN","CFAANCIEN",0.) 425 ancien_ok=ancien_ok.AND.phyetat0_get(cfa_ancien,"QTAANCIEN","QTAANCIEN",0.) 427 ancien_ok=ancien_ok.AND.phyetat0_get(pcf_ancien,"PCFANCIEN","PCFANCIEN",0.) 428 ancien_ok=ancien_ok.AND.phyetat0_get(qva_ancien,"QVAANCIEN","QVAANCIEN",0.) 429 ancien_ok=ancien_ok.AND.phyetat0_get(qia_ancien,"QIAANCIEN","QIAANCIEN",0.) 426 430 ELSE 427 431 cfa_ancien(:,:)=0. 428 qta_ancien(:,:)=0. 432 pcf_ancien(:,:)=0. 433 qva_ancien(:,:)=0. 434 qia_ancien(:,:)=0. 429 435 ENDIF 430 436 … … 458 464 IF ( ok_plane_contrail ) THEN 459 465 IF ( ( maxval(cfa_ancien).EQ.minval(cfa_ancien) ) .OR. & 460 ( maxval(qta_ancien).EQ.minval(qta_ancien) ) ) THEN 466 ( maxval(pcf_ancien).EQ.minval(pcf_ancien) ) .OR. & 467 ( maxval(qva_ancien).EQ.minval(qva_ancien) ) .OR. & 468 ( maxval(qia_ancien).EQ.minval(qia_ancien) ) ) THEN 461 469 ancien_ok=.false. 462 470 ENDIF -
LMDZ6/branches/contrails/libf/phylmd/phyredem.f90
r5601 r5609 23 23 prw_ancien, prlw_ancien, prsw_ancien, prbsw_ancien, & 24 24 ql_ancien, qs_ancien, qbs_ancien, cf_ancien, & 25 qvc_ancien, cfa_ancien, qta_ancien, &26 u_ancien, v_ancien,&27 c lwcon, rnebcon, ratqs, pbl_tke,&25 qvc_ancien, cfa_ancien, pcf_ancien, & 26 qva_ancien, qia_ancien, u_ancien, v_ancien, & 27 cwcon, clwcon, rnebcon, ratqs, pbl_tke, & 28 28 wake_delta_pbl_tke, zmax0, f0, sig1, w01, & 29 29 wake_deltat, wake_deltaq, wake_s, awake_s, & … … 255 255 CALL put_field(pass,"CFANCIEN", "CFANCIEN", cf_ancien) 256 256 CALL put_field(pass,"QVCANCIEN", "QVCANCIEN", qvc_ancien) 257 CALL put_field(pass,"CWCON", "CWCON", cwcon) 257 258 ENDIF 258 259 259 260 IF ( ok_plane_contrail ) THEN 260 261 CALL put_field(pass,"CFAANCIEN", "CFAANCIEN", cfa_ancien) 261 CALL put_field(pass,"QTAANCIEN", "QTAANCIEN", qta_ancien) 262 CALL put_field(pass,"PCFANCIEN", "PCFANCIEN", pcf_ancien) 263 CALL put_field(pass,"QVAANCIEN", "QVAANCIEN", qva_ancien) 264 CALL put_field(pass,"QIAANCIEN", "QIAANCIEN", qia_ancien) 262 265 ENDIF 263 266 -
LMDZ6/branches/contrails/libf/phylmd/phys_local_var_mod.F90
r5601 r5609 669 669 REAL, SAVE, ALLOCATABLE :: cfa_seri(:,:), d_cfa_dyn(:,:) 670 670 !$OMP THREADPRIVATE(cfa_seri, d_cfa_dyn) 671 REAL, SAVE, ALLOCATABLE :: qta_seri(:,:), d_qta_dyn(:,:) 672 !$OMP THREADPRIVATE(qta_seri, d_qta_dyn) 671 REAL, SAVE, ALLOCATABLE :: pcf_seri(:,:), d_pcf_dyn(:,:) 672 !$OMP THREADPRIVATE(pcf_seri, d_pcf_dyn) 673 REAL, SAVE, ALLOCATABLE :: qva_seri(:,:), d_qva_dyn(:,:) 674 !$OMP THREADPRIVATE(qva_seri, d_qva_dyn) 675 REAL, SAVE, ALLOCATABLE :: qia_seri(:,:), d_qia_dyn(:,:) 676 !$OMP THREADPRIVATE(qia_seri, d_qia_dyn) 673 677 REAL, SAVE, ALLOCATABLE :: flight_dist(:,:), flight_h2o(:,:) 674 678 !$OMP THREADPRIVATE(flight_dist, flight_h2o) … … 677 681 REAL, SAVE, ALLOCATABLE :: potcontfraP(:,:), potcontfraNP(:,:) 678 682 !$OMP THREADPRIVATE(potcontfraP, potcontfraNP) 679 REAL, SAVE, ALLOCATABLE :: qice_cont(:,:), dcfa_cir(:,:), dqta_cir(:,:) 680 !$OMP THREADPRIVATE(qice_cont, dcfa_cir, dqta_cir) 683 REAL, SAVE, ALLOCATABLE :: qice_perscont(:,:) 684 !$OMP THREADPRIVATE(qice_perscont) 685 REAL, SAVE, ALLOCATABLE :: dcfa_cir(:,:), dqta_cir(:,:) 686 !$OMP THREADPRIVATE(dcfa_cir, dqta_cir) 681 687 REAL, SAVE, ALLOCATABLE :: dcfa_ini(:,:), dqia_ini(:,:), dqta_ini(:,:) 682 688 !$OMP THREADPRIVATE(dcfa_ini, dqia_ini, dqta_ini) … … 1244 1250 ALLOCATE(d_q_avi(klon,klev)) 1245 1251 ALLOCATE(cfa_seri(klon,klev), d_cfa_dyn(klon,klev)) 1246 ALLOCATE(qta_seri(klon,klev), d_qta_dyn(klon,klev)) 1252 ALLOCATE(pcf_seri(klon,klev), d_pcf_dyn(klon,klev)) 1253 ALLOCATE(qva_seri(klon,klev), d_qva_dyn(klon,klev)) 1254 ALLOCATE(qia_seri(klon,klev), d_qia_dyn(klon,klev)) 1247 1255 ALLOCATE(flight_dist(klon,klev), flight_h2o(klon,klev)) 1248 1256 ALLOCATE(Tcritcont(klon,klev), qcritcont(klon,klev)) 1249 1257 ALLOCATE(potcontfraP(klon,klev), potcontfraNP(klon,klev)) 1250 ALLOCATE(qice_cont(klon,klev), dcfa_cir(klon,klev), dqta_cir(klon,klev)) 1258 ALLOCATE(qice_perscont(klon,klev)) 1259 ALLOCATE(dcfa_cir(klon,klev), dqta_cir(klon,klev)) 1251 1260 ALLOCATE(dcfa_ini(klon,klev), dqia_ini(klon,klev), dqta_ini(klon,klev)) 1252 1261 ALLOCATE(dcfa_sub(klon,klev), dqia_sub(klon,klev), dqta_sub(klon,klev)) … … 1661 1670 1662 1671 !-- LSCP - aviation and contrails variables 1663 DEALLOCATE(d_q_avi, cfa_seri, d_cfa_dyn, qta_seri, d_qta_dyn, flight_dist, flight_h2o) 1672 DEALLOCATE(cfa_seri, d_cfa_dyn, pcf_seri, d_pcf_dyn) 1673 DEALLOCATE(qva_seri, d_qva_dyn, qia_seri, d_qia_dyn) 1674 DEALLOCATE(d_q_avi, flight_dist, flight_h2o) 1664 1675 DEALLOCATE(Tcritcont, qcritcont, potcontfraP, potcontfraNP) 1665 DEALLOCATE(qice_ cont, dcfa_cir, dqta_cir, dcfa_ini, dqia_ini, dqta_ini)1676 DEALLOCATE(qice_perscont, dcfa_cir, dqta_cir, dcfa_ini, dqia_ini, dqta_ini) 1666 1677 DEALLOCATE(dcfa_sub, dqia_sub, dqta_sub, dcfa_mix, dqia_mix, dqta_mix) 1667 1678 DEALLOCATE(cldfra_nocont, cldtau_nocont, cldemi_nocont, conttau, contemi) -
LMDZ6/branches/contrails/libf/phylmd/phys_output_ctrlout_mod.F90
r5601 r5609 2192 2192 TYPE(ctrl_out), SAVE :: o_dcfadyn = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),& 2193 2193 'dcfadyn', 'Dynamics linear contrail fraction tendency', 's-1', (/ ('',i=1,10) /)) 2194 TYPE(ctrl_out), SAVE :: o_qtaseri = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),& 2195 'qtaseri', 'Linear contrail total specific humidity', 'kg/kg', (/ ('',i=1,10) /)) 2196 TYPE(ctrl_out), SAVE :: o_dqtadyn = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),& 2197 'dqtadyn', 'Dynamics linear contrail total specific humidity tendency', 'kg/kg/s', (/ ('',i=1,10) /)) 2194 TYPE(ctrl_out), SAVE :: o_pcfseri = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),& 2195 'pcfseri', 'Contrail induced cirrus fraction', '-', (/ ('',i=1,10) /)) 2196 TYPE(ctrl_out), SAVE :: o_dpcfdyn = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),& 2197 'dpcfdyn', 'Dynamics contrail induced cirrus fraction tendency', 's-1', (/ ('',i=1,10) /)) 2198 TYPE(ctrl_out), SAVE :: o_qvaseri = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),& 2199 'qvaseri', 'Linear contrail total specific humidity', 'kg/kg', (/ ('',i=1,10) /)) 2200 TYPE(ctrl_out), SAVE :: o_dqvadyn = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),& 2201 'dqvadyn', 'Dynamics linear contrail total specific humidity tendency', 'kg/kg/s', (/ ('',i=1,10) /)) 2202 TYPE(ctrl_out), SAVE :: o_qiaseri = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),& 2203 'qiaseri', 'Linear contrail total specific humidity', 'kg/kg', (/ ('',i=1,10) /)) 2204 TYPE(ctrl_out), SAVE :: o_dqiadyn = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),& 2205 'dqiadyn', 'Dynamics linear contrail total specific humidity tendency', 'kg/kg/s', (/ ('',i=1,10) /)) 2198 2206 TYPE(ctrl_out), SAVE :: o_Tcritcont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),& 2199 2207 'Tcritcont', 'Temperature threshold for contrail formation', 'K', (/ ('',i=1,10) /)) … … 2204 2212 TYPE(ctrl_out), SAVE :: o_potcontfraNP = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/),& 2205 2213 'potcontfraNP', 'Potential non-persistent contrail fraction', '-', (/ ('', i=1,10)/)) 2206 TYPE(ctrl_out), SAVE :: o_qice_ cont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &2207 'qice_ cont', 'Linear contrails ice specific humidity', 'kg/kg', (/ ('', i=1, 10) /))2214 TYPE(ctrl_out), SAVE :: o_qice_perscont = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 2215 'qice_perscont', 'Contrail induced cirrus ice specific humidity', 'kg/kg', (/ ('', i=1, 10) /)) 2208 2216 TYPE(ctrl_out), SAVE :: o_dcfaini = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 2209 2217 'dcfaini', 'Initial formation linear contrail fraction tendency', 's-1', (/ ('', i=1, 10) /)) -
LMDZ6/branches/contrails/libf/phylmd/phys_output_write_mod.F90
r5601 r5609 229 229 o_issrfra250to300, o_issrfra300to400, o_issrfra400to500, & 230 230 !-- LSCP - aviation variables 231 o_cfaseri, o_dcfadyn, o_qtaseri, o_dqtadyn, o_dqavi, & 231 o_cfaseri, o_dcfadyn, o_pcfseri, o_dpcfdyn, & 232 o_qvaseri, o_dqvadyn, o_qiaseri, o_dqiadyn, o_dqavi, & 232 233 o_Tcritcont, o_qcritcont, o_potcontfraP, o_potcontfraNP, & 233 o_flight_dist, o_flight_h2o, o_qice_ cont, o_dcfacir, o_dqtacir, &234 o_flight_dist, o_flight_h2o, o_qice_perscont, o_dcfacir, o_dqtacir, & 234 235 o_dcfaini, o_dqiaini, o_dqtaini, o_dcfasub, o_dqiasub, o_dqtasub, & 235 236 o_dcfamix, o_dqiamix, o_dqtamix, & … … 360 361 issrfra100to150, issrfra150to200, issrfra200to250, & 361 362 issrfra250to300, issrfra300to400, issrfra400to500, & 362 cfa_seri, d_cfa_dyn, qta_seri, d_qta_dyn, d_q_avi, & 363 cfa_seri, d_cfa_dyn, pcf_seri, d_pcf_dyn, & 364 qva_seri, d_qva_dyn, qia_seri, d_qia_dyn, d_q_avi, & 363 365 Tcritcont, qcritcont, potcontfraP, potcontfraNP, & 364 flight_dist, flight_h2o, qice_ cont, dcfa_cir, dqta_cir, &366 flight_dist, flight_h2o, qice_perscont, dcfa_cir, dqta_cir, & 365 367 dcfa_ini, dqia_ini, dqta_ini, dcfa_sub, dqia_sub, dqta_sub, & 366 368 dcfa_mix, dqia_mix, dqta_mix, & … … 2105 2107 CALL histwrite_phy(o_dqsfreez, dqsfreez) 2106 2108 CALL histwrite_phy(o_dqsrim, dqsrim) 2107 IF ( ok_ice_sedim ) THEN2108 CALL histwrite_phy(o_dqised, dqised)2109 CALL histwrite_phy(o_dcfsed, dcfsed)2110 CALL histwrite_phy(o_dqvcsed, dqvcsed)2111 ENDIF2112 2109 ELSE 2113 2110 CALL histwrite_phy(o_dqreva, dqreva) … … 2116 2113 CALL histwrite_phy(o_dqsauto, dqsauto) 2117 2114 ENDIF 2115 CALL histwrite_phy(o_qsatl, qsatliq) 2116 CALL histwrite_phy(o_qsati, qsatice) 2118 2117 ENDIF 2119 2118 … … 2141 2140 CALL histwrite_phy(o_dqvccon, dqvc_con) 2142 2141 CALL histwrite_phy(o_dqvcmix, dqvc_mix) 2143 CALL histwrite_phy(o_qsatl, qsatliq)2144 CALL histwrite_phy(o_qsati, qsatice)2145 2142 CALL histwrite_phy(o_issrfra100to150, issrfra100to150) 2146 2143 CALL histwrite_phy(o_issrfra150to200, issrfra150to200) … … 2149 2146 CALL histwrite_phy(o_issrfra300to400, issrfra300to400) 2150 2147 CALL histwrite_phy(o_issrfra400to500, issrfra400to500) 2148 IF ( ok_ice_sedim ) THEN 2149 CALL histwrite_phy(o_dqised, dqised) 2150 CALL histwrite_phy(o_dcfsed, dcfsed) 2151 CALL histwrite_phy(o_dqvcsed, dqvcsed) 2152 ENDIF 2151 2153 ENDIF 2152 2154 !-- LSCP - aviation variables … … 2154 2156 CALL histwrite_phy(o_cfaseri, cfa_seri) 2155 2157 CALL histwrite_phy(o_dcfadyn, d_cfa_dyn) 2156 CALL histwrite_phy(o_qtaseri, qta_seri) 2157 CALL histwrite_phy(o_dqtadyn, d_qta_dyn) 2158 CALL histwrite_phy(o_pcfseri, pcf_seri) 2159 CALL histwrite_phy(o_dpcfdyn, d_pcf_dyn) 2160 CALL histwrite_phy(o_qvaseri, qva_seri) 2161 CALL histwrite_phy(o_dqvadyn, d_qva_dyn) 2162 CALL histwrite_phy(o_qiaseri, qia_seri) 2163 CALL histwrite_phy(o_dqiadyn, d_qia_dyn) 2158 2164 CALL histwrite_phy(o_flight_dist, flight_dist) 2159 2165 CALL histwrite_phy(o_Tcritcont, Tcritcont) … … 2161 2167 CALL histwrite_phy(o_potcontfraP, potcontfraP) 2162 2168 CALL histwrite_phy(o_potcontfraNP, potcontfraNP) 2163 CALL histwrite_phy(o_qice_ cont, qice_cont)2169 CALL histwrite_phy(o_qice_perscont, qice_perscont) 2164 2170 CALL histwrite_phy(o_dcfacir, dcfa_cir) 2165 2171 CALL histwrite_phy(o_dqtacir, dqta_cir) … … 2219 2225 CALL histwrite_phy(o_dqlphy2d, zx_tmp_fi2d) 2220 2226 2221 IF (nqo .EQ.3) THEN2227 IF (nqo .GE. 3) THEN 2222 2228 CALL histwrite_phy(o_dqsphy, d_qx(:,:,isol)) 2223 2229 IF (vars_defined) CALL water_int(klon,klev,d_qx(:,:,isol),zmasse,zx_tmp_fi2d) -
LMDZ6/branches/contrails/libf/phylmd/phys_state_var_mod.F90
r5601 r5609 94 94 REAL, ALLOCATABLE, SAVE :: cf_ancien(:,:), qvc_ancien(:,:) 95 95 !$OMP THREADPRIVATE(cf_ancien, qvc_ancien) 96 REAL, ALLOCATABLE, SAVE :: cfa_ancien(:,:), qta_ancien(:,:) 97 !$OMP THREADPRIVATE(cfa_ancien, qta_ancien) 96 REAL, ALLOCATABLE, SAVE :: cfa_ancien(:,:), pcf_ancien(:,:) 97 !$OMP THREADPRIVATE(cfa_ancien, pcf_ancien) 98 REAL, ALLOCATABLE, SAVE :: qva_ancien(:,:), qia_ancien(:,:) 99 !$OMP THREADPRIVATE(qva_ancien, qia_ancien) 100 REAL, ALLOCATABLE, SAVE :: cwcon(:,:), cwcon0(:,:) 101 !$OMP THREADPRIVATE(cwcon, cwcon0) 98 102 !!! RomP >>> 99 103 REAL, ALLOCATABLE, SAVE :: tr_ancien(:,:,:) … … 590 594 ALLOCATE(u_ancien(klon,klev), v_ancien(klon,klev)) 591 595 ALLOCATE(cf_ancien(klon,klev), qvc_ancien(klon,klev)) 592 ALLOCATE(cfa_ancien(klon,klev), qta_ancien(klon,klev)) 596 ALLOCATE(cfa_ancien(klon,klev), pcf_ancien(klon,klev)) 597 ALLOCATE(qva_ancien(klon,klev), qia_ancien(klon,klev)) 598 ALLOCATE(cwcon(klon,klev), cwcon0(klon,klev)) 593 599 !!! Rom P >>> 594 600 ALLOCATE(tr_ancien(klon,klev,nbtr)) … … 817 823 DEALLOCATE(qtc_cv,sigt_cv,detrain_cv,fm_cv) 818 824 DEALLOCATE(u_ancien, v_ancien) 819 DEALLOCATE(cf_ancien, qvc_ancien, cfa_ancien, qta_ancien) 825 DEALLOCATE(cf_ancien, qvc_ancien, cfa_ancien, pcf_ancien) 826 DEALLOCATE(qva_ancien, qia_ancien) 827 DEALLOCATE(cwcon, cwcon0) 820 828 DEALLOCATE(tr_ancien) !RomP 821 829 DEALLOCATE(ratqs, pbl_tke,coefh,coefm) -
LMDZ6/branches/contrails/libf/phylmd/physiq_mod.F90
r5602 r5609 328 328 dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, qsatliq, qsatice, & 329 329 !-- LSCP - aviation and contrails variables 330 cfa_seri, qta_seri, d_cfa_dyn, d_qta_dyn, &331 d_q_avi, flight_dist, flight_h2o, &332 qice_cont,Tcritcont, qcritcont, potcontfraP, potcontfraNP, &330 cfa_seri, pcf_seri, qva_seri, qia_seri, d_cfa_dyn, d_pcf_dyn, d_qva_dyn, d_qia_dyn, & 331 d_q_avi, flight_dist, flight_h2o, qice_perscont, & 332 Tcritcont, qcritcont, potcontfraP, potcontfraNP, & 333 333 cldfra_nocont, cldtau_nocont, cldemi_nocont, cldh_nocont, & 334 334 conttau, contemi, contcov, fiwp_nocont, fiwc_nocont, ref_ice_nocont, & … … 518 518 ! 519 519 ! indices de traceurs eau vapeur, liquide, glace, fraction nuageuse LS (optional), blowing snow (optional) 520 INTEGER,SAVE :: ivap, iliq, isol, ibs, icf, iqvc, icfa, i qta521 !$OMP THREADPRIVATE(ivap, iliq, isol, ibs, icf, iqvc, icfa, i qta)520 INTEGER,SAVE :: ivap, iliq, isol, ibs, icf, iqvc, icfa, ipcf, iqia, iqva 521 !$OMP THREADPRIVATE(ivap, iliq, isol, ibs, icf, iqvc, icfa, ipcf, iqia, iqva) 522 522 ! 523 523 ! … … 1363 1363 isol = strIdx(tracers(:)%name, addPhase('H2O', 's')) 1364 1364 ibs = strIdx(tracers(:)%name, addPhase('H2O', 'b')) 1365 icf = strIdx(tracers(:)%name, addPhase('H2O', 'f')) 1366 iqvc = strIdx(tracers(:)%name, addPhase('H2O', 'c')) 1367 icfa = strIdx(tracers(:)%name, addPhase('H2O', 'a')) 1368 iqta = strIdx(tracers(:)%name, addPhase('H2O', 'q')) 1365 icf = strIdx(tracers(:)%name, 'CLDFRA') 1366 iqvc = strIdx(tracers(:)%name, 'CLDVAP_g') 1367 icfa = strIdx(tracers(:)%name, 'CONTFRA') 1368 ipcf = strIdx(tracers(:)%name, 'PERSCONTFRA') 1369 iqva = strIdx(tracers(:)%name, 'CONTWATER_g') 1370 iqia = strIdx(tracers(:)%name, 'CONTWATER_s') 1369 1371 ! CALL init_etat0_limit_unstruct 1370 1372 ! IF (.NOT. create_etat0_limit) CALL init_limit_read(days_elapsed) … … 1414 1416 ENDIF 1415 1417 1416 IF (ok_ice_supersat.AND.(nqo.LT.5)) THEN 1417 WRITE (lunout, *) ' ok_ice_supersat=y requires 5 H2O tracers ', & 1418 '(H2O_g, H2O_l, H2O_s, H2O_f, H2O_c) but nqo=', nqo, '. Might as well stop here.' 1418 IF (ok_ice_supersat.AND.((icf.EQ.0).OR.(iqvc.EQ.0))) THEN 1419 WRITE (lunout, *) ' ok_ice_supersat=y requires 5 tracers ', & 1420 '(H2O_g, H2O_l, H2O_s, CLDFRA, CLDVAP_g) but not all are ', & 1421 'provided. Might as well stop here.' 1419 1422 abort_message='see above' 1420 1423 CALL abort_physic(modname,abort_message,1) … … 1433 1436 ENDIF 1434 1437 1435 IF (ok_plane_contrail.AND.(nqo.LT.6)) THEN 1436 WRITE (lunout, *) ' ok_plane_contrail=y requires 6 H2O tracers ', & 1437 '(H2O_g, H2O_l, H2O_s, H2O_f, H2O_c, H2O_a) but nqo=', nqo, '. Might as well stop here.' 1438 IF (ok_plane_contrail.AND.((icfa.EQ.0).OR.(iqva.EQ.0).OR.(iqia.EQ.0).OR.(ipcf.EQ.0))) THEN 1439 WRITE (lunout, *) ' ok_plane_contrail=y requires 8 tracers ', & 1440 '(H2O_g, H2O_l, H2O_s, CLDFRA, CLDVAP_g, CONTFRA, PERSCONTFRA, CONTWATER_s) ', & 1441 'but not all are provided. Might as well stop here.' 1438 1442 abort_message='see above' 1439 1443 CALL abort_physic(modname,abort_message,1) … … 1446 1450 ENDIF 1447 1451 1448 IF (ok_bs) THEN 1449 IF ((ok_ice_supersat.AND.nqo .LT.6).OR.(.NOT.ok_ice_supersat.AND.nqo.LT.4)) THEN 1450 WRITE (lunout, *) 'activation of blowing snow needs a specific H2O tracer', & 1451 'but nqo=', nqo 1452 abort_message='see above' 1453 CALL abort_physic(modname,abort_message, 1) 1454 ENDIF 1455 ENDIF 1452 IF (ok_bs.AND.(nqo.LT.4)) THEN 1453 WRITE (lunout, *) 'activation of blowing snow needs a specific H2O tracer', & 1454 'but nqo=', nqo 1455 abort_message='see above' 1456 CALL abort_physic(modname,abort_message, 1) 1457 ENDIF 1456 1458 1457 1459 Ncvpaseq1 = 0 … … 1631 1633 rnebcon(:,:) = 0.0 1632 1634 clwcon(:,:) = 0.0 1635 !--AB for prognostic clouds 1636 cwcon0(:,:) = 0.0 1637 cwcon(:,:) = 0.0 1633 1638 1634 1639 ! … … 2454 2459 q_seri(i,k) = qx(i,k,ivap) 2455 2460 ql_seri(i,k) = qx(i,k,iliq) 2461 qs_seri(i,k) = 0. 2456 2462 qbs_seri(i,k)= 0. 2457 2463 cf_seri(i,k) = 0. 2458 2464 qvc_seri(i,k)= 0. 2459 2465 cfa_seri(i,k)= 0. 2460 qta_seri(i,k)= 0. 2466 pcf_seri(i,k)= 0. 2467 qva_seri(i,k)= 0. 2468 qia_seri(i,k)= 0. 2461 2469 !CR: ATTENTION, on rajoute la variable glace 2462 IF (nqo.EQ.2) THEN !--vapour and liquid only 2463 qs_seri(i,k) = 0. 2464 ELSE IF (nqo.EQ.3) THEN !--vapour, liquid and ice 2470 IF (nqo .GE. 3) THEN !--vapour, liquid and ice 2465 2471 qs_seri(i,k) = qx(i,k,isol) 2466 E LSE IF (nqo.GE.4) THEN !--vapour, liquid, ice, blowing snow, cloud fraction and cloudy water vapor to total water vapor ratio2467 qs_seri(i,k) = qx(i,k,isol)2468 IF (ok_ice_supersat) THEN2469 cf_seri(i,k) = qx(i,k,icf)2470 qvc_seri(i,k) = qx(i,k,iqvc)2471 ENDIF2472 IF (ok_plane_contrail) THEN2473 cfa_seri(i,k) = qx(i,k,icfa)2474 qta_seri(i,k) = qx(i,k,iqta)2475 ENDIF2476 IF (ok_bs) THEN2477 qbs_seri(i,k)= qx(i,k,ibs)2478 ENDIF2472 ENDIF 2473 IF (ok_bs) THEN 2474 qbs_seri(i,k) = qx(i,k,ibs) 2475 ENDIF 2476 IF (ok_ice_supersat) THEN 2477 cf_seri(i,k) = qx(i,k,icf) 2478 qvc_seri(i,k) = qx(i,k,iqvc) 2479 ENDIF 2480 IF (ok_plane_contrail) THEN 2481 cfa_seri(i,k) = qx(i,k,icfa) 2482 pcf_seri(i,k) = qx(i,k,ipcf) 2483 qva_seri(i,k) = qx(i,k,iqva) 2484 qia_seri(i,k) = qx(i,k,iqia) 2479 2485 ENDIF 2480 2486 ENDDO … … 2552 2558 d_qvc_dyn(:,:)= (qvc_seri(:,:)-qvc_ancien(:,:))/phys_tstep 2553 2559 d_cfa_dyn(:,:)= (cfa_seri(:,:)-cfa_ancien(:,:))/phys_tstep 2554 d_qta_dyn(:,:)= (qta_seri(:,:)-qta_ancien(:,:))/phys_tstep 2560 d_pcf_dyn(:,:)= (pcf_seri(:,:)-pcf_ancien(:,:))/phys_tstep 2561 d_qva_dyn(:,:)= (qva_seri(:,:)-qva_ancien(:,:))/phys_tstep 2562 d_qia_dyn(:,:)= (qia_seri(:,:)-qia_ancien(:,:))/phys_tstep 2555 2563 CALL water_int(klon,klev,q_seri,zmasse,zx_tmp_fi2d) 2556 2564 d_q_dyn2d(:)=(zx_tmp_fi2d(:)-prw_ancien(:))/phys_tstep … … 2575 2583 d_qvc_dyn(:,:)= 0.0 2576 2584 d_cfa_dyn(:,:)= 0.0 2577 d_qta_dyn(:,:)= 0.0 2585 d_pcf_dyn(:,:)= 0.0 2586 d_qva_dyn(:,:)= 0.0 2587 d_qia_dyn(:,:)= 0.0 2578 2588 d_q_dyn2d(:) = 0.0 2579 2589 d_ql_dyn2d(:) = 0.0 … … 2700 2710 qi_seri_lscp(i,k) = qs_seri(i,k) / ( q_seri(i,k) + ql_seri(i,k) + qs_seri(i,k) ) 2701 2711 qvc_seri(i,k) = qvc_seri(i,k) / ( q_seri(i,k) + ql_seri(i,k) + qs_seri(i,k) ) 2702 qta_seri(i,k) = qta_seri(i,k) / ( q_seri(i,k) + ql_seri(i,k) + qs_seri(i,k) ) 2712 qva_seri(i,k) = qva_seri(i,k) / ( q_seri(i,k) + ql_seri(i,k) + qs_seri(i,k) ) 2713 qia_seri(i,k) = qia_seri(i,k) / ( q_seri(i,k) + ql_seri(i,k) + qs_seri(i,k) ) 2703 2714 ELSE 2704 2715 ql_seri_lscp(i,k) = 0. 2705 2716 qi_seri_lscp(i,k) = 0. 2706 2717 qvc_seri(i,k) = 0. 2707 qta_seri(i,k) = 0. 2718 qva_seri(i,k) = 0. 2719 qia_seri(i,k) = 0. 2708 2720 ENDIF 2709 2721 ENDDO … … 3927 3939 DO i = 1, klon 3928 3940 qvc_seri(i,k) = qvc_seri(i,k) * q_seri(i,k) 3941 cwcon0(i,k) = zqsat(i,k) 3929 3942 ENDDO 3930 3943 ENDDO … … 3933 3946 DO k = 1, klev 3934 3947 DO i = 1, klon 3935 qta_seri(i,k) = qta_seri(i,k) * q_seri(i,k) 3948 qva_seri(i,k) = qva_seri(i,k) * q_seri(i,k) 3949 qia_seri(i,k) = qia_seri(i,k) * q_seri(i,k) 3936 3950 ENDDO 3937 3951 ENDDO … … 3945 3959 3946 3960 CALL lscp(klon,klev,phys_tstep,missing_val,paprs,pplay,omega, & 3947 t_seri, q_seri, ql_seri_lscp, qi_seri_lscp, &3948 ptconv, rnebcon 0, clwcon0, ratqs, sigma_qtherm, &3961 t_seri, q_seri, ql_seri_lscp, qi_seri_lscp, ratqs, sigma_qtherm, & 3962 ptconv, rnebcon, cwcon, clwcon, rnebcon0, cwcon0, clwcon0, & 3949 3963 d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, & 3950 3964 pfraclr, pfracld, cldfraliq, sigma2_icefracturb, mean_icefracturb, & … … 3960 3974 dcf_sub, dcf_con, dcf_mix, dqi_adj, dqi_sub, dqi_con, dqi_mix, & 3961 3975 dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, qsatliq, qsatice, & 3962 cfa_seri, qta_seri, flight_dist, flight_h2o, &3963 qice_ cont, Tcritcont, qcritcont, potcontfraP, potcontfraNP, &3976 cfa_seri, pcf_seri, qva_seri, qia_seri, flight_dist, flight_h2o, & 3977 qice_perscont, Tcritcont, qcritcont, potcontfraP, potcontfraNP, & 3964 3978 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv, & 3965 3979 qraindiag, qsnowdiag, dqreva, dqssub, dqrauto, dqrcol, dqrmelt, & … … 3967 3981 dqised, dcfsed, dqvcsed) 3968 3982 3983 IF (ok_ice_supersat) cwcon(:,:) = cwcon0(:,:) 3969 3984 3970 3985 ELSE … … 4513 4528 zfice, dNovrN, ptconv, rnebcon, clwcon, & 4514 4529 !--AB contrails 4515 cfa_seri, qice_cont, cldfra_nocont, cldtau_nocont, cldemi_nocont, &4516 c onttau, contemi, cldh_nocont, contcov, &4530 cfa_seri, pcf_seri, qia_seri, qice_perscont, cldfra_nocont, & 4531 cldtau_nocont, cldemi_nocont, conttau, contemi, cldh_nocont, contcov, & 4517 4532 fiwp_nocont, fiwc_nocont, ref_ice_nocont) 4518 4533 … … 5709 5724 d_qx(i,k,isol) = ( qs_seri(i,k) - qx(i,k,isol) ) / phys_tstep 5710 5725 ENDIF 5711 !--ice_supersat: nqo=5, we add cloud fraction and cloudy water vapor to total water vapor ratio 5712 IF (nqo.ge.5 .and. ok_ice_supersat) THEN 5726 IF (ok_bs) THEN 5727 d_qx(i,k,ibs) = ( qbs_seri(i,k) - qx(i,k,ibs) ) / phys_tstep 5728 ENDIF 5729 IF (ok_ice_supersat) THEN 5713 5730 d_qx(i,k,icf) = ( cf_seri(i,k) - qx(i,k,icf) ) / phys_tstep 5714 5731 d_qx(i,k,iqvc) = ( qvc_seri(i,k) - qx(i,k,iqvc) ) / phys_tstep 5715 IF (nqo.ge.6 .and. ok_plane_contrail) THEN5716 d_qx(i,k,icfa) = ( cfa_seri(i,k) - qx(i,k,icfa) ) / phys_tstep5717 d_qx(i,k,iqta) = ( qta_seri(i,k) - qx(i,k,iqta) ) / phys_tstep5718 ENDIF5719 5732 ENDIF 5720 5721 IF (nqo.ge.4 .and. ok_bs) THEN 5722 d_qx(i,k,ibs) = ( qbs_seri(i,k) - qx(i,k,ibs) ) / phys_tstep 5733 IF (ok_plane_contrail) THEN 5734 d_qx(i,k,icfa) = ( cfa_seri(i,k) - qx(i,k,icfa) ) / phys_tstep 5735 d_qx(i,k,ipcf) = ( pcf_seri(i,k) - qx(i,k,ipcf) ) / phys_tstep 5736 d_qx(i,k,iqva) = ( qva_seri(i,k) - qx(i,k,iqva) ) / phys_tstep 5737 d_qx(i,k,iqia) = ( qia_seri(i,k) - qx(i,k,iqia) ) / phys_tstep 5723 5738 ENDIF 5724 5725 5739 ENDDO 5726 5740 ENDDO … … 5754 5768 qvc_ancien(:,:)= qvc_seri(:,:) 5755 5769 cfa_ancien(:,:)= cfa_seri(:,:) 5756 qta_ancien(:,:)= qta_seri(:,:) 5770 pcf_ancien(:,:)= pcf_seri(:,:) 5771 qva_ancien(:,:)= qva_seri(:,:) 5772 qia_ancien(:,:)= qia_seri(:,:) 5757 5773 CALL water_int(klon,klev,q_ancien,zmasse,prw_ancien) 5758 5774 CALL water_int(klon,klev,ql_ancien,zmasse,prlw_ancien)
Note: See TracChangeset
for help on using the changeset viewer.