Changeset 1689 for LMDZ5/trunk/libf/phylmd
- Timestamp:
- Dec 6, 2012, 4:57:07 PM (12 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 1 added
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/physiq.F
r1670 r1689 178 178 save iflag_ratqs 179 179 c$OMP THREADPRIVATE(iflag_ratqs) 180 real facteur ,zfratqs1,zfratqs2180 real facteur 181 181 182 182 REAL zz,znum,zden … … 958 958 REAL snow_lsc(klon) 959 959 c 960 REAL ratqs s(klon,klev),ratqsc(klon,klev)960 REAL ratqsc(klon,klev) 961 961 real ratqsbas,ratqshaut,tau_ratqs 962 962 save ratqsbas,ratqshaut,tau_ratqs … … 2817 2817 2818 2818 c------------------------------------------------------------------------- 2819 c Caclul des ratqs 2820 c------------------------------------------------------------------------- 2821 2822 c print*,'calcul des ratqs' 2823 c ratqs convectifs a l'ancienne en fonction de q(z=0)-q / q 2824 c ---------------- 2825 c on ecrase le tableau ratqsc calcule par clouds_gno 2826 if (iflag_cldcon.eq.1) then 2827 do k=1,klev 2828 do i=1,klon 2829 if(ptconv(i,k)) then 2830 ratqsc(i,k)=ratqsbas 2831 s +fact_cldcon*(q_seri(i,1)-q_seri(i,k))/q_seri(i,k) 2832 else 2833 ratqsc(i,k)=0. 2834 endif 2835 enddo 2836 enddo 2837 2838 c----------------------------------------------------------------------- 2839 c par nversion de la fonction log normale 2840 c----------------------------------------------------------------------- 2841 else if (iflag_cldcon.eq.4) then 2842 ptconvth(:,:)=.false. 2843 ratqsc(:,:)=0. 2844 if(prt_level.ge.9) print*,'avant clouds_gno thermique' 2845 call clouds_gno 2846 s (klon,klev,q_seri,zqsat,clwcon0th,ptconvth,ratqsc,rnebcon0th) 2847 if(prt_level.ge.9) print*,' CLOUDS_GNO OK' 2848 2849 endif 2850 2851 c ratqs stables 2852 c ------------- 2853 2854 if (iflag_ratqs.eq.0) then 2855 2856 ! Le cas iflag_ratqs=0 correspond a la version IPCC 2005 du modele. 2857 do k=1,klev 2858 do i=1, klon 2859 ratqss(i,k)=ratqsbas+(ratqshaut-ratqsbas)* 2860 s min((paprs(i,1)-pplay(i,k))/(paprs(i,1)-30000.),1.) 2861 enddo 2862 enddo 2863 2864 ! Pour iflag_ratqs=1 ou 2, le ratqs est constant au dessus de 2865 ! 300 hPa (ratqshaut), varie lineariement en fonction de la pression 2866 ! entre 600 et 300 hPa et est soit constant (ratqsbas) pour iflag_ratqs=1 2867 ! soit lineaire (entre 0 a la surface et ratqsbas) pour iflag_ratqs=2 2868 ! Il s'agit de differents tests dans la phase de reglage du modele 2869 ! avec thermiques. 2870 2871 else if (iflag_ratqs.eq.1) then 2872 2873 do k=1,klev 2874 do i=1, klon 2875 if (pplay(i,k).ge.60000.) then 2876 ratqss(i,k)=ratqsbas 2877 else if ((pplay(i,k).ge.30000.).and. 2878 s (pplay(i,k).lt.60000.)) then 2879 ratqss(i,k)=ratqsbas+(ratqshaut-ratqsbas)* 2880 s (60000.-pplay(i,k))/(60000.-30000.) 2881 else 2882 ratqss(i,k)=ratqshaut 2883 endif 2884 enddo 2885 enddo 2886 2887 else if (iflag_ratqs.eq.2) then 2888 2889 do k=1,klev 2890 do i=1, klon 2891 if (pplay(i,k).ge.60000.) then 2892 ratqss(i,k)=ratqsbas 2893 s *(paprs(i,1)-pplay(i,k))/(paprs(i,1)-60000.) 2894 else if ((pplay(i,k).ge.30000.).and. 2895 s (pplay(i,k).lt.60000.)) then 2896 ratqss(i,k)=ratqsbas+(ratqshaut-ratqsbas)* 2897 s (60000.-pplay(i,k))/(60000.-30000.) 2898 else 2899 ratqss(i,k)=ratqshaut 2900 endif 2901 enddo 2902 enddo 2903 2904 else if (iflag_ratqs==3) then 2905 do k=1,klev 2906 ratqss(:,k)=ratqsbas+(ratqshaut-ratqsbas) 2907 s *min( ((paprs(:,1)-pplay(:,k))/70000.)**2 , 1. ) 2908 enddo 2909 2910 else if (iflag_ratqs==4) then 2911 do k=1,klev 2912 ratqss(:,k)=ratqsbas+0.5*(ratqshaut-ratqsbas) 2913 s *( tanh( (50000.-pplay(:,k))/20000.) + 1.) 2914 enddo 2915 2916 endif 2917 2918 2919 2920 2921 c ratqs final 2922 c ----------- 2923 2924 if (iflag_cldcon.eq.1 .or.iflag_cldcon.eq.2 2925 s .or.iflag_cldcon.eq.4) then 2926 2927 ! On ajoute une constante au ratqsc*2 pour tenir compte de 2928 ! fluctuations turbulentes de petite echelle 2929 2930 do k=1,klev 2931 do i=1,klon 2932 if ((fm_therm(i,k).gt.1.e-10)) then 2933 ratqsc(i,k)=sqrt(ratqsc(i,k)**2+0.05**2) 2934 endif 2935 enddo 2936 enddo 2937 2938 ! les ratqs sont une combinaison de ratqss et ratqsc 2939 if(prt_level.ge.9) 2940 $ write(lunout,*)'PHYLMD NOUVEAU TAU_RATQS ',tau_ratqs 2941 2942 if (tau_ratqs>1.e-10) then 2943 facteur=exp(-pdtphys/tau_ratqs) 2944 else 2945 facteur=0. 2946 endif 2947 ratqs(:,:)=ratqsc(:,:)*(1.-facteur)+ratqs(:,:)*facteur 2948 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2949 ! FH 22/09/2009 2950 ! La ligne ci-dessous faisait osciller le modele et donnait une solution 2951 ! assymptotique bidon et dépendant fortement du pas de temps. 2952 ! ratqs(:,:)=sqrt(ratqs(:,:)**2+ratqss(:,:)**2) 2953 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2954 ratqs(:,:)=max(ratqs(:,:),ratqss(:,:)) 2955 else if (iflag_cldcon<=6) then 2956 ! on ne prend que le ratqs stable pour fisrtilp 2957 ratqs(:,:)=ratqss(:,:) 2958 else 2959 zfratqs1=exp(-pdtphys/10800.) 2960 zfratqs2=exp(-pdtphys/10800.) 2961 ! print*,'RAPPEL RATQS 1 ',zfratqs1,zfratqs2 2962 ! s ,ratqss(1,14),ratqs(1,14),ratqsc(1,14) 2963 do k=1,klev 2964 do i=1,klon 2965 if (ratqsc(i,k).gt.1.e-10) then 2966 ratqs(i,k)=ratqs(i,k)*zfratqs2 2967 s +(iflag_cldcon/100.)*ratqsc(i,k)*(1.-zfratqs2) 2968 endif 2969 ratqs(i,k)=min(ratqs(i,k)*zfratqs1 2970 s +ratqss(i,k)*(1.-zfratqs1),0.5) 2971 enddo 2972 enddo 2973 endif 2819 ! Computation of ratqs, the width (normalized) of the subrid scale 2820 ! water distribution 2821 CALL calcratqs(klon,klev,prt_level,lunout, 2822 s iflag_ratqs,iflag_con,iflag_cldcon,pdtphys, 2823 s ratqsbas,ratqshaut,tau_ratqs,fact_cldcon, 2824 s ptconv,ptconvth,clwcon0th, rnebcon0th, 2825 s paprs,pplay,q_seri,zqsat,fm_therm, 2826 s ratqs,ratqsc) 2974 2827 2975 2828
Note: See TracChangeset
for help on using the changeset viewer.