Changeset 2945 for LMDZ5/trunk/libf/phylmd/cloudth_mod.F90
- Timestamp:
- Jul 12, 2017, 4:20:24 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/cloudth_mod.F90
r2911 r2945 587 587 SUBROUTINE cloudth_v3(ngrid,klev,ind2, & 588 588 & ztv,po,zqta,fraca, & 589 & qcloud,ctot, zpspsk,paprs,ztla,zthl, &589 & qcloud,ctot,ctot_vol,zpspsk,paprs,ztla,zthl, & 590 590 & ratqs,zqs,t) 591 591 … … 624 624 REAL zqsatenv(ngrid,klev) 625 625 626 627 REAL sigma1(ngrid,klev) 626 REAL sigma1(ngrid,klev) 628 627 REAL sigma2(ngrid,klev) 629 628 REAL qlth(ngrid,klev) 630 629 REAL qlenv(ngrid,klev) 631 630 REAL qltot(ngrid,klev) 632 REAL cth(ngrid,klev) 631 REAL cth(ngrid,klev) 633 632 REAL cenv(ngrid,klev) 634 633 REAL ctot(ngrid,klev) 635 REAL rneb(ngrid,klev) 634 REAL cth_vol(ngrid,klev) 635 REAL cenv_vol(ngrid,klev) 636 REAL ctot_vol(ngrid,klev) 637 REAL rneb(ngrid,klev) 636 638 REAL t(ngrid,klev) 637 639 REAL qsatmmussig1,qsatmmussig2,sqrt2pi,sqrt2,sqrtpi,pi … … 652 654 CALL cloudth_vert_v3(ngrid,klev,ind2, & 653 655 & ztv,po,zqta,fraca, & 654 & qcloud,ctot, zpspsk,paprs,ztla,zthl, &656 & qcloud,ctot,ctot_vol,zpspsk,paprs,ztla,zthl, & 655 657 & ratqs,zqs,t) 656 658 RETURN … … 672 674 cenv(:,:)=0. 673 675 ctot(:,:)=0. 676 cth_vol(:,:)=0. 677 cenv_vol(:,:)=0. 678 ctot_vol(:,:)=0. 674 679 qsatmmussig1=0. 675 680 qsatmmussig2=0. … … 747 752 cenv(ind1,ind2)=0.5*(1.+1.*erf(xenv)) !4.18 p 111, l.7 p115 & 4.20 p 119 thesis Arnaud Jam 748 753 ctot(ind1,ind2)=fraca(ind1,ind2)*cth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*cenv(ind1,ind2) 754 ctot_vol(ind1,ind2)=ctot(ind1,ind2) 749 755 750 756 qlth(ind1,ind2)=sigma2s*((exp(-1.*xth**2)/sqrt2pi)+xth*sqrt2*cth(ind1,ind2)) … … 780 786 xenv=senv/(sqrt2*sigma1s) 781 787 ctot(ind1,ind2)=0.5*(1.+1.*erf(xenv)) 788 ctot_vol(ind1,ind2)=ctot(ind1,ind2) 782 789 qltot(ind1,ind2)=sigma1s*((exp(-1.*xenv**2)/sqrt2pi)+xenv*sqrt2*cenv(ind1,ind2)) 783 790 … … 801 808 SUBROUTINE cloudth_vert_v3(ngrid,klev,ind2, & 802 809 & ztv,po,zqta,fraca, & 803 & qcloud,ctot, zpspsk,paprs,ztla,zthl, &810 & qcloud,ctot,ctot_vol,zpspsk,paprs,ztla,zthl, & 804 811 & ratqs,zqs,t) 805 812 … … 838 845 REAL zqsatenv(ngrid,klev) 839 846 840 847 848 849 841 850 REAL sigma1(ngrid,klev) 842 851 REAL sigma2(ngrid,klev) … … 844 853 REAL qlenv(ngrid,klev) 845 854 REAL qltot(ngrid,klev) 846 REAL cth(ngrid,klev) 855 REAL cth(ngrid,klev) 847 856 REAL cenv(ngrid,klev) 848 857 REAL ctot(ngrid,klev) 858 REAL cth_vol(ngrid,klev) 859 REAL cenv_vol(ngrid,klev) 860 REAL ctot_vol(ngrid,klev) 849 861 REAL rneb(ngrid,klev) 850 862 REAL t(ngrid,klev) … … 854 866 REAL sth,senv,sigma1s,sigma2s,xth,xenv,exp_xenv1,exp_xenv2,exp_xth1,exp_xth2 855 867 REAL xth1,xth2,xenv1,xenv2,deltasth, deltasenv 856 REAL IntJ,IntI1,IntI2,IntI3, coeffqlenv,coeffqlth868 REAL IntJ,IntI1,IntI2,IntI3,IntJ_CF,IntI1_CF,IntI3_CF,coeffqlenv,coeffqlth 857 869 REAL Tbef,zdelta,qsatbef,zcor 858 870 REAL qlbef … … 883 895 cenv(:,:)=0. 884 896 ctot(:,:)=0. 897 cth_vol(:,:)=0. 898 cenv_vol(:,:)=0. 899 ctot_vol(:,:)=0. 885 900 qsatmmussig1=0. 886 901 qsatmmussig2=0. … … 1032 1047 exp_xth2 = exp(-1.*xth2**2) 1033 1048 1049 !CF_surfacique 1034 1050 cth(ind1,ind2)=0.5*(1.-1.*erf(xth1)) 1035 1051 cenv(ind1,ind2)=0.5*(1.-1.*erf(xenv1)) 1036 ctot(ind1,ind2)=fraca(ind1,ind2)*cth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*cenv(ind1,ind2) 1037 1038 1052 ctot(ind1,ind2)=fraca(ind1,ind2)*cth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*cenv(ind1,ind2) 1053 1054 1055 !CF_volumique & eau condense 1039 1056 !environnement 1040 1057 IntJ=0.5*senv*(1-erf(xenv2))+(sigma1s/sqrt2pi)*exp_xenv2 1058 IntJ_CF=0.5*(1.-1.*erf(xenv2)) 1041 1059 if (deltasenv .lt. 1.e-10) then 1042 1060 qlenv(ind1,ind2)=IntJ 1061 cenv_vol(ind1,ind2)=IntJ_CF 1043 1062 else 1044 1063 IntI1=(((senv+deltasenv)**2+(sigma1s)**2)/(8*deltasenv))*(erf(xenv2)-erf(xenv1)) 1045 1064 IntI2=(sigma1s**2/(4*deltasenv*sqrtpi))*(xenv1*exp_xenv1-xenv2*exp_xenv2) 1046 1065 IntI3=((sqrt2*sigma1s*(senv+deltasenv))/(4*sqrtpi*deltasenv))*(exp_xenv1-exp_xenv2) 1066 IntI1_CF=((senv+deltasenv)*(erf(xenv2)-erf(xenv1)))/(4*deltasenv) 1067 IntI3_CF=(sqrt2*sigma1s*(exp_xenv1-exp_xenv2))/(4*sqrtpi*deltasenv) 1047 1068 qlenv(ind1,ind2)=IntJ+IntI1+IntI2+IntI3 1069 cenv_vol(ind1,ind2)=IntJ_CF+IntI1_CF+IntI3_CF 1048 1070 endif 1049 1050 1071 1051 1072 !thermique 1052 1073 IntJ=0.5*sth*(1-erf(xth2))+(sigma2s/sqrt2pi)*exp_xth2 1053 if (deltasth .lt. 1.e-10) then ! Seuil a choisir !!! 1074 IntJ_CF=0.5*(1.-1.*erf(xth2)) 1075 if (deltasth .lt. 1.e-10) then 1054 1076 qlth(ind1,ind2)=IntJ 1077 cth_vol(ind1,ind2)=IntJ_CF 1055 1078 else 1056 1079 IntI1=(((sth+deltasth)**2+(sigma2s)**2)/(8*deltasth))*(erf(xth2)-erf(xth1)) 1057 1080 IntI2=(sigma2s**2/(4*deltasth*sqrtpi))*(xth1*exp_xth1-xth2*exp_xth2) 1058 1081 IntI3=((sqrt2*sigma2s*(sth+deltasth))/(4*sqrtpi*deltasth))*(exp_xth1-exp_xth2) 1082 IntI1_CF=((sth+deltasth)*(erf(xth2)-erf(xth1)))/(4*deltasth) 1083 IntI3_CF=(sqrt2*sigma2s*(exp_xth1-exp_xth2))/(4*sqrtpi*deltasth) 1059 1084 qlth(ind1,ind2)=IntJ+IntI1+IntI2+IntI3 1085 cth_vol(ind1,ind2)=IntJ_CF+IntI1_CF+IntI3_CF 1060 1086 endif 1061 1087 1088 1062 1089 qltot(ind1,ind2)=fraca(ind1,ind2)*qlth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*qlenv(ind1,ind2) 1063 1090 ctot_vol(ind1,ind2)=fraca(ind1,ind2)*cth_vol(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*cenv_vol(ind1,ind2) 1064 1091 1065 1092 ENDIF ! of if (iflag_cloudth_vert==1 or 3 or 4) 1093 1066 1094 1067 1095 if (cenv(ind1,ind2).lt.1.e-10.or.cth(ind1,ind2).lt.1.e-10) then 1068 1096 ctot(ind1,ind2)=0. 1097 ctot_vol(ind1,ind2)=0. 1069 1098 qcloud(ind1)=zqsatenv(ind1,ind2) 1070 1099 … … 1100 1129 xenv=senv/(sqrt2*sigma1s) 1101 1130 ctot(ind1,ind2)=0.5*(1.+1.*erf(xenv)) 1131 ctot_vol(ind1,ind2)=ctot(ind1,ind2) 1102 1132 qltot(ind1,ind2)=sigma1s*((exp(-1.*xenv**2)/sqrt2pi)+xenv*sqrt2*cenv(ind1,ind2)) 1103 1133
Note: See TracChangeset
for help on using the changeset viewer.