Changeset 5579 for LMDZ6/branches/contrails/libf/phylmd
- Timestamp:
- Mar 19, 2025, 3:53:17 PM (3 months ago)
- Location:
- LMDZ6/branches/contrails/libf/phylmd
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/contrails/libf/phylmd/lmdz_aviation.f90
r5575 r5579 73 73 SUBROUTINE contrails_formation_evolution( & 74 74 dtime, pplay, temp, qsat, qsatl, gamma_cond, rcont_seri, flight_dist, & 75 cldfra, qvc, dz,pdf_loc, pdf_scale, pdf_alpha, &75 cldfra, qvc, pdf_loc, pdf_scale, pdf_alpha, & 76 76 Tcritcont, qcritcont, potcontfraP, potcontfraNP, contfra, & 77 77 dcontfra_cir, dcf_avi, dqvc_avi, dqi_avi & … … 100 100 REAL, INTENT(IN) :: cldfra ! cloud fraction [-] 101 101 REAL, INTENT(IN) :: qvc ! gridbox-mean vapor in the cloud [kg/kg] 102 REAL, INTENT(IN) :: dz ! cell width [m]103 102 REAL, INTENT(IN) :: pdf_loc ! location parameter of the clear sky PDF [%] 104 103 REAL, INTENT(IN) :: pdf_scale ! scale parameter of the clear sky PDF [%] … … 207 206 dqvc_avi = 0. 208 207 IF ( potcontfraP .GT. eps ) THEN 209 contrail_cross_section = CONTRAIL_CROSS_SECTION_ONERA( dz)208 contrail_cross_section = CONTRAIL_CROSS_SECTION_ONERA() 210 209 contfra_new = MIN(1., flight_dist * dtime * contrail_cross_section) 211 210 dcf_avi = potcontfraP * contfra_new … … 610 609 611 610 !********************************************************************************** 612 FUNCTION contrail_cross_section_onera( dz)613 614 USE lmdz_lscp_ini, ONLY: initial_width_contrails 611 FUNCTION contrail_cross_section_onera() 612 613 USE lmdz_lscp_ini, ONLY: initial_width_contrails, initial_height_contrails 615 614 616 615 IMPLICIT NONE 617 616 618 617 ! 619 ! Input620 !621 REAL :: dz ! cell width [m]622 !623 618 ! Output 624 619 ! … … 628 623 ! 629 624 630 contrail_cross_section_onera = initial_width_contrails * dz625 contrail_cross_section_onera = initial_width_contrails * initial_height_contrails 631 626 632 627 END FUNCTION contrail_cross_section_onera … … 642 637 USE lmdz_xios 643 638 USE print_control_mod, ONLY: lunout 639 USE lmdz_lscp_ini, ONLY: EI_H2O_aviation 644 640 IMPLICIT NONE 645 641 … … 649 645 ! Local variable 650 646 !---------------------------------------------------- 651 REAL, ALLOCATABLE :: flight_dist_mpi(:,:,:) 647 REAL, ALLOCATABLE :: flight_dist_mpi(:,:,:), flight_h2o_mpi(:,:,:) 652 648 INTEGER :: ierr 653 649 … … 669 665 ALLOCATE(flight_dist_mpi(klon_mpi, nleva,1), STAT=ierr) 670 666 IF (ierr /= 0) CALL abort_physic('read_aviation_emissions', 'problem to allocate flight_dist_mpi',1) 667 ALLOCATE(flight_h2o_mpi(klon_mpi, nleva,1), STAT=ierr) 668 IF (ierr /= 0) CALL abort_physic('read_aviation_emissions', 'problem to allocate flight_h2o_mpi',1) 671 669 CALL xios_recv_field("KMFLOWN_interp", flight_dist_mpi(:,:,1)) 670 !CALL xios_recv_field("KGH2O_interp", flight_h2o_mpi(:,:,1)) 671 flight_h2o_mpi(:,:,:) = 0. 672 672 ! Get number of vertical levels and level values 673 673 CALL xios_get_axis_attr( "aviation_lev", value=aviation_lev(:)) … … 677 677 ! (klon_mpi,klon) = (200,50) avec 80 MPI, 4 OMP, nbp40 678 678 CALL scatter_omp(flight_dist_mpi, flight_dist_read) 679 CALL scatter_omp(flight_h2o_mpi, flight_h2o_read) 679 680 CALL bcast_omp(aviation_lev) 680 681 … … 687 688 ! flight_dist_read(klon,nleva) -> flight_dist(klon, klev) 688 689 ! flight_h2o_read(klon,nleva) -> flight_h2o(klon, klev) 689 USE print_control_mod, ONLY: lunout 690 690 691 USE lmdz_lscp_ini, ONLY: RD, RG 692 USE lmdz_lscp_ini, ONLY: aviation_coef 691 693 692 694 IMPLICIT NONE … … 760 762 flight_dist(i,k) = flight_dist(i,k) / dz 761 763 flight_h2o(i,k) = flight_h2o(i,k) / dz 764 765 !--Enhancement factor 766 flight_dist(i,k) = flight_dist(i,k) * aviation_coef 767 flight_h2o(i,k) = flight_h2o(i,k) * aviation_coef 762 768 ENDDO 763 769 ENDDO -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp.f90
r5575 r5579 31 31 qraindiag, qsnowdiag, dqreva, dqssub, dqrauto, & 32 32 dqrcol, dqrmelt, dqrfreez, dqsauto, dqsagg, dqsrim,& 33 dqsmelt, dqsfreez )33 dqsmelt, dqsfreez, dcfres, dqsres, dqvcres) 34 34 35 35 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ … … 264 264 REAL, DIMENSION(klon,klev), INTENT(OUT) :: dqsfreez !--snow tendency due to freezing [kg/kg/s] 265 265 REAL, DIMENSION(klon,klev), INTENT(OUT) :: dqrfreez !--rain tendency due to freezing [kg/kg/s] 266 REAL, DIMENSION(klon,klev), INTENT(OUT) :: dcfres !--cloud fraction tendency due to resuspension of ice crystals [kg/kg/s] 267 REAL, DIMENSION(klon,klev), INTENT(OUT) :: dqsres !--snow tendency due to resuspension of ice crystals [kg/kg/s] 268 REAL, DIMENSION(klon,klev), INTENT(OUT) :: dqvcres !--cloud water vapor tendency due to resuspension of ice crystals [kg/kg/s] 266 269 267 270 ! for thermals … … 275 278 ! LOCAL VARIABLES: 276 279 !---------------- 277 REAL, DIMENSION(klon) :: qice_ini280 REAL, DIMENSION(klon) :: cldfra_in, qvc_in, qliq_in, qice_in 278 281 REAL, DIMENSION(klon,klev) :: ctot 279 282 REAL, DIMENSION(klon,klev) :: ctot_vol … … 319 322 REAL :: delta_z 320 323 ! for contrails 324 REAL, DIMENSION(klon) :: zqcont 321 325 !--Added for ice supersaturation (ok_ice_supersat) and contrails (ok_plane_contrail) 322 326 ! Constants used for calculating ratios that are advected (using a parent-child … … 483 487 DO k = klev, 1, -1 484 488 485 qice_ini = qi_seri(:,k) 489 cldfra_in(:) = cf_seri(:,k) 490 qvc_in(:) = rvc_seri(:,k) * q_seri(:,k) 491 qliq_in(:) = ql_seri(:,k) 492 qice_in(:) = qi_seri(:,k) 486 493 487 494 IF (k.LE.klev-1) THEN … … 522 529 zt, ztupnew, zq, zmqc, znebprecipclr, znebprecipcld, & 523 530 zqvapclr, zqupnew, & 524 c f_seri(:,k), rvc_seri(:,k), ql_seri(:,k), qi_seri(:,k), &531 cldfra_in, qvc_in, qliq_in, qice_in, & 525 532 zrfl, zrflclr, zrflcld, & 526 533 zifl, ziflclr, ziflcld, & 527 dqreva(:,k), dqssub(:,k) & 534 dqreva(:,k), dqssub(:,k), & 535 dqsres(:,k), dcfres(:,k), dqvcres(:,k) & 528 536 ) 529 537 … … 746 754 klon, dtime, missing_val, & 747 755 pplay(:,k), paprs(:,k), paprs(:,k+1), & 748 c f_seri(:,k), rvc_seri(:,k), ql_seri(:,k), qi_seri(:,k), &756 cldfra_in, qvc_in, qliq_in, qice_in, & 749 757 shear, tke_dissip(:,k), cell_area, stratomask(:,k), & 750 758 Tbef, zq, zqs, gammasat, ratqs(:,k), keepgoing, & … … 771 779 IF (iflag_icefrac .GE. 2) THEN 772 780 ! phase partitioning depending on temperature. activates here in the iteration process if iflag_icefrac > 2 773 CALL icefrac_lscp_turb(klon, dtime, Tbef, pplay(:,k), paprs(:,k), paprs(:,k+1), omega(:,k), qice_in i, ziflcld, zqn, &781 CALL icefrac_lscp_turb(klon, dtime, Tbef, pplay(:,k), paprs(:,k), paprs(:,k+1), omega(:,k), qice_in, ziflcld, zqn, & 774 782 rneb(:,k), tke(:,k), tke_dissip(:,k), zqliq, zqvapcl, zqice, zfice, dzfice, cldfraliq(:,k),sigma2_icefracturb(:,k), mean_icefracturb(:,k)) 775 783 ELSE … … 858 866 ! Partition function depending on tke for non shallow-convective clouds, erase previous estimation 859 867 IF (iflag_icefrac .GE. 1) THEN 860 CALL icefrac_lscp_turb(klon, dtime, Tbef, pplay(:,k), paprs(:,k), paprs(:,k+1), omega(:,k), qice_in i, ziflcld, zqn, &868 CALL icefrac_lscp_turb(klon, dtime, Tbef, pplay(:,k), paprs(:,k), paprs(:,k+1), omega(:,k), qice_in, ziflcld, zqn, & 861 869 rneb(:,k), tke(:,k), tke_dissip(:,k), zqliq, zqvapcl, zqice, zfice_turb, dzfice_turb, cldfraliq(:,k),sigma2_icefracturb(:,k), mean_icefracturb(:,k)) 862 870 ENDIF … … 947 955 ENDDO 948 956 957 IF (ok_plane_contrail) THEN 958 !--Contrails do not precipitate. We remove then from the variables temporarily 959 IF (rneb(i,k) .GT. eps) THEN 960 zqcont(i) = zcond(i) * zfice(i) * contfra(i,k) / rneb(i,k) 961 ELSE 962 zqcont(i) = 0. 963 ENDIF 964 rneb(i,k) = rneb(i,k) - contfra(i,k) 965 zoliqi(i) = zoliqi(i) - zqcont(i) 966 ENDIF 967 949 968 !================================================================ 950 969 ! Flag for the new and more microphysical treatment of precipitation from Atelier Nuage (R) … … 979 998 980 999 ENDIF ! ok_poprecip 1000 1001 IF (ok_plane_contrail) THEN 1002 !--Contrails are reintroduced in the variables 1003 rneb(i,k) = rneb(i,k) + contfra(i,k) 1004 zoliqi(i) = zoliqi(i) + zqcont(i) 1005 ENDIF 981 1006 982 1007 ! End of precipitation processes after cloud formation -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_condensation.f90
r5575 r5579 95 95 SUBROUTINE condensation_ice_supersat( & 96 96 klon, dtime, missing_val, pplay, paprsdn, paprsup, & 97 c f_seri, rvc_seri, ql_seri, qi_seri, shear, pbl_eps, cell_area, stratomask, &97 cldfra_in, qvc_in, qliq_in, qice_in, shear, pbl_eps, cell_area, stratomask, & 98 98 temp, qtot, qsat, gamma_cond, ratqs, keepgoing, & 99 99 cldfra, qincld, qvc, issrfra, qissr, dcf_sub, dcf_con, dcf_mix, & … … 141 141 REAL, INTENT(IN) , DIMENSION(klon) :: paprsdn ! pressure at the lower interface [Pa] 142 142 REAL, INTENT(IN) , DIMENSION(klon) :: paprsup ! pressure at the upper interface [Pa] 143 REAL, INTENT(IN) , DIMENSION(klon) :: c f_seri! cloud fraction [-]144 REAL, INTENT(IN) , DIMENSION(klon) :: rvc_seri! gridbox-mean water vapor in cloud [kg/kg]145 REAL, INTENT(IN) , DIMENSION(klon) :: ql _seri! specific liquid water content [kg/kg]146 REAL, INTENT(IN) , DIMENSION(klon) :: qi _seri! specific ice water content [kg/kg]143 REAL, INTENT(IN) , DIMENSION(klon) :: cldfra_in ! cloud fraction [-] 144 REAL, INTENT(IN) , DIMENSION(klon) :: qvc_in ! gridbox-mean water vapor in cloud [kg/kg] 145 REAL, INTENT(IN) , DIMENSION(klon) :: qliq_in ! specific liquid water content [kg/kg] 146 REAL, INTENT(IN) , DIMENSION(klon) :: qice_in ! specific ice water content [kg/kg] 147 147 REAL, INTENT(IN) , DIMENSION(klon) :: shear ! vertical shear [s-1] 148 148 REAL, INTENT(IN) , DIMENSION(klon) :: pbl_eps ! TKE dissipation [m2/s3] … … 304 304 !--and the condensation process is slightly adapted 305 305 !--This can happen only if ok_weibull_warm_clouds = .TRUE. 306 cldfra(i) = MAX(0., MIN(1., c f_seri(i)))307 qcld(i) = MAX(0., MIN(qtot(i), ql _seri(i) + qi_seri(i) + rvc_seri(i) * qtot(i)))308 qvc(i) = MAX(0., MIN(qcld(i), rvc_seri(i) * qtot(i)))306 cldfra(i) = MAX(0., MIN(1., cldfra_in(i))) 307 qcld(i) = MAX(0., MIN(qtot(i), qliq_in(i) + qice_in(i) + qvc_in(i))) 308 qvc(i) = MAX(0., MIN(qcld(i), qvc_in)) 309 309 ok_warm_cloud = .TRUE. 310 310 ELSE … … 312 312 !--are consistent. In some rare cases, i.e. the cloud water vapor 313 313 !--can be greater than the total water in the gridbox 314 cldfra(i) = MAX(0., MIN(1., c f_seri(i)))315 qcld(i) = MAX(0., MIN(qtot(i), rvc_seri(i) * qtot(i) + qi_seri(i)))316 qvc(i) = MAX(0., MIN(qcld(i), rvc_seri(i) * qtot(i)))314 cldfra(i) = MAX(0., MIN(1., cldfra_in(i))) 315 qcld(i) = MAX(0., MIN(qtot(i), qvc_in(i) + qice_in(i))) 316 qvc(i) = MAX(0., MIN(qcld(i), qvc_in(i))) 317 317 ok_warm_cloud = .FALSE. 318 318 ENDIF … … 788 788 dtime, pplay(i), temp(i), qsat(i), qsatl(i), gamma_cond(i), & 789 789 rcont_seri(i), flight_dist(i), cldfra(i), qvc(i), & 790 dz,pdf_loc, pdf_scale, pdf_alpha, &790 pdf_loc, pdf_scale, pdf_alpha, & 791 791 Tcritcont(i), qcritcont(i), potcontfraP(i), potcontfraNP(i), contfra(i), & 792 792 dcontfra_cir(i), dcf_avi(i), dqvc_avi(i), dqi_avi(i) & -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_ini.f90
r5577 r5579 245 245 REAL, SAVE, PROTECTED :: initial_width_contrails=200. ! [m] initial width of the linear contrails formed 246 246 !$OMP THREADPRIVATE(initial_width_contrails) 247 248 REAL, SAVE, PROTECTED :: initial_height_contrails=200. ! [m] initial height of the linear contrails formed 249 !$OMP THREADPRIVATE(initial_height_contrails) 250 251 REAL, SAVE, PROTECTED :: aviation_coef=1. ! [-] scaling factor for aviation emissions and flown distance 252 !$OMP THREADPRIVATE(aviation_coef) 247 253 !--End of the parameters for aviation 248 254 … … 337 343 REAL, SAVE, PROTECTED :: snow_fallspeed_cld ! Snow fall velocity in cloudy sky [m/s] 338 344 !$OMP THREADPRIVATE(snow_fallspeed_cld) 345 346 INTEGER, SAVE, PROTECTED :: ok_precip_resuspension=.FALSE.! Flag to activate the resuspension of ice crystals 347 !$OMP THREADPRIVATE(ok_precip_resuspension) 348 349 REAL, SAVE, PROTECTED :: snow_thresh_resuspension=1.e-5 ! [kg/m2/s] Threshold flux below which part of the snow flux will be resuspended 350 !$OMP THREADPRIVATE(snow_thresh_resuspension) 339 351 !--End of the parameters for poprecip 340 352 … … 455 467 CALL getin_p('snow_fallspeed_clr',snow_fallspeed_clr) 456 468 CALL getin_p('snow_fallspeed_cld',snow_fallspeed_cld) 469 CALL getin_p('ok_precip_resuspension',ok_precip_resuspension) 470 CALL getin_p('snow_thresh_resuspension',snow_thresh_resuspension) 457 471 ! for condensation and ice supersaturation 458 472 CALL getin_p('ok_unadjusted_clouds',ok_unadjusted_clouds) … … 488 502 CALL getin_p('linear_contrails_lifetime',linear_contrails_lifetime) 489 503 CALL getin_p('initial_width_contrails',initial_width_contrails) 504 CALL getin_p('initial_height_contrails',initial_height_contrails) 505 CALL getin_p('aviation_coef',aviation_coef) 490 506 491 507 … … 550 566 WRITE(lunout,*) 'lscp_ini, snow_fallspeed_clr:', snow_fallspeed_clr 551 567 WRITE(lunout,*) 'lscp_ini, snow_fallspeed_cld:', snow_fallspeed_cld 568 WRITE(lunout,*) 'lscp_ini, ok_precip_resuspension:', ok_precip_resuspension 569 WRITE(lunout,*) 'lscp_ini, snow_thresh_resuspension:', snow_thresh_resuspension 552 570 ! for condensation and ice supersaturation 553 571 WRITE(lunout,*) 'lscp_ini, ok_ice_supersat:', ok_ice_supersat … … 581 599 WRITE(lunout,*) 'lscp_ini, linear_contrails_lifetime:', linear_contrails_lifetime 582 600 WRITE(lunout,*) 'lscp_ini, initial_width_contrails:', initial_width_contrails 601 WRITE(lunout,*) 'lscp_ini, initial_height_contrails:', initial_height_contrails 602 WRITE(lunout,*) 'lscp_ini, aviation_coef:', aviation_coef 583 603 584 604 -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_precip.f90
r5431 r5579 714 714 klon, dtime, iftop, paprsdn, paprsup, pplay, temp, tempupnew, qvap, & 715 715 qprecip, precipfracclr, precipfraccld, qvapclrup, qtotupnew, & 716 cldfra, rvc_seri, qliq, qice, & 717 rain, rainclr, raincld, snow, snowclr, snowcld, dqreva, dqssub & 716 cldfra, qvc, qliq, qice, & 717 rain, rainclr, raincld, snow, snowclr, snowcld, & 718 dqreva, dqssub, dqsres, dcfres, dqvcres & 718 719 ) 719 720 720 USE lmdz_lscp_ini, ONLY : prt_level, lunout721 721 USE lmdz_lscp_ini, ONLY : coef_eva, coef_sub, expo_eva, expo_sub, thresh_precip_frac 722 722 USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG 723 723 USE lmdz_lscp_ini, ONLY : ok_corr_vap_evasub, ok_ice_supersat, ok_unadjusted_clouds 724 724 USE lmdz_lscp_ini, ONLY : eps, temp_nowater 725 USE lmdz_lscp_ini, ONLY : ok_precip_resuspension, snow_thresh_resuspension 725 726 USE lmdz_lscp_tools, ONLY : calc_qsat_ecmwf 726 727 … … 749 750 REAL, INTENT(IN), DIMENSION(klon) :: qtotupnew !--total specific humidity IN THE LAYER ABOVE [kg/kg] 750 751 751 REAL, INTENT(IN ),DIMENSION(klon) :: cldfra !--cloud fraction at the beginning of lscp - used only if the cloud properties are advected [-]752 REAL, INTENT(IN ), DIMENSION(klon) :: rvc_seri!--cloud water vapor at the beginning of lscp (ratio wrt total water) - used only if the cloud properties are advected [kg/kg]753 REAL, INTENT(IN ),DIMENSION(klon) :: qliq !--liquid water content at the beginning of lscp - used only if the cloud properties are advected [kg/kg]754 REAL, INTENT(IN ),DIMENSION(klon) :: qice !--ice water content at the beginning of lscp - used only if the cloud properties are advected [kg/kg]752 REAL, INTENT(INOUT), DIMENSION(klon) :: cldfra !--cloud fraction at the beginning of lscp - used only if the cloud properties are advected [-] 753 REAL, INTENT(INOUT), DIMENSION(klon) :: qvc !--cloud water vapor at the beginning of lscp (ratio wrt total water) - used only if the cloud properties are advected [kg/kg] 754 REAL, INTENT(INOUT), DIMENSION(klon) :: qliq !--liquid water content at the beginning of lscp - used only if the cloud properties are advected [kg/kg] 755 REAL, INTENT(INOUT), DIMENSION(klon) :: qice !--ice water content at the beginning of lscp - used only if the cloud properties are advected [kg/kg] 755 756 756 757 … … 764 765 REAL, INTENT(OUT), DIMENSION(klon) :: dqreva !--rain tendency due to evaporation [kg/kg/s] 765 766 REAL, INTENT(OUT), DIMENSION(klon) :: dqssub !--snow tendency due to sublimation [kg/kg/s] 767 REAL, INTENT(OUT), DIMENSION(klon) :: dqsres !--snow tendency due to resuspension of ice crystals [kg/kg/s] 768 REAL, INTENT(OUT), DIMENSION(klon) :: dcfres !--cloud fraction tendency due to resuspension of ice crystals [kg/kg/s] 769 REAL, INTENT(OUT), DIMENSION(klon) :: dqvcres !--cloud water vapor tendency due to resuspension of ice crystals [kg/kg/s] 766 770 767 771 … … 787 791 !--Specific heat constant 788 792 REAL :: cpair, cpw 793 !--For resuspension of ice crystals 794 REAL :: dsnowres, qiceinprecip 789 795 790 796 !--Initialisation … … 794 800 dqrevap = 0. 795 801 dqssubl = 0. 802 IF ( ok_ice_supersat .AND. ok_precip_resuspension ) THEN 803 dqsres(:) = 0. 804 dcfres(:) = 0. 805 dqvcres(:) = 0. 806 ENDIF 796 807 797 808 !-- dhum_to_dflux = rho * dz/dt = 1 / g * dP/dt … … 816 827 817 828 IF (iftop) THEN 818 829 819 830 DO i = 1, klon 820 831 qprecip(i) = 0. … … 894 905 !--water vapor in the cloud and cloud fraction 895 906 IF ( ok_unadjusted_clouds .AND. ( cldfra(i) .GT. eps ) ) THEN 896 qvapcld = rvc_seri(i) * qvap(i) / cldfra(i)907 qvapcld = qvc(i) / cldfra(i) 897 908 ENDIF 898 909 !--We can diagnose completely the water vapor in clear sky, because all … … 901 912 !--Note that qvap(i) is the total water in the gridbox 902 913 IF ( ( 1. - cldfra(i) ) .GT. eps ) THEN 903 qvapclr = ( qvap(i) - qice(i) - qliq(i) - rvc_seri(i) * qvap(i) ) / ( 1. - cldfra(i) )914 qvapclr = ( qvap(i) - qice(i) - qliq(i) - qvc(i) ) / ( 1. - cldfra(i) ) 904 915 ENDIF 905 916 ELSEIF ( ok_corr_vap_evasub ) THEN … … 1070 1081 raincld_tmp(i) = MAX(0., raincld_tmp(i) + draincldeva) 1071 1082 snowcld_tmp(i) = MAX(0., snowcld_tmp(i) + dsnowcldsub) 1083 1084 1085 !--If ok_precip_to_clouds is set to .TRUE., some of the precipitations can go back to clouds 1086 !--Only the snow flux can go back to cloud, and only if there is no rain flux 1087 !--(mixed-phase clouds) 1088 !--The ok_ice_supersaturation is used to ensure that cloud fraction is advected 1089 !--but maybe it is not needed 1090 IF ( ok_ice_supersat .AND. ok_precip_resuspension ) THEN 1091 1092 IF ( (precipfracclr_tmp(i) .GT. 0.) .AND. (rainclr_tmp(i) .LT. eps) ) THEN 1093 dsnowres = snowclr_tmp(i) * EXP( - snowclr_tmp(i) / precipfracclr_tmp(i) / snow_thresh_resuspension ) 1094 dqsres(i) = dqsres(i) - dsnowres / dhum_to_dflux(i) 1095 !--The following line determines the in-cloud ice water content of the newly formed cloud 1096 !--It is a linear combination between the in-precip ice water content (left term) and the 1097 !--in-existing-cloud ice water content (right term). This is done so that the existing cloud 1098 !--is not too modified, i.e. unphysical ice fluxes going from the existing cloud to the new 1099 !--cloud. If the existing cloud is already large, the newly formed cloud fraction is reduced 1100 !--to match the in-cloud ice water content of the existing cloud. 1101 !--NB. this is done on qi, not on qvc. Not sure what impact that implies 1102 qiceinprecip = - dqsres(i) / precipfracclr_tmp(i) * ( 1. - cldfra(i) ) + qice(i) 1103 dcfres(i) = - dqsres(i) / qiceinprecip 1104 dqvcres(i) = qvapclr * dcfres(i) 1105 !--Add tendencies 1106 snowcld_tmp(i) = snowcld_tmp(i) + dsnowres 1107 ENDIF 1108 1109 IF ( (precipfraccld_tmp(i) .GT. 0.) .AND. (raincld_tmp(i) .LT. eps) ) THEN 1110 dsnowres = snowcld_tmp(i) * EXP( - snowcld_tmp(i) / precipfraccld_tmp(i) / snow_thresh_resuspension ) 1111 dqsres(i) = dqsres(i) - dsnowres / dhum_to_dflux(i) 1112 !--Add tendencies 1113 snowcld_tmp(i) = snowcld_tmp(i) + dsnowres 1114 ENDIF 1115 1116 !--Add tendencies 1117 cldfra(i) = cldfra(i) + dcfres(i) 1118 qvc(i) = qvc(i) + dqvcres(i) 1119 qice(i) = qice(i) - dqsres(i) 1120 ENDIF 1072 1121 1073 1122 -
LMDZ6/branches/contrails/libf/phylmd/phys_local_var_mod.F90
r5575 r5579 717 717 REAL, SAVE, ALLOCATABLE :: dqsfreez(:,:) 718 718 !$OMP THREADPRIVATE(dqsfreez) 719 REAL, SAVE, ALLOCATABLE :: dcfres(:,:) 720 !$OMP THREADPRIVATE(dcfres) 721 REAL, SAVE, ALLOCATABLE :: dqsres(:,:) 722 !$OMP THREADPRIVATE(dqsres) 723 REAL, SAVE, ALLOCATABLE :: dqvcres(:,:) 724 !$OMP THREADPRIVATE(dqvcres) 719 725 720 726 ! variables for stratospheric aerosol … … 1238 1244 ALLOCATE(dqrauto(klon,klev), dqrcol(klon,klev), dqrmelt(klon,klev), dqrfreez(klon,klev)) 1239 1245 ALLOCATE(dqsauto(klon,klev), dqsagg(klon,klev), dqsrim(klon,klev), dqsmelt(klon,klev), dqsfreez(klon,klev)) 1246 ALLOCATE(dcfres(klon,klev), dqsres(klon,klev), dqvcres(klon,klev)) 1240 1247 1241 1248 IF (CPPKEY_STRATAER) THEN … … 1645 1652 DEALLOCATE(dqrauto, dqrcol, dqrmelt, dqrfreez) 1646 1653 DEALLOCATE(dqsauto, dqsagg, dqsrim, dqsmelt, dqsfreez) 1654 DEALLOCATE(dcfres, dqsres, dqvcres) 1647 1655 1648 1656 IF (CPPKEY_STRATAER) THEN -
LMDZ6/branches/contrails/libf/phylmd/phys_output_ctrlout_mod.F90
r5575 r5579 1611 1611 TYPE(ctrl_out), SAVE :: o_dqsfreez = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1612 1612 'dqsfreez', 'LS snow tendency due to freezing', 'kg/kg/s', (/ ('', i=1, 10) /)) 1613 TYPE(ctrl_out), SAVE :: o_dcfres = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1614 'dcfres', 'LS cloud fraction tendency due to resuspension', 'kg/kg/s', (/ ('', i=1, 10) /)) 1615 TYPE(ctrl_out), SAVE :: o_dqsres = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1616 'dqsres', 'LS snow tendency due to resuspension', 'kg/kg/s', (/ ('', i=1, 10) /)) 1617 TYPE(ctrl_out), SAVE :: o_dqvcres = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 1618 'dqvcres', 'LS cloud water vapor tendency due to resuspension', 'kg/kg/s', (/ ('', i=1, 10) /)) 1613 1619 TYPE(ctrl_out), SAVE :: o_rhum = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11, 11/), & 1614 1620 'rhum', 'Relative humidity', '-', (/ ('', i=1, 10) /)) -
LMDZ6/branches/contrails/libf/phylmd/phys_output_write_mod.F90
r5575 r5579 145 145 o_qrainlsc, o_qsnowlsc, o_dqreva, o_dqrauto, o_dqrcol, o_dqrmelt, o_dqrfreez, & 146 146 o_dqssub, o_dqsauto, o_dqsagg, o_dqsrim, o_dqsmelt, o_dqsfreez, & 147 o_dcfres, o_dqsres, o_dqvcres, & 147 148 o_duphy, o_dtphy, o_dqphy, o_dqphy2d, o_dqlphy, o_dqlphy2d, & 148 149 o_dqsphy, o_dqsphy2d, o_dqbsphy, o_dqbsphy2d, o_albe_srf, o_z0m_srf, o_z0h_srf, & … … 268 269 o_SAD_sulfate, o_reff_sulfate, o_sulfmmr, o_nd_mode, o_sulfmmr_mode 269 270 270 USE lmdz_lscp_ini, ONLY: ok_poprecip 271 USE lmdz_lscp_ini, ONLY: ok_poprecip, ok_precip_resuspension 271 272 272 273 USE phys_output_ctrlout_mod, ONLY: o_heat_volc, o_cool_volc !NL … … 383 384 dqrauto,dqrcol,dqrmelt,dqrfreez, & 384 385 dqsauto,dqsagg,dqsrim,dqsmelt,dqsfreez, & 386 dcfres, dqsres, dqvcres, & 385 387 d_t_dyn, & 386 388 d_q_dyn, d_ql_dyn, d_qs_dyn, d_qbs_dyn, & … … 2093 2095 CALL histwrite_phy(o_dqsfreez, dqsfreez) 2094 2096 CALL histwrite_phy(o_dqsrim, dqsrim) 2097 IF ( ok_precip_resuspension ) THEN 2098 CALL histwrite_phy(o_dcfres, dcfres) 2099 CALL histwrite_phy(o_dqsres, dqsres) 2100 CALL histwrite_phy(o_dqvcres, dqvcres) 2101 ENDIF 2095 2102 ELSE 2096 2103 CALL histwrite_phy(o_dqreva, dqreva) -
LMDZ6/branches/contrails/libf/phylmd/physiq_mod.F90
r5575 r5579 187 187 ! proprecip 188 188 qraindiag, qsnowdiag, & 189 dqreva, dqssub, &189 dqreva, dqssub, dcfres, dqsres, dqvcres, & 190 190 dqrauto,dqrcol,dqrmelt,dqrfreez, & 191 191 dqsauto,dqsagg,dqsrim,dqsmelt,dqsfreez, & … … 3923 3923 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv, & 3924 3924 qraindiag, qsnowdiag, dqreva, dqssub, dqrauto, dqrcol, dqrmelt, & 3925 dqrfreez, dqsauto, dqsagg, dqsrim, dqsmelt, dqsfreez) 3925 dqrfreez, dqsauto, dqsagg, dqsrim, dqsmelt, dqsfreez, & 3926 dcfres, dqsres, dqvcres) 3926 3927 3927 3928
Note: See TracChangeset
for help on using the changeset viewer.