Changeset 4651
- Timestamp:
- Aug 28, 2023, 4:34:20 PM (17 months ago)
- Location:
- LMDZ6/trunk/libf
- Files:
-
- 2 added
- 7 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/fisrtilp.F90
r4535 r4651 14 14 USE icefrac_lsc_mod ! compute ice fraction (JBM 3/14) 15 15 USE print_control_mod, ONLY: prt_level, lunout 16 USE cloudth_mod16 USE lmdz_cloudth, only : cloudth, cloudth_v3, cloudth_v6 17 17 USE ioipsl_getin_p_mod, ONLY : getin_p 18 18 USE phys_local_var_mod, ONLY: ql_seri,qs_seri … … 25 25 USE lscp_ini_mod, ONLY: cld_tau_lsc, cld_tau_con, cld_lc_lsc, cld_lc_con 26 26 USE lscp_ini_mod, ONLY: reevap_ice, iflag_bergeron, iflag_fisrtilp_qsat, iflag_pdf 27 use phys_output_var_mod, ONLY : cloudth_sth,cloudth_senv 28 use phys_output_var_mod, ONLY : cloudth_sigmath,cloudth_sigmaenv 29 27 30 28 31 … … 849 852 zq,zqta,fraca, & 850 853 qcloud,ctot,zpspsk,paprs,pplay,ztla,zthl, & 851 ratqs,zqs,t) 854 ratqs,zqs,t, & 855 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 856 852 857 elseif (iflag_cloudth_vert>=3 .and. iflag_cloudth_vert<=5) then 853 858 call cloudth_v3(klon,klev,k,ztv, & 854 859 zq,zqta,fraca, & 855 860 qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, & 856 ratqs,zqs,t) 861 ratqs,zqs,t, & 862 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 857 863 !---------------------------------- 858 864 !Version these Jean Jouhaud, Decembre 2018 … … 862 868 zq,zqta,fraca, & 863 869 qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, & 864 ratqs,zqs,t) 870 ratqs,zqs,t, & 871 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 865 872 866 873 endif -
LMDZ6/trunk/libf/phylmd/lmdz_cloudth.F90
r4650 r4651 1 MODULE cloudth_mod1 MODULE lmdz_cloudth 2 2 3 3 … … 9 9 & ztv,po,zqta,fraca, & 10 10 & qcloud,ctot,zpspsk,paprs,pplay,ztla,zthl, & 11 & ratqs,zqs,t) 12 13 14 use lscp_ini_mod, only: iflag_cloudth_vert 11 & ratqs,zqs,t, & 12 & cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 13 14 15 use lmdz_cloudth_ini, only: iflag_cloudth_vert,iflag_ratqs 15 16 16 17 IMPLICIT NONE … … 25 26 26 27 INCLUDE "YOMCST.h" 27 INCLUDE "nuage.h" ! iflag_ratqs28 28 INCLUDE "YOETHF.h" 29 29 INCLUDE "FCTTRE.h" … … 31 31 INTEGER itap,ind1,ind2 32 32 INTEGER ngrid,klev,klon,l,ig 33 real, dimension(ngrid,klev), intent(out) :: cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv 33 34 34 35 REAL ztv(ngrid,klev) … … 264 265 265 266 266 USE ioipsl_getin_p_mod, ONLY : getin_p 267 use lscp_ini_mod, only: iflag_cloudth_vert 267 use lmdz_cloudth_ini, only: iflag_cloudth_vert, vert_alpha 268 268 269 269 IMPLICIT NONE 270 270 271 271 INCLUDE "YOMCST.h" 272 INCLUDE "nuage.h" ! iflag_ratqs273 272 INCLUDE "YOETHF.h" 274 273 INCLUDE "FCTTRE.h" … … 314 313 ! Change the width of the PDF used for vertical subgrid scale heterogeneity 315 314 ! (J Jouhaud, JL Dufresne, JB Madeleine) 316 REAL,SAVE :: vert_alpha317 !$OMP THREADPRIVATE(vert_alpha)318 LOGICAL, SAVE :: firstcall = .TRUE.319 !$OMP THREADPRIVATE(firstcall)320 315 321 316 REAL zpdf_sig(ngrid),zpdf_k(ngrid),zpdf_delta(ngrid) … … 347 342 sqrtpi=sqrt(pi) 348 343 349 IF (firstcall) THEN350 vert_alpha=0.5351 CALL getin_p('cloudth_vert_alpha',vert_alpha)352 WRITE(*,*) 'cloudth_vert_alpha = ', vert_alpha353 firstcall=.FALSE.354 ENDIF355 356 344 !------------------------------------------------------------------------------- 357 345 ! Calcul de la fraction du thermique et des ?cart-types des distributions … … 595 583 & ztv,po,zqta,fraca, & 596 584 & qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, & 597 & ratqs,zqs,t) 598 599 use lscp_ini_mod, only: iflag_cloudth_vert 585 & ratqs,zqs,t, & 586 & cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 587 588 use lmdz_cloudth_ini, only: iflag_cloudth_vert 600 589 601 590 IMPLICIT NONE … … 610 599 611 600 INCLUDE "YOMCST.h" 612 INCLUDE "nuage.h" ! iflag ratq613 601 INCLUDE "YOETHF.h" 614 602 INCLUDE "FCTTRE.h" … … 616 604 INTEGER itap,ind1,ind2 617 605 INTEGER ngrid,klev,klon,l,ig 606 real, dimension(ngrid,klev), intent(out) :: cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv 618 607 619 608 REAL ztv(ngrid,klev) … … 663 652 & ztv,po,zqta,fraca, & 664 653 & qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, & 665 & ratqs,zqs,t) 654 & ratqs,zqs,t, & 655 & cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 666 656 RETURN 667 657 ENDIF … … 817 807 & ztv,po,zqta,fraca, & 818 808 & qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, & 819 & ratqs,zqs,t) 809 & ratqs,zqs,t, & 810 & cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 820 811 821 812 !=========================================================================== … … 825 816 !=========================================================================== 826 817 827 use lscp_ini_mod, only: iflag_cloudth_vert 828 USE ioipsl_getin_p_mod, ONLY : getin_p 829 USE phys_output_var_mod, ONLY : cloudth_sth,cloudth_senv, & 830 & cloudth_sigmath,cloudth_sigmaenv 818 use lmdz_cloudth_ini, only : iflag_cloudth_vert,iflag_ratqs 819 use lmdz_cloudth_ini, only : vert_alpha,vert_alpha_th, sigma1s_factor, sigma1s_power , sigma2s_factor , sigma2s_power , cloudth_ratqsmin , iflag_cloudth_vert_noratqs 831 820 832 821 IMPLICIT NONE 833 822 823 824 834 825 INCLUDE "YOMCST.h" 835 INCLUDE "nuage.h" ! iflag ratq836 826 INCLUDE "YOETHF.h" 837 827 INCLUDE "FCTTRE.h" … … 839 829 INTEGER itap,ind1,ind2 840 830 INTEGER ngrid,klev,klon,l,ig 831 real, dimension(ngrid,klev), intent(out) :: cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv 841 832 842 833 REAL ztv(ngrid,klev) … … 881 872 ! Change the width of the PDF used for vertical subgrid scale heterogeneity 882 873 ! (J Jouhaud, JL Dufresne, JB Madeleine) 883 REAL,SAVE :: vert_alpha, vert_alpha_th884 !$OMP THREADPRIVATE(vert_alpha, vert_alpha_th)885 REAL,SAVE :: sigma1s_factor=1.1886 REAL,SAVE :: sigma1s_power=0.6887 REAL,SAVE :: sigma2s_factor=0.09888 REAL,SAVE :: sigma2s_power=0.5889 REAL,SAVE :: cloudth_ratqsmin=-1.890 !$OMP THREADPRIVATE(sigma1s_factor,sigma1s_power,sigma2s_factor,sigma2s_power,cloudth_ratqsmin)891 INTEGER, SAVE :: iflag_cloudth_vert_noratqs=0892 !$OMP THREADPRIVATE(iflag_cloudth_vert_noratqs)893 894 LOGICAL, SAVE :: firstcall = .TRUE.895 !$OMP THREADPRIVATE(firstcall)896 874 897 875 REAL zpdf_sig(ngrid),zpdf_k(ngrid),zpdf_delta(ngrid) … … 938 916 sqrtpi=sqrt(pi) 939 917 940 IF (firstcall) THEN 941 vert_alpha=0.5 942 CALL getin_p('cloudth_vert_alpha',vert_alpha) 943 WRITE(*,*) 'cloudth_vert_alpha = ', vert_alpha 944 ! The factor used for the thermal is equal to that of the environment 945 ! if nothing is explicitly specified in the def file 946 vert_alpha_th=vert_alpha 947 CALL getin_p('cloudth_vert_alpha_th',vert_alpha_th) 948 WRITE(*,*) 'cloudth_vert_alpha_th = ', vert_alpha_th 949 ! Factor used in the calculation of sigma1s 950 CALL getin_p('cloudth_sigma1s_factor',sigma1s_factor) 951 WRITE(*,*) 'cloudth_sigma1s_factor = ', sigma1s_factor 952 ! Power used in the calculation of sigma1s 953 CALL getin_p('cloudth_sigma1s_power',sigma1s_power) 954 WRITE(*,*) 'cloudth_sigma1s_power = ', sigma1s_power 955 ! Factor used in the calculation of sigma2s 956 CALL getin_p('cloudth_sigma2s_factor',sigma2s_factor) 957 WRITE(*,*) 'cloudth_sigma2s_factor = ', sigma2s_factor 958 ! Power used in the calculation of sigma2s 959 CALL getin_p('cloudth_sigma2s_power',sigma2s_power) 960 WRITE(*,*) 'cloudth_sigma2s_power = ', sigma2s_power 961 ! Minimum value for the environmental air subgrid water distrib 962 CALL getin_p('cloudth_ratqsmin',cloudth_ratqsmin) 963 WRITE(*,*) 'cloudth_ratqsmin = ', cloudth_ratqsmin 964 ! Remove the dependency to ratqs from the variance of the vertical PDF 965 CALL getin_p('iflag_cloudth_vert_noratqs',iflag_cloudth_vert_noratqs) 966 WRITE(*,*) 'iflag_cloudth_vert_noratqs = ', iflag_cloudth_vert_noratqs 967 968 firstcall=.FALSE. 969 ENDIF 918 970 919 971 920 !------------------------------------------------------------------------------- … … 1289 1238 & ztv,po,zqta,fraca, & 1290 1239 & qcloud,ctot_surf,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, & 1291 & ratqs,zqs,T) 1292 1293 use lscp_ini_mod, only: iflag_cloudth_vert 1294 USE ioipsl_getin_p_mod, ONLY : getin_p 1295 USE phys_output_var_mod, ONLY : cloudth_sth,cloudth_senv, & 1296 & cloudth_sigmath,cloudth_sigmaenv 1240 & ratqs,zqs,T, & 1241 & cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 1242 1243 use lmdz_cloudth_ini, only: iflag_cloudth_vert 1297 1244 1298 1245 IMPLICIT NONE 1246 1299 1247 1300 1248 INCLUDE "YOMCST.h" … … 1306 1254 INTEGER ngrid !indice Max lat-lon 1307 1255 INTEGER klev !indice Max alt 1256 real, dimension(ngrid,klev), intent(out) :: cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv 1308 1257 INTEGER ind1 !indice in [1:ngrid] 1309 1258 INTEGER ind2 !indice in [1:klev] … … 1547 1496 SUBROUTINE cloudth_mpc(klon,klev,ind2,iflag_mpc_bl,mpc_bl_points, & 1548 1497 & temp,ztv,po,zqta,fraca,zpspsk,paprs,pplay,ztla,zthl, & 1549 & ratqs,zqs,snowflux,qcloud,qincloud,icefrac,ctot,ctot_vol) 1498 & ratqs,zqs,snowflux,qcloud,qincloud,icefrac,ctot,ctot_vol, & 1499 & cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 1550 1500 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1551 1501 ! Author : Arnaud Octavio Jam (LMD/CNRS), Etienne Vignon (LMDZ/CNRS) … … 1557 1507 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1558 1508 1559 use l scp_ini_mod, only: iflag_cloudth_vert1560 USE ioipsl_getin_p_mod, ONLY : getin_p1561 USE phys_output_var_mod, ONLY : cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv1562 USE lscp_tools_mod, ONLY: CALC_QSAT_ECMWF, FALLICE_VELOCITY 1563 USEphys_local_var_mod, ONLY : qlth, qith, qsith, wiceth1509 use lmdz_cloudth_ini, only: iflag_cloudth_vert,iflag_ratqs 1510 use lmdz_cloudth_ini, only: C_mpc ,Ni,C_cap,Ei,d_top ,vert_alpha, vert_alpha_th ,sigma1s_factor,sigma1s_power,sigma2s_factor,sigma2s_power,cloudth_ratqsmin ,iflag_cloudth_vert_noratqs 1511 use lscp_tools_mod, ONLY: CALC_QSAT_ECMWF, FALLICE_VELOCITY 1512 1513 use phys_local_var_mod, ONLY : qlth, qith, qsith, wiceth 1564 1514 1565 1515 IMPLICIT NONE 1566 1516 1567 1517 INCLUDE "YOMCST.h" 1568 INCLUDE "nuage.h" ! iflag_ratqs1569 1518 INCLUDE "YOETHF.h" 1570 1519 INCLUDE "FCTTRE.h" … … 1603 1552 REAL, DIMENSION(klon), INTENT(OUT) :: qincloud ! In cloud condensed water content [kg/kg] 1604 1553 REAL, DIMENSION(klon,klev), INTENT(OUT) :: icefrac ! Fraction of ice in clouds [0-1] 1554 real, dimension(klon,klev), intent(out) :: cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv 1605 1555 1606 1556 … … 1608 1558 1609 1559 INTEGER itap,ind1,l,ig,iter,k 1610 ! INTEGER iflag_ratqs1611 1560 INTEGER iflag_topthermals, niter 1612 1561 LOGICAL falseklon(klon) … … 1652 1601 ! Modifty the saturation deficit PDF in thermals 1653 1602 ! in the presence of ice crystals 1654 REAL,SAVE :: C_mpc1655 !$OMP THREADPRIVATE(C_mpc)1656 REAL, SAVE :: Ni,C_cap,Ei,d_top1657 !$OMP THREADPRIVATE(Ni,C_cap,Ei,d_top)1658 ! Change the width of the PDF used for vertical subgrid scale heterogeneity1659 ! (J Jouhaud, JL Dufresne, JB Madeleine)1660 REAL,SAVE :: vert_alpha, vert_alpha_th1661 !$OMP THREADPRIVATE(vert_alpha, vert_alpha_th)1662 REAL,SAVE :: sigma1s_factor=1.11663 REAL,SAVE :: sigma1s_power=0.61664 REAL,SAVE :: sigma2s_factor=0.091665 REAL,SAVE :: sigma2s_power=0.51666 REAL,SAVE :: cloudth_ratqsmin=-1.1667 !$OMP THREADPRIVATE(sigma1s_factor,sigma1s_power,sigma2s_factor,sigma2s_power,cloudth_ratqsmin)1668 INTEGER, SAVE :: iflag_cloudth_vert_noratqs=01669 !$OMP THREADPRIVATE(iflag_cloudth_vert_noratqs)1670 LOGICAL, SAVE :: firstcall = .TRUE.1671 !$OMP THREADPRIVATE(firstcall)1672 1673 1603 CHARACTER (len = 80) :: abort_message 1674 1604 CHARACTER (len = 20) :: routname = 'cloudth_mpc' … … 1731 1661 sthl=0. 1732 1662 sthil=0. 1733 1734 1735 1736 IF (firstcall) THEN1737 1738 vert_alpha=0.51739 CALL getin_p('cloudth_vert_alpha',vert_alpha)1740 WRITE(*,*) 'cloudth_vert_alpha = ', vert_alpha1741 ! The factor used for the thermal is equal to that of the environment1742 ! if nothing is explicitly specified in the def file1743 vert_alpha_th=vert_alpha1744 CALL getin_p('cloudth_vert_alpha_th',vert_alpha_th)1745 WRITE(*,*) 'cloudth_vert_alpha_th = ', vert_alpha_th1746 ! Factor used in the calculation of sigma1s1747 CALL getin_p('cloudth_sigma1s_factor',sigma1s_factor)1748 WRITE(*,*) 'cloudth_sigma1s_factor = ', sigma1s_factor1749 ! Power used in the calculation of sigma1s1750 CALL getin_p('cloudth_sigma1s_power',sigma1s_power)1751 WRITE(*,*) 'cloudth_sigma1s_power = ', sigma1s_power1752 ! Factor used in the calculation of sigma2s1753 CALL getin_p('cloudth_sigma2s_factor',sigma2s_factor)1754 WRITE(*,*) 'cloudth_sigma2s_factor = ', sigma2s_factor1755 ! Power used in the calculation of sigma2s1756 CALL getin_p('cloudth_sigma2s_power',sigma2s_power)1757 WRITE(*,*) 'cloudth_sigma2s_power = ', sigma2s_power1758 ! Minimum value for the environmental air subgrid water distrib1759 CALL getin_p('cloudth_ratqsmin',cloudth_ratqsmin)1760 WRITE(*,*) 'cloudth_ratqsmin = ', cloudth_ratqsmin1761 ! Remove the dependency to ratqs from the variance of the vertical PDF1762 CALL getin_p('iflag_cloudth_vert_noratqs',iflag_cloudth_vert_noratqs)1763 WRITE(*,*) 'iflag_cloudth_vert_noratqs = ', iflag_cloudth_vert_noratqs1764 ! Modifies the PDF in thermals when ice crystals are present1765 C_mpc=1.e41766 CALL getin_p('C_mpc',C_mpc)1767 WRITE(*,*) 'C_mpc = ', C_mpc1768 Ni=2.0e31769 CALL getin_p('Ni', Ni)1770 WRITE(*,*) 'Ni = ', Ni1771 Ei=0.51772 CALL getin_p('Ei', Ei)1773 WRITE(*,*) 'Ei = ', Ei1774 C_cap=0.51775 CALL getin_p('C_cap', C_cap)1776 WRITE(*,*) 'C_cap = ', C_cap1777 d_top=1.21778 CALL getin_p('d_top', d_top)1779 WRITE(*,*) 'd_top = ', d_top1780 1781 firstcall=.FALSE.1782 1783 ENDIF1784 1785 1786 1663 1787 1664 !------------------------------------------------------------------------------- … … 2332 2209 !============================================================================= 2333 2210 2334 USE ioipsl_getin_p_mod, ONLY : getin_p 2335 USE phys_state_var_mod, ONLY : fm_therm, detr_therm, entr_therm 2211 use phys_state_var_mod, ONLY : fm_therm, detr_therm, entr_therm 2336 2212 2337 2213 IMPLICIT none … … 2453 2329 END SUBROUTINE ICE_MPC_BL_CLOUDS 2454 2330 2455 2456 2457 2458 END MODULE cloudth_mod 2459 2460 2461 2462 2331 END MODULE lmdz_cloudth -
LMDZ6/trunk/libf/phylmd/lscp_ini_mod.F90
r4639 r4651 129 129 CONTAINS 130 130 131 SUBROUTINE lscp_ini(dtime,ok_ice_sursat, RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in, &131 SUBROUTINE lscp_ini(dtime,ok_ice_sursat, iflag_ratqs, RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in, & 132 132 RVTMP2_in, RTT_in,RD_in,RG_in) 133 133 … … 136 136 USE print_control_mod, ONLY: prt_level, lunout 137 137 USE ice_sursat_mod, ONLY: ice_sursat_init 138 USE lmdz_cloudth_ini, ONLY : cloudth_ini 138 139 139 140 REAL, INTENT(IN) :: dtime 140 141 LOGICAL, INTENT(IN) :: ok_ice_sursat 142 INTEGER, INTENT(IN) :: iflag_ratqs 141 143 142 144 REAL, INTENT(IN) :: RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in … … 255 257 IF (ok_ice_sursat) CALL ice_sursat_init() 256 258 257 259 CALL cloudth_ini(iflag_cloudth_vert,iflag_ratqs) 258 260 259 261 end subroutine lscp_ini -
LMDZ6/trunk/libf/phylmd/lscp_mod.F90
r4639 r4651 17 17 distcltop,temp_cltop, & 18 18 qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, & 19 Tcontr, qcontr, qcontr2, fcontrN, fcontrP) 19 Tcontr, qcontr, qcontr2, fcontrN, fcontrP, & 20 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 20 21 21 22 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ … … 90 91 ! 91 92 USE print_control_mod, ONLY: prt_level, lunout 92 USE cloudth_mod, ONLY : cloudth, cloudth_v3, cloudth_v6, cloudth_mpc93 USE lmdz_cloudth, ONLY : cloudth, cloudth_v3, cloudth_v6, cloudth_mpc 93 94 USE lscp_tools_mod, ONLY : calc_qsat_ecmwf, icefrac_lscp, calc_gammasat 94 95 USE lscp_tools_mod, ONLY : fallice_velocity, distance_to_cloud_top … … 187 188 REAL, DIMENSION(klon,klev), INTENT(OUT) :: fcontrN ! fraction of grid favourable to non-persistent contrails 188 189 REAL, DIMENSION(klon,klev), INTENT(OUT) :: fcontrP ! fraction of grid favourable to persistent contrails 190 REAL, DIMENSION(klon,klev), INTENT(OUT) :: cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv 189 191 190 192 … … 623 625 zq,zqta,fraca, & 624 626 qcloud,ctot,zpspsk,paprs,pplay,ztla,zthl, & 625 ratqs,zqs,t) 627 ratqs,zqs,t, & 628 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 629 630 631 632 626 633 627 634 ELSEIF (iflag_cloudth_vert.GE.3 .AND. iflag_cloudth_vert.LE.5) THEN … … 630 637 zq,zqta,fraca, & 631 638 qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, & 632 ratqs,zqs,t) 639 ratqs,zqs,t, & 640 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 633 641 634 642 !Jean Jouhaud's version, Decembre 2018 … … 640 648 zq,zqta,fraca, & 641 649 qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, & 642 ratqs,zqs,t) 650 ratqs,zqs,t, & 651 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 643 652 644 653 ENDIF … … 651 660 t,ztv,zq,zqta,fraca, zpspsk, & 652 661 paprs,pplay,ztla,zthl,ratqs,zqs,psfl, & 653 qcloud,qincloud_mpc,icefrac_mpc,ctot,ctot_vol) 662 qcloud,qincloud_mpc,icefrac_mpc,ctot,ctot_vol, & 663 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 654 664 655 665 ENDIF ! iflag_mpc_bl -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r4639 r4651 87 87 USE lmdz_ratqs_main, ONLY : ratqs_main 88 88 USE lmdz_ratqs_ini, ONLY : ratqs_ini 89 USE phys_output_var_mod, ONLY : cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv 90 89 91 90 92 !USE cmp_seri_mod … … 1807 1809 & RG,RD,RCPD,RKAPPA,RLVTT,RETV) 1808 1810 CALL ratqs_ini(klon,klev,iflag_thermals,lunout,nbsrf,is_lic,is_ter,RG,RV,RD,RCPD,RLSTT,RLVTT,RTT) 1809 CALL lscp_ini(pdtphys,ok_ice_sursat, 1811 CALL lscp_ini(pdtphys,ok_ice_sursat,iflag_ratqs,RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT,RD,RG) 1810 1812 CALL blowing_snow_ini(prt_level,lunout, & 1811 1813 RCPD, RLSTT, RLVTT, RLMLT, & … … 3741 3743 iflag_ice_thermo, ok_ice_sursat, zqsatl, zqsats, distcltop, temp_cltop, & 3742 3744 qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, & 3743 Tcontr, qcontr, qcontr2, fcontrN, fcontrP ) 3745 Tcontr, qcontr, qcontr2, fcontrN, fcontrP , & 3746 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 3747 3744 3748 3745 3749 ELSE -
LMDZ6/trunk/libf/phylmd/physiqex_mod.F90
r4548 r4651 9 9 & debut,lafin,pdtphys, & 10 10 & paprs,pplay,pphi,pphis,presnivs, & 11 & u,v,rot,t ,qx, &11 & u,v,rot,temp,qx, & 12 12 & flxmass_w, & 13 13 & d_u, d_v, d_t, d_qx, d_ps) 14 14 15 USE dimphy, only : klon,klev 16 USE infotrac_phy, only : nqtot 17 USE geometry_mod, only : latitude 18 ! USE comcstphy, only : rg 19 USE ioipsl, only : ymds2ju 20 USE phys_state_var_mod, only : phys_state_var_init 21 USE phyetat0_mod, only: phyetat0 22 USE output_physiqex_mod, ONLY: output_physiqex 15 16 USE dimphy, only : klon,klev 17 USE infotrac_phy, only : nqtot 18 USE geometry_mod, only : latitude 19 USE ioipsl, only : ymds2ju 20 USE phys_state_var_mod, only : phys_state_var_init 21 USE phyetat0_mod, only: phyetat0 22 USE output_physiqex_mod, ONLY: output_physiqex 23 use vdif_ini, only : vdif_ini_ 24 USE lmdz_thermcell_ini, ONLY : thermcell_ini 25 USE ioipsl_getin_p_mod, ONLY : getin_p 26 USE wxios, ONLY: missing_val, using_xios 27 USE lscp_mod, ONLY : lscp 28 USE lscp_ini_mod, ONLY : lscp_ini 29 USE add_phys_tend_mod, ONLY : add_phys_tend 30 23 31 24 32 IMPLICIT none 33 34 include "YOETHF.h" 35 36 37 38 25 39 ! 26 40 ! Routine argument: … … 32 46 logical,intent(in) :: lafin ! signals last call to physics 33 47 real,intent(in) :: pdtphys ! physics time step (s) 34 real,intent(in) :: paprs(klon,klev+1) ! interlayer pressure (Pa) 35 real,intent(in) :: pplay(klon,klev) ! mid-layer pressure (Pa) 36 real,intent(in) :: pphi(klon,klev) ! geopotential at mid-layer 37 real,intent(in) :: pphis(klon) ! surface geopotential 38 real,intent(in) :: presnivs(klev) ! pseudo-pressure (Pa) of mid-layers 39 real,intent(in) :: u(klon,klev) ! eastward zonal wind (m/s) 40 real,intent(in) :: v(klon,klev) ! northward meridional wind (m/s) 41 real,intent(in) :: rot(klon,klev) ! northward meridional wind (m/s) 42 real,intent(in) :: t(klon,klev) ! temperature (K) 43 real,intent(in) :: qx(klon,klev,nqtot) ! tracers (.../kg_air) 44 real,intent(in) :: flxmass_w(klon,klev) ! vertical mass flux 45 real,intent(out) :: d_u(klon,klev) ! physics tendency on u (m/s/s) 46 real,intent(out) :: d_v(klon,klev) ! physics tendency on v (m/s/s) 47 real,intent(out) :: d_t(klon,klev) ! physics tendency on t (K/s) 48 real,intent(out) :: d_qx(klon,klev,nqtot) ! physics tendency on tracers 49 real,intent(out) :: d_ps(klon) ! physics tendency on surface pressure 48 real,dimension(klon,klev+1),intent(in) :: paprs ! interlayer pressure (Pa) 49 real,dimension(klon,klev),intent(in) :: pplay ! mid-layer pressure (Pa) 50 real,dimension(klon,klev),intent(in) :: pphi ! geopotential at mid-layer 51 real,dimension(klon),intent(in) :: pphis ! surface geopotential 52 real,dimension(klev),intent(in) :: presnivs ! pseudo-pressure (Pa) of mid-layers 53 real,dimension(klon,klev),intent(in) :: u ! eastward zonal wind (m/s) 54 real,dimension(klon,klev),intent(in) :: v ! northward meridional wind (m/s) 55 real,dimension(klon,klev),intent(in) :: rot ! northward meridional wind (m/s) 56 real,dimension(klon,klev),intent(in) :: temp ! temperature (K) 57 real,dimension(klon,klev,nqtot),intent(in) :: qx ! tracers (.../kg_air) 58 real,dimension(klon,klev),intent(in) :: flxmass_w ! vertical mass flux 59 real,dimension(klon,klev),intent(out) :: d_u ! physics tendency on u (m/s/s) 60 real,dimension(klon,klev),intent(out) :: d_v ! physics tendency on v (m/s/s) 61 real,dimension(klon,klev),intent(out) :: d_t ! physics tendency on t (K/s) 62 real,dimension(klon,klev,nqtot),intent(out) :: d_qx ! physics tendency on tracers 63 real,dimension(klon),intent(out) :: d_ps ! physics tendency on surface pressure 64 65 real, dimension(klon,klev) :: u_loc 66 real, dimension(klon,klev) :: v_loc 67 real, dimension(klon,klev) :: t_loc 68 real, dimension(klon,klev) :: h_loc 69 real, dimension(klon,klev) :: d_u_loc,d_v_loc,d_t_loc,d_h_loc 70 71 real, dimension(klon,klev) :: d_u_dyn,d_v_dyn,d_t_dyn 72 real, dimension(klon,klev,nqtot) :: d_q_dyn 73 real, allocatable, dimension(:,:), save :: u_prev,v_prev,t_prev 74 real, allocatable, dimension(:,:,:), save :: q_prev 75 !$OMP THREADPRIVATE(u_prev,v_prev,t_prev,q_prev) 76 77 78 79 real, dimension(klon,klev) :: d_u_vdif,d_v_vdif,d_t_vdif,d_h_vdif 80 real, dimension(klon,klev) :: d_u_the,d_v_the,d_t_the 81 real, dimension(klon,klev,nqtot) :: q_loc,d_q_loc,d_q_vdif,d_q_the 82 83 real, dimension(klon) :: capcal,z0m,z0h,dtsrf,emis,fluxsrf,cdh,cdv,tsrf_ 84 real, dimension(klon,klev) :: zzlay,masse,zpopsk 85 real, dimension(klon,klev+1) :: zzlev,kz_v,kz_h,richardson 86 87 real, save, allocatable, dimension(:) :: tsrf,f0,zmax0 88 real, save, allocatable, dimension(:,:) :: q2 89 !$OMP THREADPRIVATE(tsrf,q2,f0,zmax0) 90 91 real,save :: ratqsbas=0.002,ratqshaut=0.3,ratqsp0=50000.,ratqsdp=20000. 92 !$OMP THREADPRIVATE(ratqsbas,ratqshaut,ratqsp0,ratqsdp) 93 94 95 real :: z1,z2,tau_thermals 96 logical :: lwrite 97 integer :: iflag_replay 98 99 integer :: iflag_thermals=18 100 101 !-------------------------------------------------------------- 102 ! Declaration lscp 103 !-------------------------------------------------------------- 104 INTEGER :: iflag_cld_th ! flag that determines the distribution of convective clouds ! IN 105 INTEGER :: iflag_ice_thermo! flag to activate the ice thermodynamics ! IN 106 LOGICAL :: ok_ice_sursat ! flag to determine if ice sursaturation is activated ! IN 107 LOGICAL, DIMENSION(klon,klev) :: ptconv ! grid points where deep convection scheme is active ! IN 108 REAL, DIMENSION(klon,klev) :: ztv ! virtual potential temperature [K] ! IN 109 REAL, DIMENSION(klon,klev) :: zqta ! specific humidity within thermals [kg/kg] ! IN 110 REAL, DIMENSION(klon,klev+1) :: frac_the,fm_the 111 REAL, DIMENSION(klon,klev) :: zpspsk ! exner potential (p/100000)**(R/cp) ! IN 112 REAL, DIMENSION(klon,klev) :: ztla ! liquid temperature within thermals [K] ! IN 113 REAL, DIMENSION(klon,klev) :: zthl ! liquid potential temperature [K] ! INOUT 114 REAL, DIMENSION(klon,klev) :: ratqs ! function of pressure that sets the large-scale ! INOUT 115 REAL, DIMENSION(klon,klev) :: beta ! conversion rate of condensed water ! INOUT 116 REAL, DIMENSION(klon,klev) :: rneb_seri ! fraction nuageuse en memoire ! INOUT 117 REAL, DIMENSION(klon,klev) :: d_t_lscp ! temperature increment [K] ! OUT 118 REAL, DIMENSION(klon,klev) :: d_q_lscp ! specific humidity increment [kg/kg] ! OUT 119 REAL, DIMENSION(klon,klev) :: d_ql_lscp ! liquid water increment [kg/kg] ! OUT 120 REAL, DIMENSION(klon,klev) :: d_qi_lscp ! cloud ice mass increment [kg/kg] ! OUT 121 REAL, DIMENSION(klon,klev) :: rneb ! cloud fraction [-] ! OUT 122 REAL, DIMENSION(klon,klev) :: rneblsvol ! cloud fraction per unit volume [-] ! OUT 123 REAL, DIMENSION(klon,klev) :: pfraclr ! precip fraction clear-sky part [-] ! OUT 124 REAL, DIMENSION(klon,klev) :: pfracld ! precip fraction cloudy part [-] ! OUT 125 REAL, DIMENSION(klon,klev) :: radocond ! condensed water used in the radiation scheme [kg/kg] ! OUT 126 REAL, DIMENSION(klon,klev) :: radicefrac ! ice fraction of condensed water for radiation scheme ! OUT 127 REAL, DIMENSION(klon,klev) :: rhcl ! clear-sky relative humidity [-] ! OUT 128 REAL, DIMENSION(klon) :: rain ! surface large-scale rainfall [kg/s/m2] ! OUT 129 REAL, DIMENSION(klon) :: snow ! surface large-scale snowfall [kg/s/m2] ! OUT 130 REAL, DIMENSION(klon,klev) :: qsatl ! saturation specific humidity wrt liquid [kg/kg] ! OUT 131 REAL, DIMENSION(klon,klev) :: qsats ! saturation specific humidity wrt ice [kg/kg] ! OUT 132 REAL, DIMENSION(klon,klev+1) :: prfl ! large-scale rainfall flux in the column [kg/s/m2] ! OUT 133 REAL, DIMENSION(klon,klev+1) :: psfl ! large-scale snowfall flux in the column [kg/s/m2] ! OUT 134 REAL, DIMENSION(klon,klev) :: distcltop ! distance to cloud top [m] ! OUT 135 REAL, DIMENSION(klon,klev) :: temp_cltop ! temperature of cloud top [K] ! OUT 136 REAL, DIMENSION(klon,klev) :: frac_impa ! scavenging fraction due tu impaction [-] ! OUT 137 REAL, DIMENSION(klon,klev) :: frac_nucl ! scavenging fraction due tu nucleation [-] ! OUT 138 REAL, DIMENSION(klon,klev) :: qclr ! specific total water content in clear sky region [kg/kg] ! OUT 139 REAL, DIMENSION(klon,klev) :: qcld ! specific total water content in cloudy region [kg/kg] ! OUT 140 REAL, DIMENSION(klon,klev) :: qss ! specific total water content in supersat region [kg/kg] ! OUT 141 REAL, DIMENSION(klon,klev) :: qvc ! specific vapor content in clouds [kg/kg] ! OUT 142 REAL, DIMENSION(klon,klev) :: rnebclr ! mesh fraction of clear sky [-] ! OUT 143 REAL, DIMENSION(klon,klev) :: rnebss ! mesh fraction of ISSR [-] ! OUT 144 REAL, DIMENSION(klon,klev) :: gamma_ss ! coefficient governing the ice nucleation RHi threshold [-] ! OUT 145 REAL, DIMENSION(klon,klev) :: Tcontr ! threshold temperature for contrail formation [K] ! OUT 146 REAL, DIMENSION(klon,klev) :: qcontr ! threshold humidity for contrail formation [kg/kg] ! OUT 147 REAL, DIMENSION(klon,klev) :: qcontr2 ! // (2nd expression more consistent with LMDZ expression of q)! OUT 148 REAL, DIMENSION(klon,klev) :: fcontrN ! fraction of grid favourable to non-persistent contrails ! OUT 149 REAL, DIMENSION(klon,klev) :: fcontrP ! fraction of grid favourable to persistent contrails ! OUT 150 !-------------------------------------------------------------- 151 152 REAL, DIMENSION(klon,klev) :: d_t_eva,d_q_eva,d_ql_eva,d_qi_eva 153 include "YOMCST.h" 50 154 51 155 ! include "clesphys.h" … … 58 162 59 163 60 real :: temp_newton(klon,klev) 61 integer :: k 164 real,dimension(klon,klev) :: temp_newton 165 integer :: i,k,iq 166 INTEGER, SAVE :: itap=0 167 !$OMP THREADPRIVATE(itap) 168 INTEGER, SAVE :: abortphy=0 ! Reprere si on doit arreter en fin de phys 169 !$OMP THREADPRIVATE(abortphy) 170 171 integer, save :: iflag_reevap=1,iflag_newton=0,iflag_vdif=1,iflag_lscp=1,iflag_cloudth_vert,iflag_ratqs 172 !$OMP THREADPRIVATE(iflag_reevap,iflag_newton,iflag_vdif,iflag_lscp,iflag_cloudth_vert,iflag_ratqs) 173 62 174 logical, save :: first=.true. 63 175 !$OMP THREADPRIVATE(first) 64 65 real,save :: rg=9.8166 !$OMP THREADPRIVATE(rg)67 176 68 177 ! For I/Os 69 178 integer :: itau0 70 179 real :: zjulian 180 real,dimension(klon,klev) :: du0,dv0,dqbs0 181 real,dimension(klon,klev) :: cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv 71 182 72 183 … … 93 204 ! Initialize IOIPSL output file 94 205 #endif 206 call suphel 207 call vdif_ini_(klon,RCPD,RD,RG,RKAPPA) 208 ! Pourquoi ce tau_thermals en argument ??? AFAIRE 209 tau_thermals=0. 210 call getin_p('iflag_thermals',iflag_thermals) 211 212 call getin_p('iflag_newton',iflag_newton) 213 call getin_p('iflag_reevap',iflag_reevap) 214 call getin_p('iflag_cloudth_vert',iflag_cloudth_vert) 215 call getin_p('iflag_ratqs',iflag_ratqs) 216 call getin_p('iflag_vdif',iflag_vdif) 217 call getin_p('iflag_lscp',iflag_lscp) 218 call getin_p('ratqsbas',ratqsbas) 219 call getin_p('ratqshaut',ratqshaut) 220 call getin_p('ratqsp0',ratqsp0) 221 call getin_p('ratqsdp',ratqsdp) 222 CALL thermcell_ini(iflag_thermals,0,tau_thermals,6, & 223 & RG,RD,RCPD,RKAPPA,RLVTT,RETV) 224 CALL lscp_ini(pdtphys,.false.,iflag_ratqs, RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT,RD,RG) 225 226 227 228 allocate(tsrf(klon),q2(klon,klev+1),f0(klon),zmax0(klon)) 229 allocate(u_prev(klon,klev),v_prev(klon,klev),t_prev(klon,klev),q_prev(klon,klev,nqtot)) 230 231 u_prev(:,:)=u(:,:) 232 v_prev(:,:)=v(:,:) 233 t_prev(:,:)=temp(:,:) 234 q_prev(:,:,:)=qx(:,:,:) 235 236 q2=1.e-10 237 tsrf=temp(:,1) 238 f0=0. 239 zmax0=0. 240 241 iflag_replay=1 242 if ( iflag_replay == 1 ) CALL iophys_ini(pdtphys) 243 95 244 96 245 endif ! of if (debut) … … 100 249 !------------------------------------------------------------ 101 250 251 d_u_dyn(:,:)=(u(:,:)-u_prev(:,:))/pdtphys 252 d_v_dyn(:,:)=(v(:,:)-v_prev(:,:))/pdtphys 253 d_t_dyn(:,:)=(temp(:,:)-t_prev(:,:))/pdtphys 254 d_q_dyn(:,:,:)=(qx(:,:,:)-q_prev(:,:,:))/pdtphys 102 255 103 256 ! set all tendencies to zero … … 108 261 d_ps(1:klon)=0. 109 262 263 u_loc(1:klon,1:klev)=u(1:klon,1:klev) 264 v_loc(1:klon,1:klev)=v(1:klon,1:klev) 265 t_loc(1:klon,1:klev)=temp(1:klon,1:klev) 266 d_u_loc(1:klon,1:klev)=0. 267 d_v_loc(1:klon,1:klev)=0. 268 d_t_loc(1:klon,1:klev)=0. 269 do iq=1,nqtot 270 do k=1,klev 271 do i=1,klon 272 q_loc(i,k,iq)=qx(i,k,iq) 273 enddo 274 enddo 275 enddo 276 277 du0(1:klon,1:klev)=0. 278 dv0(1:klon,1:klev)=0. 279 dqbs0(1:klon,1:klev)=0. 280 281 282 110 283 !------------------------------------------------------------ 111 284 ! Calculs 112 285 !------------------------------------------------------------ 113 286 114 ! compute tendencies to return to the dynamics: 115 ! "friction" on the first layer 116 d_u(1:klon,1)=-u(1:klon,1)/86400. 117 d_v(1:klon,1)=-v(1:klon,1)/86400. 118 ! newtonian relaxation towards temp_newton() 287 !------------------------------------------------------------ 288 ! Rappel en temperature et frottement dans la premiere chouche 289 !------------------------------------------------------------ 290 291 if ( iflag_newton == 1 ) then 292 ! compute tendencies to return to the dynamics: 293 ! "friction" on the first layer 294 d_u(1:klon,1)=-u(1:klon,1)/86400. 295 d_v(1:klon,1)=-v(1:klon,1)/86400. 296 ! newtonian relaxation towards temp_newton() 297 do k=1,klev 298 temp_newton(1:klon,k)=280.+cos(latitude(1:klon))*40.-pphi(1:klon,k)/rg*6.e-3 299 d_t(1:klon,k)=(temp_newton(1:klon,k)-temp(1:klon,k))/5.e5 300 enddo 301 else 302 temp_newton(:,:)=0. 303 endif 304 305 306 !------------------------------------------------------------ 307 ! Reevaporation de la pluie 308 !------------------------------------------------------------ 309 310 iflag_ice_thermo=1 311 if ( iflag_reevap == 1 ) then 312 CALL reevap (klon,klev,iflag_ice_thermo,t_loc,q_loc(:,:,1),q_loc(:,:,2),q_loc(:,:,3), & 313 & d_t_eva,d_q_eva,d_ql_eva,d_qi_eva) 314 do k=1,klev 315 do i=1,klon 316 t_loc(i,k)=t_loc(i,k)+d_t_eva(i,k) 317 q_loc(i,k,1)=q_loc(i,k,1)+d_q_eva(i,k) 318 q_loc(i,k,2)=q_loc(i,k,2)+d_ql_eva(i,k) 319 q_loc(i,k,3)=q_loc(i,k,3)+d_qi_eva(i,k) 320 q_loc(i,k,2)=0. 321 q_loc(i,k,3)=0. 322 enddo 323 enddo 324 else 325 d_t_eva(:,:)=0. 326 d_q_eva(:,:)=0. 327 d_ql_eva(:,:)=0. 328 d_qi_eva(:,:)=0. 329 endif 330 331 332 333 !----------------------------------------------------------------------- 334 ! Variables intermédiaires (altitudes, temperature potentielle ...) 335 !----------------------------------------------------------------------- 336 337 DO k=1,klev 338 DO i=1,klon 339 zzlay(i,k)=pphi(i,k)/rg 340 ENDDO 341 ENDDO 342 DO i=1,klon 343 zzlev(i,1)=0. 344 ENDDO 345 DO k=2,klev 346 DO i=1,klon 347 z1=(pplay(i,k-1)+paprs(i,k))/(pplay(i,k-1)-paprs(i,k)) 348 z2=(paprs(i,k)+pplay(i,k))/(paprs(i,k)-pplay(i,k)) 349 zzlev(i,k)=(z1*zzlay(i,k-1)+z2*zzlay(i,k))/(z1+z2) 350 ENDDO 351 ENDDO 352 353 ! Transformation de la temperature en temperature potentielle 354 DO k=1,klev 355 DO i=1,klon 356 zpopsk(i,k)=(pplay(i,k)/paprs(i,1))**rkappa 357 masse(i,k)=(paprs(i,k)-paprs(i,k+1))/rg 358 ENDDO 359 ENDDO 360 DO k=1,klev 361 DO i=1,klon 362 h_loc(i,k)=t_loc(i,k)/zpopsk(i,k) 363 d_h_loc(i,k)=d_t_loc(i,k)/zpopsk(i,k) 364 d_q_loc(i,k,1)=0. 365 ENDDO 366 ENDDO 367 368 !----------------------------------------------------------------------- 369 ! Diffusion verticale 370 !----------------------------------------------------------------------- 371 372 if ( iflag_vdif == 1 ) then 373 emis(:)=1. 374 !tsrf=300. 375 z0m=0.01 376 z0h=0.01 377 capcal=1e5 378 lwrite=.false. 379 print*,'lwrite ',lwrite 380 call vdif(klon,klev, & 381 & pdtphys,capcal,z0m,z0h, & 382 & pplay,paprs,zzlay,zzlev, & 383 & u_loc,v_loc,t_loc,h_loc,q_loc,tsrf,emis, & 384 & d_u_loc,d_v_loc,d_h_loc,d_q_loc,fluxsrf, & 385 & d_u_vdif,d_v_vdif,d_h_vdif,d_q_vdif,dtsrf,q2,kz_v,kz_h, & 386 & richardson,cdv,cdh, & 387 & lwrite) 388 do k=1,klev 389 do i=1,klon 390 d_t_vdif(i,k)=d_h_vdif(i,k)*zpopsk(i,k) 391 t_loc(i,k)=t_loc(i,k)+d_t_vdif(i,k)*pdtphys 392 u_loc(i,k)=u_loc(i,k)+d_u_vdif(i,k)*pdtphys 393 v_loc(i,k)=v_loc(i,k)+d_v_vdif(i,k)*pdtphys 394 q_loc(i,k,1)=q_loc(i,k,1)+d_q_vdif(i,k,1)*pdtphys 395 enddo 396 enddo 397 do i=1,klon 398 tsrf(i)=tsrf(i)+dtsrf(i)*pdtphys 399 enddo 400 else 401 d_u_vdif(:,:)=0. 402 d_v_vdif(:,:)=0. 403 d_t_vdif(:,:)=0. 404 d_h_vdif(:,:)=0. 405 d_q_vdif(:,:,1)=0. 406 kz_v(:,:)=0. 407 kz_h(:,:)=0. 408 richardson(:,:)=0. 409 endif 410 411 !----------------------------------------------------------------------- 412 ! Thermiques 413 !----------------------------------------------------------------------- 414 119 415 do k=1,klev 120 temp_newton(1:klon,k)=280.+cos(latitude(1:klon))*40.-pphi(1:klon,k)/rg*6.e-3 121 d_t(1:klon,k)=(temp_newton(1:klon,k)-t(1:klon,k))/1.e5 416 do i=1,klon 417 d_u_the(i,k)=0. 418 d_v_the(i,k)=0. 419 d_t_the(i,k)=0. 420 d_q_the(i,k,1)=0. 421 enddo 122 422 enddo 123 423 424 if ( iflag_thermals > 0 ) then 425 426 427 zqta(:,:)=q_loc(:,:,1) 428 call caltherm(pdtphys & 429 & ,pplay,paprs,pphi & 430 & ,u_loc,v_loc,t_loc,q_loc,debut & 431 & ,f0,zmax0,d_u_the,d_v_the,d_t_the,d_q_the & 432 & ,frac_the,fm_the,zqta,ztv,zpspsk,ztla,zthl & 433 & ) 434 435 do k=1,klev 436 do i=1,klon 437 t_loc(i,k)=t_loc(i,k)+d_t_the(i,k) 438 u_loc(i,k)=u_loc(i,k)+d_u_the(i,k) 439 v_loc(i,k)=v_loc(i,k)+d_v_the(i,k) 440 q_loc(i,k,1)=q_loc(i,k,1)+d_q_the(i,k,1) 441 enddo 442 enddo 443 444 else 445 frac_the(:,:)=0. 446 fm_the(:,:)=0. 447 ztv(:,:)=t_loc(:,:) 448 zqta(:,:)=q_loc(:,:,1) 449 ztla(:,:)=0. 450 zthl(:,:)=0. 451 zpspsk(:,:)=(pplay(:,:)/100000.)**RKAPPA 452 453 endif 454 455 !----------------------------------------------------------------------- 456 ! Condensation grande échelle 457 !----------------------------------------------------------------------- 458 459 iflag_cld_th=5 460 ok_ice_sursat=.false. 461 ptconv(:,:)=.false. 462 distcltop=0. 463 temp_cltop=0. 464 beta(:,:)=1. 465 rneb_seri(:,:)=0. 466 do k=1,klev 467 ratqs(:,k)=ratqsbas+0.5*(ratqshaut-ratqsbas) & 468 *( tanh( (ratqsp0-pplay(:,k))/ratqsdp) + 1.) 469 enddo 470 471 472 if ( iflag_lscp == 1 ) then 473 474 call lscp(klon,klev,pdtphys,missing_val, & 475 paprs,pplay,t_loc,q_loc,ptconv,ratqs, & 476 d_t_lscp, d_q_lscp, d_ql_lscp, d_qi_lscp, rneb, rneblsvol, rneb_seri, & 477 pfraclr,pfracld, & 478 radocond, radicefrac, rain, snow, & 479 frac_impa, frac_nucl, beta, & 480 prfl, psfl, rhcl, zqta, frac_the, & 481 ztv, zpspsk, ztla, zthl, iflag_cld_th, & 482 iflag_ice_thermo, ok_ice_sursat, qsatl, qsats, & 483 distcltop,temp_cltop, & 484 qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, & 485 Tcontr, qcontr, qcontr2, fcontrN, fcontrP, & 486 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 487 488 489 do k=1,klev 490 do i=1,klon 491 t_loc(i,k)=t_loc(i,k)+d_t_lscp(i,k) 492 q_loc(i,k,1)=q_loc(i,k,1)+d_q_lscp(i,k) 493 q_loc(i,k,2)=q_loc(i,k,2)+d_ql_lscp(i,k) 494 q_loc(i,k,3)=q_loc(i,k,3)+d_qi_lscp(i,k) 495 enddo 496 enddo 497 498 else 499 d_t_lscp(:,:)=0. 500 d_q_lscp(:,:)=0. 501 d_ql_lscp(:,:)=0. 502 d_qi_lscp(:,:)=0. 503 rneb(:,:)=0. 504 rneblsvol(:,:)=0. 505 pfraclr(:,:)=0. 506 pfracld(:,:)=0. 507 radocond(:,:)=0. 508 rain(:)=0. 509 snow(:)=0. 510 radicefrac(:,:)=0. 511 rhcl (:,:)=0. 512 qsatl (:,:)=0. 513 qsats (:,:)=0. 514 prfl (:,:)=0. 515 psfl (:,:)=0. 516 distcltop (:,:)=0. 517 temp_cltop(:,:)=0. 518 frac_impa (:,:)=0. 519 frac_nucl (:,:)=0. 520 qclr (:,:)=0. 521 qcld (:,:)=0. 522 qss (:,:)=0. 523 qvc (:,:)=0. 524 rnebclr (:,:)=0. 525 rnebss (:,:)=0. 526 gamma_ss (:,:)=0. 527 Tcontr (:,:)=0. 528 qcontr (:,:)=0. 529 qcontr2 (:,:)=0. 530 fcontrN (:,:)=0. 531 fcontrP (:,:)=0. 532 endif 533 534 535 d_u(:,:)=(u_loc(:,:)-u(:,:))/pdtphys 536 d_v(:,:)=(v_loc(:,:)-v(:,:))/pdtphys 537 d_t(:,:)=(t_loc(:,:)-temp(:,:))/pdtphys 538 d_qx(:,:,:)=(q_loc(:,:,:)-qx(:,:,:))/pdtphys 124 539 125 540 !------------------------------------------------------------ … … 128 543 129 544 130 call output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,t,qx,0.*t,0.*t,0.*t,0.*t,0.*t,0.*t) 545 tsrf_(:)=tsrf(:) 546 if ( iflag_replay == 0 ) then 547 call output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,temp,qx,0.*u,0.*u,0.*u,0.*u,q2,0.*u) 548 else 549 ! En mode replay, on sort aussi les variables de base 550 ! Les lignes qui suivent ont été générées automatiquement avec : 551 ! ( for i in `grep -i 'real.*::' physiqex_mod.F90 | sed -e '/^!/d' | grep '(klon,klev' | cut -d: -f3 | cut -d! -f1 | sed -e 's/,/ /g' -e '/rot/d'` ; do echo ' call iophys_ecrit("'$i'",klev,"","",'$i')' ; done ) > physiqex_out.h 552 ! ( for i in `grep -i 'real.*::' physiqex_mod.F90 | sed -e '/^!/d' | grep '(klon)' | cut -d: -f3 | cut -d! -f1 | sed -e 's/,/ /g' -e '/rot/d'` ; do echo ' call iophys_ecrit("'$i'",1,"","",'$i')' ; done ) >> physiqex_out.h 553 include "physiqex_out.h" 554 555 endif 131 556 132 557 … … 136 561 endif 137 562 563 print*,'Fin physiqex' 138 564 139 565 end subroutine physiqex -
LMDZ6/trunk/libf/phylmdiso/fisrtilp.F90
r4535 r4651 20 20 USE icefrac_lsc_mod ! compute ice fraction (JBM 3/14) 21 21 USE print_control_mod, ONLY: prt_level, lunout 22 USE cloudth_mod22 USE lmdz_cloudth, only : cloudth, cloudth_v3, cloudth_v6 23 23 USE ioipsl_getin_p_mod, ONLY : getin_p 24 24 USE phys_local_var_mod, ONLY: ql_seri,qs_seri … … 31 31 USE lscp_ini_mod, ONLY: cld_tau_lsc, cld_tau_con, cld_lc_lsc, cld_lc_con 32 32 USE lscp_ini_mod, ONLY: reevap_ice, iflag_bergeron, iflag_fisrtilp_qsat, iflag_pdf 33 use phys_output_var_mod, ONLY : cloudth_sth,cloudth_senv 34 use phys_output_var_mod, ONLY : cloudth_sigmath,cloudth_sigmaenv 35 33 36 34 37 … … 1124 1127 zq,zqta,fraca, & 1125 1128 qcloud,ctot,zpspsk,paprs,pplay,ztla,zthl, & 1126 ratqs,zqs,t) 1129 ratqs,zqs,t, & 1130 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 1131 1127 1132 elseif (iflag_cloudth_vert>=3 .and. iflag_cloudth_vert<=5) then 1128 1133 call cloudth_v3(klon,klev,k,ztv, & 1129 1134 zq,zqta,fraca, & 1130 1135 qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, & 1131 ratqs,zqs,t) 1136 ratqs,zqs,t, & 1137 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 1138 1132 1139 !---------------------------------- 1133 1140 !Version these Jean Jouhaud, Decembre 2018 … … 1137 1144 zq,zqta,fraca, & 1138 1145 qcloud,ctot,ctot_vol,zpspsk,paprs,pplay,ztla,zthl, & 1139 ratqs,zqs,t) 1146 ratqs,zqs,t, & 1147 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 1148 1140 1149 1141 1150 endif -
LMDZ6/trunk/libf/phylmdiso/lmdz_cloudth.F90
r4650 r4651 1 link ../phylmd/ cloudth_mod.F901 link ../phylmd/lmdz_cloudth.F90 -
LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90
r4639 r4651 87 87 USE lmdz_ratqs_main, ONLY : ratqs_main 88 88 USE lmdz_ratqs_ini, ONLY : ratqs_ini 89 USE phys_output_var_mod, ONLY : cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv 90 89 91 90 92 !USE cmp_seri_mod … … 1919 1921 & RG,RD,RCPD,RKAPPA,RLVTT,RETV) 1920 1922 CALL ratqs_ini(klon,klev,iflag_thermals,lunout,nbsrf,is_lic,is_ter,RG,RV,RD,RCPD,RLSTT,RLVTT,RTT) 1921 CALL lscp_ini(pdtphys,ok_ice_sursat, RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT,RD,RG)1923 CALL lscp_ini(pdtphys,ok_ice_sursat,iflag_ratqs,RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT,RD,RG) 1922 1924 CALL blowing_snow_ini(prt_level,lunout, & 1923 1925 RCPD, RLSTT, RLVTT, RLMLT, & … … 4808 4810 iflag_ice_thermo, ok_ice_sursat, zqsatl, zqsats, distcltop, temp_cltop, & 4809 4811 qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, & 4810 Tcontr, qcontr, qcontr2, fcontrN, fcontrP ) 4812 Tcontr, qcontr, qcontr2, fcontrN, fcontrP , & 4813 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv) 4814 4811 4815 4812 4816 ELSE
Note: See TracChangeset
for help on using the changeset viewer.