Changeset 5202 for LMDZ6/branches/cirrus/libf/phylmd/physiq_mod.F90
- Timestamp:
- Sep 20, 2024, 12:32:04 PM (7 weeks ago)
- Location:
- LMDZ6/branches/cirrus
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/cirrus
- Property svn:mergeinfo changed
-
LMDZ6/branches/cirrus/libf/phylmd/physiq_mod.F90
r4951 r5202 1 ! 1 2 2 ! $Id$ 3 3 ! … … 184 184 d_ts, & 185 185 ! 186 d_t_bs ,d_q_bs,d_qbs_bs, &186 d_t_bsss,d_q_bsss,d_qbs_bsss, & 187 187 ! 188 188 ! d_t_oli,d_u_oli,d_v_oli, & … … 333 333 ! 334 334 rneblsvol, & 335 pfraclr, pfracld,&336 distcltop, temp_cltop,&335 pfraclr, pfracld, cldfraliq, sigma2_icefracturb, mean_icefracturb, & 336 distcltop, temp_cltop, & 337 337 !-- LSCP - condensation and ice supersaturation variables 338 338 qsub, qissr, qcld, subfra, issrfra, gamma_cond, ratio_qi_qtot, & … … 909 909 REAL zdtime, zdtime1, zdtime2, zlongi 910 910 ! 911 REAL qcheck912 911 REAL z_avant(klon), z_apres(klon), z_factor(klon) 913 912 LOGICAL zx_ajustq … … 1133 1132 REAL, DIMENSION(klon,klev) :: mass_solu_aero_pi 1134 1133 ! - " - (pre-industrial value) 1134 REAL, DIMENSION(klon,klev,naero_tot) :: m_allaer 1135 1135 1136 1136 ! Parameters … … 1271 1271 1272 1272 !--OB variables for mass fixer (hard coded for now) 1273 LOGICAL, PARAMETER :: mass_fixer=.FALSE.1274 1273 REAL qql1(klon),qql2(klon),corrqql 1275 1274 … … 1401 1400 IF (read_climoz>=1 .AND. create_etat0_limit .AND. grid_type==unstructured) & 1402 1401 CALL regr_horiz_time_climoz(read_climoz,ok_daily_climoz) 1403 1404 #ifdef REPROBUS1405 CALL strataer_init1406 CALL strataer_emiss_init1407 #endif1408 1409 #ifdef CPP_StratAer1410 CALL strataer_init1411 CALL strataer_nuc_init1412 CALL strataer_emiss_init1413 #endif1414 1402 1415 1403 print*, '=================================================' … … 1527 1515 iflag_phytrac = 1 ! by default we do want to call phytrac 1528 1516 CALL getin_p('iflag_phytrac',iflag_phytrac) 1517 1518 ok_water_mass_fixer=.FALSE. ! OB: by default we do not apply the mass fixer 1519 CALL getin_p('ok_water_mass_fixer',ok_water_mass_fixer) 1529 1520 #ifdef CPP_Dust 1530 1521 IF (iflag_phytrac.EQ.0) THEN … … 1551 1542 WRITE(lunout,*) 'fl_cor_ebil=', fl_cor_ebil 1552 1543 WRITE(lunout,*) 'iflag_phytrac=', iflag_phytrac 1544 WRITE(lunout,*) 'ok_water_mass_fixer=',ok_water_mass_fixer 1553 1545 WRITE(lunout,*) 'NVM=', nvm_lmdz 1554 1546 … … 1802 1794 IF (.NOT. create_etat0_limit) CALL init_readaerosolstrato(flag_aerosol_strat) !! initialise aero strato from file for XIOS interpolation (unstructured_grid) 1803 1795 1796 ! A.I : Initialisations pour le 1er passage a Cosp 1804 1797 if (ok_cosp) then 1798 1805 1799 #ifdef CPP_COSP 1806 ! A.I : Initialisations pour le 1er passage a Cosp1807 1800 CALL ini_COSP(ref_liq_cosp0,ref_ice_cosp0,pctsrf_cosp0,zu10m_cosp0,zv10m_cosp0, & 1808 1801 zxtsol_cosp0,zx_rh_cosp0,cldfra_cosp0,rnebcon_cosp0,flwc_cosp0, & … … 1824 1817 #endif 1825 1818 1826 #ifdef CPP_COSP 21827 CALL ini_COSP(ref_liq_cosp0,ref_ice_cosp0,pctsrf_cosp0,zu10m_cosp0,zv10m_cosp0, &1819 #ifdef CPP_COSPV2 1820 CALL ini_COSP(ref_liq_cosp0,ref_ice_cosp0,pctsrf_cosp0,zu10m_cosp0,zv10m_cosp0, & 1828 1821 zxtsol_cosp0,zx_rh_cosp0,cldfra_cosp0,rnebcon_cosp0,flwc_cosp0, & 1829 1822 fiwc_cosp0,prfl_cosp0,psfl_cosp0,pmflxr_cosp0,pmflxs_cosp0, & 1830 1823 mr_ozone_cosp0,cldtau_cosp0,cldemi_cosp0,JrNt_cosp0) 1831 1832 CALL phys_cosp2(itap,phys_tstep,freq_cosp, & 1833 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, & 1834 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, missing_val, & 1835 klon,klev,longitude_deg,latitude_deg,presnivs,overlap, & 1836 JrNt,ref_liq,ref_ice, & 1837 pctsrf(:,is_ter)+pctsrf(:,is_lic), & 1838 zu10m,zv10m,pphis, & 1839 zphi,paprs(:,1:klev),pplay,zxtsol,t_seri, & 1840 qx(:,:,ivap),zx_rh,cldfra,rnebcon,flwc,fiwc, & 1841 prfl(:,1:klev),psfl(:,1:klev), & 1842 pmflxr(:,1:klev),pmflxs(:,1:klev), & 1843 mr_ozone,cldtau, cldemi) 1844 #endif 1845 1846 #ifdef CPP_COSPV2 1824 1847 1825 CALL lmdz_cosp_interface(itap,phys_tstep,freq_cosp, & 1848 1826 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, & 1849 1827 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, missing_val, & 1850 1828 klon,klev,longitude_deg,latitude_deg,presnivs,overlap, & 1851 JrNt ,ref_liq,ref_ice, &1852 pctsrf (:,is_ter)+pctsrf(:,is_lic), &1853 zu10m ,zv10m,pphis, &1854 p hicosp,paprs(:,1:klev),pplay,zxtsol,t_seri, &1855 qx(:,:,ivap),zx_rh ,cldfra,rnebcon,flwc,fiwc, &1856 prfl (:,1:klev),psfl(:,1:klev), &1857 pmflxr (:,1:klev),pmflxs(:,1:klev), &1858 mr_ozone ,cldtau, cldemi)1829 JrNt_cosp0,ref_liq_cosp0,ref_ice_cosp0, & 1830 pctsrf_cosp0, & 1831 zu10m_cosp0,zv10m_cosp0,pphis, & 1832 pphi,paprs(:,1:klev),pplay,zxtsol_cosp0,t, & 1833 qx(:,:,ivap),zx_rh_cosp0,cldfra_cosp0,rnebcon_cosp0,flwc_cosp0,fiwc_cosp0, & 1834 prfl_cosp0(:,1:klev),psfl_cosp0(:,1:klev), & 1835 pmflxr_cosp0(:,1:klev),pmflxs_cosp0(:,1:klev), & 1836 mr_ozone_cosp0,cldtau_cosp0, cldemi_cosp0) 1859 1837 #endif 1860 ENDIF1838 endif ! ok_cosp 1861 1839 1862 1840 ! … … 1908 1886 ! 1909 1887 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1888 #ifdef REPROBUS 1889 CALL strataer_init 1890 CALL strataer_emiss_init 1891 #endif 1892 1893 #ifdef CPP_StratAer 1894 CALL strataer_init 1895 CALL strataer_nuc_init 1896 CALL strataer_emiss_init 1897 #endif 1910 1898 1911 1899 #ifdef CPP_Dust … … 1948 1936 ELSE IF (klon_glo==1) THEN 1949 1937 pbl_tke(:,:,is_ave) = 0. 1938 pbl_eps(:,:,is_ave) = 0. 1950 1939 DO nsrf=1,nbsrf 1951 1940 DO k = 1,klev+1 1952 1941 pbl_tke(:,k,is_ave) = pbl_tke(:,k,is_ave) & 1953 1942 +pctsrf(:,nsrf)*pbl_tke(:,k,nsrf) 1943 pbl_eps(:,k,is_ave) = pbl_eps(:,k,is_ave) & 1944 +pctsrf(:,nsrf)*pbl_eps(:,k,nsrf) 1954 1945 ENDDO 1955 1946 ENDDO … … 1957 1948 pbl_tke(:,:,is_ave) = 0. !ym missing init : maybe must be initialized in the same way that for klon_glo==1 ?? 1958 1949 !>jyg 1950 pbl_eps(:,:,is_ave) = 0. 1959 1951 ENDIF 1960 1952 !IM begin … … 2470 2462 ENDDO 2471 2463 ! 2472 !--OB mass fixer2473 IF ( mass_fixer) THEN2464 !--OB water mass fixer 2465 IF (ok_water_mass_fixer) THEN 2474 2466 !--store initial water burden 2475 2467 qql1(:)=0.0 … … 3024 3016 ! Blowing snow sublimation and sedimentation 3025 3017 3026 d_t_bs (:,:)=0.3027 d_q_bs (:,:)=0.3028 d_qbs_bs (:,:)=0.3018 d_t_bsss(:,:)=0. 3019 d_q_bsss(:,:)=0. 3020 d_qbs_bsss(:,:)=0. 3029 3021 bsfl(:,:)=0. 3030 3022 bs_fall(:)=0. … … 3032 3024 3033 3025 CALL call_blowing_snow_sublim_sedim(klon,klev,phys_tstep,t_seri,q_seri,qbs_seri,pplay,paprs, & 3034 d_t_bs ,d_q_bs,d_qbs_bs,bsfl,bs_fall)3026 d_t_bsss,d_q_bsss,d_qbs_bsss,bsfl,bs_fall) 3035 3027 3036 3028 CALL add_phys_tend & 3037 (du0,dv0,d_t_bs ,d_q_bs,dql0,dqi0,d_qbs_bs,paprs,&3038 'bs ',abortphy,flag_inhib_tend,itap,0)3029 (du0,dv0,d_t_bsss,d_q_bsss,dql0,dqi0,d_qbs_bsss,paprs,& 3030 'bsss',abortphy,flag_inhib_tend,itap,0) 3039 3031 3040 3032 ENDIF … … 3079 3071 ENDDO 3080 3072 ENDDO 3081 IF (check) THEN3082 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area)3083 WRITE(lunout,*) "avantcon=", za3084 ENDIF3085 zx_ajustq = .FALSE.3086 IF (iflag_con.EQ.2) zx_ajustq=.TRUE.3087 IF (zx_ajustq) THEN3088 DO i = 1, klon3089 z_avant(i) = 0.03090 ENDDO3091 DO k = 1, klev3092 DO i = 1, klon3093 z_avant(i) = z_avant(i) + (q_seri(i,k)+ql_seri(i,k)) &3094 *(paprs(i,k)-paprs(i,k+1))/RG3095 ENDDO3096 ENDDO3097 ENDIF3098 3073 3099 3074 ! Calcule de vitesse verticale a partir de flux de masse verticale … … 3488 3463 CALL writefield_phy('q_seri',q_seri,nbp_lev) 3489 3464 ENDIF 3490 3491 IF (check) THEN3492 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area)3493 WRITE(lunout,*)"aprescon=", za3494 zx_t = 0.03495 za = 0.03496 DO i = 1, klon3497 za = za + cell_area(i)/REAL(klon)3498 zx_t = zx_t + (rain_con(i)+ &3499 snow_con(i))*cell_area(i)/REAL(klon)3500 ENDDO3501 zx_t = zx_t/za*phys_tstep3502 WRITE(lunout,*)"Precip=", zx_t3503 ENDIF3504 IF (zx_ajustq) THEN3505 DO i = 1, klon3506 z_apres(i) = 0.03507 ENDDO3508 DO k = 1, klev3509 DO i = 1, klon3510 z_apres(i) = z_apres(i) + (q_seri(i,k)+ql_seri(i,k)) &3511 *(paprs(i,k)-paprs(i,k+1))/RG3512 ENDDO3513 ENDDO3514 DO i = 1, klon3515 z_factor(i) = (z_avant(i)-(rain_con(i)+snow_con(i))*phys_tstep) &3516 /z_apres(i)3517 ENDDO3518 DO k = 1, klev3519 DO i = 1, klon3520 IF (z_factor(i).GT.(1.0+1.0E-08) .OR. &3521 z_factor(i).LT.(1.0-1.0E-08)) THEN3522 q_seri(i,k) = q_seri(i,k) * z_factor(i)3523 ENDIF3524 ENDDO3525 ENDDO3526 ENDIF3527 zx_ajustq=.FALSE.3528 3465 3529 3466 ! … … 3921 3858 3922 3859 CALL lscp(klon,klev,phys_tstep,missing_val,paprs,pplay, & 3923 t_seri, q_seri, ptconv,ratqs, &3860 t_seri, q_seri,qs_ancien,ptconv,ratqs, & 3924 3861 d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, & 3925 pfraclr, pfracld,&3862 pfraclr, pfracld, cldfraliq, sigma2_icefracturb, mean_icefracturb, & 3926 3863 radocond, picefra, rain_lsc, snow_lsc, & 3927 3864 frac_impa, frac_nucl, beta_prec_fisrt, & 3928 3865 prfl, psfl, rhcl, & 3929 3866 zqasc, fraca,ztv,zpspsk,ztla,zthl,iflag_cld_th, & 3930 iflag_ice_thermo, distcltop, temp_cltop, cell_area, & 3931 cf_seri, rvc_seri, u_seri, v_seri, pbl_eps(:,:,is_ave), & 3867 iflag_ice_thermo, distcltop, temp_cltop, & 3868 pbl_tke(:,:,is_ave), pbl_eps(:,:,is_ave), & 3869 cell_area, & 3870 cf_seri, rvc_seri, u_seri, v_seri, & 3932 3871 qsub, qissr, qcld, subfra, issrfra, gamma_cond, ratio_qi_qtot, & 3933 3872 dcf_sub, dcf_con, dcf_mix, dqi_adj, dqi_sub, dqi_con, dqi_mix, & … … 4021 3960 ENDIF 4022 3961 4023 ENDIF4024 4025 IF (check) THEN4026 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area)4027 WRITE(lunout,*)"apresilp=", za4028 zx_t = 0.04029 za = 0.04030 DO i = 1, klon4031 za = za + cell_area(i)/REAL(klon)4032 zx_t = zx_t + (rain_lsc(i) &4033 + snow_lsc(i))*cell_area(i)/REAL(klon)4034 ENDDO4035 zx_t = zx_t/za*phys_tstep4036 WRITE(lunout,*)"Precip=", zx_t4037 3962 ENDIF 4038 3963 … … 4405 4330 flag_aerosol, flag_bc_internal_mixture, itap, jD_cur-jD_ref, & 4406 4331 pdtphys, pplay, paprs, t_seri, rhcl, presnivs, & 4407 tr_seri, mass_solu_aero, mass_solu_aero_pi )4332 tr_seri, mass_solu_aero, mass_solu_aero_pi, m_allaer) 4408 4333 #else 4409 4334 abort_message='You should compile with -rad ecrad if running with iflag_rrtm=2' … … 4651 4576 ! Rajoute par OB pour RRTM 4652 4577 tau_aero_lw_rrtm, & 4653 cldtaupirad, &4578 cldtaupirad, m_allaer, & 4654 4579 ! zqsat, flwcrad, fiwcrad, & 4655 4580 zqsat, flwc, fiwc, & … … 4729 4654 ! Rajoute par OB pour RRTM 4730 4655 tau_aero_lw_rrtm, & 4731 cldtaupi, &4656 cldtaupi, m_allaer, & 4732 4657 ! zqsat, flwcrad, fiwcrad, & 4733 4658 zqsat, flwc, fiwc, & … … 4775 4700 tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, & 4776 4701 tau_aero_lw_rrtm, & 4777 cldtaupi, &4702 cldtaupi, m_allaer, & 4778 4703 zqsat, flwc, fiwc, & 4779 4704 ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, & … … 5508 5433 !--currently flag is turned off 5509 5434 !================================================================== 5510 IF ( mass_fixer) THEN5435 IF (ok_water_mass_fixer) THEN 5511 5436 qql2(:)=0.0 5512 5437 DO k = 1, klev
Note: See TracChangeset
for help on using the changeset viewer.