Changeset 5489 for LMDZ6/branches/contrails/libf/phylmd/physiq_mod.F90
- Timestamp:
- Jan 17, 2025, 6:16:25 PM (13 days ago)
- Location:
- LMDZ6/branches/contrails
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/contrails
- Property svn:mergeinfo changed
/LMDZ6/trunk merged: 5451,5458,5460,5463,5468-5487
- Property svn:mergeinfo changed
-
LMDZ6/branches/contrails/libf/phylmd/physiq_mod.F90
r5488 r5489 39 39 USE ioipsl_getin_p_mod, ONLY : getin_p 40 40 USE indice_sol_mod 41 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac, addPhase 41 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac, addPhase, ivap, iliq, isol, ibs, icf, irvc, ircont 42 42 USE strings_mod, ONLY: strIdx 43 43 USE iophy … … 78 78 USE lmdz_lscp, ONLY : lscp 79 79 USE lmdz_call_cloud_optics_prop, ONLY : call_cloud_optics_prop 80 USE lmdz_lscp_old, ONLY : fisrtilp 80 USE lmdz_lscp_old, ONLY : fisrtilp, fisrtilp_first 81 81 USE lmdz_call_blowing_snow, ONLY : call_blowing_snow_sublim_sedim 82 82 USE lmdz_wake_ini, ONLY : wake_ini … … 248 248 cldh, cldl,cldm, cldq, cldt, & 249 249 JrNt, & 250 dthmin, evap, snowerosion, fder, plcl, plfc, &250 dthmin, evap, snowerosion, icesub_lic, fder, plcl, plfc, & 251 251 prw, prlw, prsw, prbsw, water_budget, & 252 252 s_lcl, s_pblh, s_pblt, s_therm, & … … 376 376 USE phys_output_write_spl_mod, ONLY: phys_output_write_spl 377 377 USE phytracr_spl_mod, ONLY: phytracr_spl_out_init, phytracr_spl 378 USE s2s, ONLY : s2s_initialize 378 379 IMPLICIT NONE 379 380 !>====================================================================== … … 512 513 !====================================================================== 513 514 ! 514 ! indices de traceurs eau vapeur, liquide, glace, fraction nuageuse LS (optional), blowing snow (optional)515 INTEGER,SAVE :: ivap, iliq, isol, ibs, icf, irvc, ircont516 !$OMP THREADPRIVATE(ivap, iliq, isol, ibs, icf, irvc, ircont)517 !518 515 ! 519 516 ! Variables argument: … … 1021 1018 1022 1019 REAL picefra(klon,klev) 1023 REAL zrel_oro(klon)1020 REAL nm_oro(klon) 1024 1021 !IM cf. AM 081204 END 1025 1022 ! … … 1096 1093 CHARACTER*80 abort_message 1097 1094 LOGICAL, SAVE :: ok_sync, ok_sync_omp 1098 !$OMP THREADPRIVATE(ok_sync )1095 !$OMP THREADPRIVATE(ok_sync,ok_sync_omp) 1099 1096 REAL date0 1100 1097 … … 1106 1103 REAL ztsol(klon) 1107 1104 REAL q2m(klon,nbsrf) ! humidite a 2m 1108 REAL fsnowerosion(klon,nbsrf) ! blowing snow flux at surface1109 1105 REAL qbsfra ! blowing snow fraction 1110 1106 !IM: t2m, q2m, ustar, u10m, v10m et t2mincels, t2maxcels … … 1270 1266 ! Subgrid scale wind : 1271 1267 ! Need to be allocatable/save because the number of bin is not known (provided by surf_wind_ini) 1272 integer, save :: ns rfwnd=11268 integer, save :: nsurfwind=1 1273 1269 real, dimension(:,:), allocatable, save :: surf_wind_value, surf_wind_proba ! module and probability of sugrdi wind wind sample 1274 !$OMP THREADPRIVATE(ns rfwnd,surf_wind_value, surf_wind_proba)1270 !$OMP THREADPRIVATE(nsurfwind,surf_wind_value, surf_wind_proba) 1275 1271 1276 1272 … … 1352 1348 1353 1349 IF (first) THEN 1354 ivap = strIdx(tracers(:)%name, addPhase('H2O', 'g')) 1355 iliq = strIdx(tracers(:)%name, addPhase('H2O', 'l')) 1356 isol = strIdx(tracers(:)%name, addPhase('H2O', 's')) 1357 ibs = strIdx(tracers(:)%name, addPhase('H2O', 'b')) 1358 icf = strIdx(tracers(:)%name, addPhase('H2O', 'f')) 1359 irvc = strIdx(tracers(:)%name, addPhase('H2O', 'c')) 1360 ircont = strIdx(tracers(:)%name, addPhase('H2O', 'a')) 1350 1351 CALL s2s_initialize ! initialization of source to source tools 1352 1361 1353 ! CALL init_etat0_limit_unstruct 1362 1354 ! IF (.NOT. create_etat0_limit) CALL init_limit_read(days_elapsed) … … 1841 1833 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1842 1834 CALL surf_wind_ini(klon,lunout) 1843 CALL getin_p('ns rfwnd',nsrfwnd)1844 allocate(surf_wind_value(klon,ns rfwnd),surf_wind_proba(klon,nsrfwnd))1835 CALL getin_p('nsurfwind',nsurfwind) 1836 allocate(surf_wind_value(klon,nsurfwind),surf_wind_proba(klon,nsurfwind)) 1845 1837 1846 1838 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1839 CALL iophys_ini(pdtphys,nsurfwind) ! replay automatic include ! replay automatic include 1847 1840 CALL wake_ini(rg,rd,rv,prt_level) 1848 1841 CALL yamada_ini(klon,lunout,prt_level) … … 2917 2910 cdragh, cdragm, u1, v1, & 2918 2911 beta_aridity, & 2919 !albedo SB >>> 2920 ! albsol1, albsol2, sens, evap, & 2921 albsol_dir, albsol_dif, sens, evap, snowerosion, & 2922 !albedo SB <<< 2912 albsol_dir, albsol_dif, sens, evap, snowerosion, icesub_lic, & 2923 2913 albsol3_lic,runoff, snowhgt, qsnow, to_ice, sissnow, & 2924 2914 zxtsol, zxfluxlat, zt2m, qsat2m, zn2mout, & … … 3736 3726 ! poches, la tendance moyenne associ\'ee doit etre 3737 3727 ! multipliee par la fraction surfacique qu'ils couvrent. 3728 IF (mod(iflag_pbl_split/10,10) == 1) THEN 3729 ! On tient compte du splitting pour modifier les profils deltatq/T des poches 3730 DO k=1,klev 3731 DO i=1,klon 3732 d_deltat_the(i,k) = - d_t_ajs(i,k) 3733 d_deltaq_the(i,k) = - d_q_ajs(i,k) 3734 ENDDO 3735 ENDDO 3736 ELSE 3737 d_deltat_the(:,:) = 0. 3738 d_deltaq_the(:,:) = 0. 3739 ENDIF 3740 3738 3741 DO k=1,klev 3739 3742 DO i=1,klon 3740 !3741 d_deltat_the(i,k) = - d_t_ajs(i,k)3742 d_deltaq_the(i,k) = - d_q_ajs(i,k)3743 !3744 3743 d_u_ajs(i,k) = d_u_ajs(i,k)*(1.-wake_s(i)) 3745 3744 d_v_ajs(i,k) = d_v_ajs(i,k)*(1.-wake_s(i)) 3746 3745 d_t_ajs(i,k) = d_t_ajs(i,k)*(1.-wake_s(i)) 3747 3746 d_q_ajs(i,k) = d_q_ajs(i,k)*(1.-wake_s(i)) 3748 !3749 3747 ENDDO 3750 3748 ENDDO … … 3837 3835 !=================================================================== 3838 3836 ! Computation of subrgid scale near-surface wind distribution 3839 call surf_wind(klon,ns rfwnd,u10m,v10m,wake_s,wake_Cstar,ustar,wstar,surf_wind_value,surf_wind_proba)3837 call surf_wind(klon,nsurfwind,u10m,v10m,wake_s,wake_Cstar,ustar,wstar,surf_wind_value,surf_wind_proba) 3840 3838 3841 3839 !=================================================================== … … 3924 3922 3925 3923 ELSE 3926 3924 3925 CALL fisrtilp_first(klon, klev, phys_tstep, pfrac_impa, pfrac_nucl, pfrac_1nucl) 3927 3926 CALL fisrtilp(klon,klev,phys_tstep,paprs,pplay, & 3928 3927 t_seri, q_seri,ptconv,ratqs,sigma_qtherm, & … … 4859 4858 ! a l'echelle sous-maille: 4860 4859 ! 4860 4861 ! calculation of nm_oro 4862 DO i=1,klon 4863 ! nm_oro is a proxy for the number of subgrid scale mountains 4864 ! -> condition on nm_oro can deactivate the lifting on tilted planar terrains 4865 ! such as ice sheets (work by V. Wiener) 4866 ! in such a case, the SSO scheme should activate only where nm_oro>0 i.e. by setting 4867 ! nm_oro_t=0. 4868 nm_oro(i)=zsig(i)*sqrt(cell_area(i)*(pctsrf(i,is_ter)+pctsrf(i,is_lic)))/(4.*MAX(zstd(i),1.e-8))-1. 4869 ENDDO 4870 4861 4871 IF (prt_level .GE.10) THEN 4862 4872 print *,' call orography ? ', ok_orodr … … 4869 4879 DO i=1,klon 4870 4880 itest(i)=0 4871 zrel_oro(i)=zstd(i)/(max(zsig(i),1.E-8)*sqrt(cell_area(i)))4872 !zrel_oro: relative mountain height wrt relief explained by mean slope4873 ! -> condition on zrel_oro can deactivate the drag on tilted planar terrains4874 ! such as ice sheets (work by V. Wiener)4875 4881 ! zpmm_orodr_t and zstd_orodr_t are activation thresholds set by F. Lott to 4876 4882 ! earn computation time but they are not physical. 4877 IF (((zpic(i)-zmea(i)).GT.zpmm_orodr_t).AND.(zstd(i).GT.zstd_orodr_t).AND.( zrel_oro(i).LE.zrel_oro_t)) THEN4883 IF (((zpic(i)-zmea(i)).GT.zpmm_orodr_t).AND.(zstd(i).GT.zstd_orodr_t).AND.(nm_oro(i).GT.nm_oro_t)) THEN 4878 4884 itest(i)=1 4879 4885 igwd=igwd+1 … … 4924 4930 DO i=1,klon 4925 4931 itest(i)=0 4926 !zrel_oro: relative mountain height wrt relief explained by mean slope 4927 ! -> condition on zrel_oro can deactivate the lifting on tilted planar terrains 4928 ! such as ice sheets (work by V. Wiener) 4929 zrel_oro(i)=zstd(i)/(max(zsig(i),1.E-8)*sqrt(cell_area(i))) 4930 IF (((zpic(i)-zmea(i)).GT.zpmm_orolf_t).AND.(zrel_oro(i).LE.zrel_oro_t)) THEN 4932 IF (((zpic(i)-zmea(i)).GT.zpmm_orolf_t).AND.(nm_oro(i).GT.nm_oro_t)) THEN 4931 4933 itest(i)=1 4932 4934 igwd=igwd+1 … … 5169 5171 ! car on peut s'attendre a ce que les petites echelles produisent aussi de la TKE 5170 5172 ! Mais attention, cela ne va pas dans le sens de la conservation de l'energie! 5171 IF ((zstd(i).GT.1.0) .AND.( zrel_oro(i).LE.zrel_oro_t)) THEN5173 IF ((zstd(i).GT.1.0) .AND.(nm_oro(i).GT.nm_oro_t)) THEN 5172 5174 itest(i)=1 5173 5175 igwd=igwd+1 … … 5181 5183 DO i=1,klon 5182 5184 itest(i)=0 5183 IF (((zpic(i)-zmea(i)).GT.zpmm_orodr_t).AND.(zstd(i).GT.zstd_orodr_t).AND.( zrel_oro(i).LE.zrel_oro_t)) THEN5185 IF (((zpic(i)-zmea(i)).GT.zpmm_orodr_t).AND.(zstd(i).GT.zstd_orodr_t).AND.(nm_oro(i).GT.nm_oro_t)) THEN 5184 5186 itest(i)=1 5185 5187 igwd=igwd+1
Note: See TracChangeset
for help on using the changeset viewer.