Changeset 5791 for LMDZ6/branches/contrails/libf/phylmd/physiq_mod.F90
- Timestamp:
- Jul 28, 2025, 7:23:15 PM (6 days ago)
- Location:
- LMDZ6/branches/contrails
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/contrails
- Property svn:mergeinfo changed
/LMDZ6/trunk merged: 5654-5683,5685-5690,5692-5715,5718-5721,5726-5727,5729,5744-5761,5763-5778,5780,5785-5789
- Property svn:mergeinfo changed
-
LMDZ6/branches/contrails/libf/phylmd/physiq_mod.F90
r5790 r5791 20 20 ! PLEASE try to follow this rule 21 21 22 USE ACAMA_GWD_rando_m, only: ACAMA_GWD_rando 22 USE ACAMA_GWD_rando_m, only: ACAMA_GWD_rando, ACAMA_GWD_rando_first 23 23 USE aero_mod 24 24 USE add_phys_tend_mod, only : add_pbl_tend, add_phys_tend, diag_phys_tend, prt_enerbil, & … … 32 32 USE dimphy 33 33 USE etat0_limit_unstruct_mod 34 USE FLOTT_GWD_rando_m, only: FLOTT_GWD_rando 34 USE FLOTT_GWD_rando_m, only: FLOTT_GWD_rando, FLOTT_GWD_rando_first 35 35 USE fonte_neige_mod, ONLY : fonte_neige_get_vars 36 36 USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg … … 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, ivap, iliq, isol, ibs, icf, iqvc, icfc, iqtc, inic41 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, nqtke, tracers, type_trac, addPhase, ivap, iliq, isol, ibs, icf, iqvc, itke, icfc, iqtc, inic 42 42 USE strings_mod, ONLY: strIdx 43 43 USE iophy … … 49 49 USE netcdf, only: nf90_fill_real ! IM for NMC files 50 50 USE open_climoz_m, only: open_climoz ! ozone climatology from a file 51 USE orografi_mod, ONLY: drag_noro, lift_noro, sugwd 52 USE orografi_strato_mod, ONLY: drag_noro_strato, lift_noro_strato, sugwd_strato 51 53 USE ozonecm_m, only: ozonecm ! ozone of J.-F. Royer 52 54 USE pbl_surface_mod, ONLY : pbl_surface … … 96 98 USE lmdz_cloud_optics_prop_ini, ONLY : cloud_optics_prop_ini 97 99 USE phys_output_var_mod, ONLY : cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv 98 USE phys_output_var_mod, ONLY : cloud_cover_sw, cloud_cover_sw_s2 100 USE phys_output_var_mod, ONLY : cloud_cover_sw, cloud_cover_sw_s2, ZFLUX_DIR, ZFLUX_DIR_CLEAR, & 101 & ZFLUX_DIR_s2, ZFLUX_DIR_CLEAR_s2, ZFLUX_DIR_SUN, ZFLUX_DIR_SUN_s2 102 USE phys_output_var_mod, ONLY : type_ecri 99 103 100 104 … … 114 118 USE infotrac_phy, ONLY: nqCO2 115 119 USE lmdz_reprobus_wrappers, ONLY: init_chem_rep_xjour, d_q_rep, d_ql_rep, d_qi_rep, & 116 ptrop, ttrop, ztrop, gravit, itroprep, Z1, Z2, fac, B, chemini_rep, chemtime_rep, coord_hyb_rep, &117 rtime120 ptrop, ttrop, ztrop, gravit, itroprep, Z1, Z2, fac, B, & 121 chemini_rep, rtime, chemtime_rep, coord_hyb_rep 118 122 USE time_phylmdz_mod, ONLY: annee_ref, day_ini, day_ref, start_time 119 123 USE vertical_layers_mod, ONLY: aps, bps, ap, bp … … 154 158 ! Dynamic tendencies (diagnostics) 155 159 d_t_dyn,d_q_dyn,d_ql_dyn,d_qs_dyn,d_qbs_dyn, & 156 d_u_dyn,d_v_dyn,d_cf_dyn,d_qvc_dyn,d_t r_dyn, &160 d_u_dyn,d_v_dyn,d_cf_dyn,d_qvc_dyn,d_tke_dyn,d_tr_dyn, & 157 161 d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d,d_qbs_dyn2d, & 158 162 ! Physic tendencies … … 372 376 rneb, & 373 377 zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic, & 374 zxfluxt,zxfluxq 378 !GG zxfluxt,zxfluxq 379 zxfluxt,zxfluxq, & 380 fcds, fcdi, dh_basal_growth, dh_basal_melt, & 381 dh_top_melt, dh_snow2sic, & 382 dtice_melt, dtice_snow2sic 383 !GG 375 384 ! 376 385 USE phys_local_var_mod, ONLY: zfice, dNovrN, ptconv … … 392 401 USE phys_output_write_spl_mod, ONLY: phys_output_write_spl 393 402 USE phytracr_spl_mod, ONLY: phytracr_spl_out_init, phytracr_spl 394 USE s2s, ONLY : s2s_initialize 403 USE s2s, ONLY : s2s_initialize, s2s_finalize 395 404 IMPLICIT NONE 396 405 !>====================================================================== … … 1449 1458 ENDIF 1450 1459 1460 IF (ok_advtke) THEN 1461 IF (nqtke .LT. 1) THEN 1462 WRITE (lunout, *) 'activation of TKE advection need a specific TKE tracer', & 1463 'but nqtke=', nqtke 1464 abort_message='see above' 1465 CALL abort_physic(modname,abort_message, 1) 1466 ENDIF 1467 ENDIF 1468 1469 1451 1470 Ncvpaseq1 = 0 1452 1471 dnwd0=0.0 … … 1775 1794 ok_sync=ok_sync_omp 1776 1795 1777 freq_outNMC(1) = ecrit_files(7)1778 freq_outNMC(2) = ecrit_files(8)1779 freq_outNMC(3) = ecrit_files(9)1780 WRITE(lunout,*)'OK freq_outNMC(1)=',freq_outNMC(1)1781 WRITE(lunout,*)'OK freq_outNMC(2)=',freq_outNMC(2)1782 WRITE(lunout,*)'OK freq_outNMC(3)=',freq_outNMC(3)1796 ! freq_outNMC(1) = ecrit_files(7) 1797 ! freq_outNMC(2) = ecrit_files(8) 1798 ! freq_outNMC(3) = ecrit_files(9) 1799 ! WRITE(lunout,*)'OK freq_outNMC(1)=',freq_outNMC(1) 1800 ! WRITE(lunout,*)'OK freq_outNMC(2)=',freq_outNMC(2) 1801 ! WRITE(lunout,*)'OK freq_outNMC(3)=',freq_outNMC(3) 1783 1802 1784 1803 #ifndef CPP_XIOS … … 1850 1869 CALL iniradia(klon,klev,paprs(1,1:klev+1)) 1851 1870 1871 1852 1872 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1853 1873 CALL surf_wind_ini(klon,lunout) 1854 1874 CALL getin_p('nsurfwind',nsurfwind) 1855 1875 allocate(surf_wind_value(klon,nsurfwind),surf_wind_proba(klon,nsurfwind)) 1856 1876 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1877 ! initialisation des variables tkeoro 1878 addtkeoro=0 1879 CALL getin_p('addtkeoro',addtkeoro) 1880 1881 alphatkeoro=1. 1882 CALL getin_p('alphatkeoro',alphatkeoro) 1883 alphatkeoro=min(max(0.,alphatkeoro),1.) 1884 1885 smallscales_tkeoro=.FALSE. 1886 CALL getin_p('smallscales_tkeoro',smallscales_tkeoro) 1887 1857 1888 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1858 1889 CALL wake_ini(rg,rd,rv,prt_level) … … 2484 2515 ENDDO 2485 2516 ENDDO 2486 ! 2517 2518 ! in case of TKE advection, we interpolate vertically 2519 ! since TKE is defined at the bottom interface of layers but 2520 ! it is interpolated onto middle layers for advection 2521 2522 IF (ok_advtke) THEN 2523 DO k=2,klev 2524 DO i=1,klon 2525 pbl_tke(i,k,:)=(qx(i,k-1,itke)*zmasse(i,k-1)+qx(i,k,itke)*zmasse(i,k))/(zmasse(i,k-1)+zmasse(i,k)) 2526 ENDDO 2527 ENDDO 2528 ENDIF 2529 2530 tke0(:,:)=pbl_tke(:,:,is_ave) 2531 2532 2487 2533 !--OB water mass fixer 2488 2534 IF (ok_water_mass_fixer) THEN … … 2501 2547 !--fin mass fixer 2502 2548 2503 tke0(:,:)=pbl_tke(:,:,is_ave) 2504 IF (nqtot > nqo) THEN 2549 IF (nqtot > (nqo+nqtke)) THEN 2505 2550 ! water isotopes are not included in tr_seri 2506 2551 itr = 0 … … 2558 2603 d_qtc_dyn(:,:)= (qtc_seri(:,:)-qtc_ancien(:,:))/phys_tstep 2559 2604 d_nic_dyn(:,:)= (nic_seri(:,:)-nic_ancien(:,:))/phys_tstep 2605 d_tke_dyn(:,:)= (pbl_tke(:,:,is_ave)-tke_ancien(:,:))/phys_tstep 2560 2606 CALL water_int(klon,klev,q_seri,zmasse,zx_tmp_fi2d) 2561 2607 d_q_dyn2d(:)=(zx_tmp_fi2d(:)-prw_ancien(:))/phys_tstep … … 2567 2613 d_qbs_dyn2d(:)=(zx_tmp_fi2d(:)-prbsw_ancien(:))/phys_tstep 2568 2614 ! !! RomP >>> td dyn traceur 2569 IF (nqtot > nqo) d_tr_dyn(:,:,:)=(tr_seri(:,:,:)-tr_ancien(:,:,:))/phys_tstep2615 IF (nqtot > (nqo+nqtke)) d_tr_dyn(:,:,:)=(tr_seri(:,:,:)-tr_ancien(:,:,:))/phys_tstep 2570 2616 ! !! RomP <<< 2571 2617 ELSE … … 2582 2628 d_qtc_dyn(:,:)= 0.0 2583 2629 d_nic_dyn(:,:)= 0.0 2630 d_tke_dyn(:,:)= 0.0 2584 2631 d_q_dyn2d(:) = 0.0 2585 2632 d_ql_dyn2d(:) = 0.0 … … 2587 2634 d_qbs_dyn2d(:)= 0.0 2588 2635 ! !! RomP >>> td dyn traceur 2589 IF (nqtot > nqo) d_tr_dyn(:,:,:)= 0.02636 IF (nqtot > (nqo+nqtke)) d_tr_dyn(:,:,:)= 0.0 2590 2637 ! !! RomP <<< 2591 2638 ancien_ok = .TRUE. … … 2943 2990 debut, lafin, & 2944 2991 longitude_deg, latitude_deg, rugoro, zrmu0, & 2945 sollwdown, cldt, & 2992 !GG sollwdown, cldt, & 2993 sollwdown, pphi, cldt, & 2994 !GG 2946 2995 rain_fall, snow_fall, bs_fall, solsw, solswfdiff, sollw, & 2947 2996 gustiness, & … … 2988 3037 wake_delta_pbl_TKE, & 2989 3038 !>nrlmd+jyg 2990 treedrg, & 3039 !GG treedrg ) 3040 treedrg,hice, tice, bilg_cumul, & 3041 fcds, fcdi, dh_basal_growth, dh_basal_melt, & 3042 dh_top_melt, dh_snow2sic, & 3043 dtice_melt, dtice_snow2sic , & 3044 !GG 2991 3045 !FC 2992 3046 !AM … … 3576 3630 ENDDO 3577 3631 3578 IF ( iflag_wake==2) THEN3632 IF (mod(iflag_wake,10)==2) THEN 3579 3633 ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.) 3580 3634 DO k = 1,klev … … 3584 3638 ok_wk_lsp(:)*(d_q_eva(:,k)+d_q_lsc(:,k))/phys_tstep 3585 3639 ENDDO 3586 ELSEIF ( iflag_wake==3) THEN3640 ELSEIF (mod(iflag_wake,10)==3) THEN 3587 3641 ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.) 3588 3642 DO k = 1,klev … … 4746 4800 topsw0,toplw0,solsw0,sollw0, & 4747 4801 lwdnc0, lwdn0, lwdn, lwupc0, lwup0, lwup, & 4802 lwtoa0b, lwtoab , & !FC 4748 4803 swdnc0, swdn0, swdn, swupc0, swup0, swup, & 4749 4804 topswad_aero, solswad_aero, & … … 4760 4815 ZLWFT0_i, ZFLDN0, ZFLUP0, & 4761 4816 ZSWFT0_i, ZFSDN0, ZFSUP0, & 4817 ZFLUX_DIR, ZFLUX_DIR_CLEAR, ZFLUX_DIR_SUN, & 4762 4818 cloud_cover_sw, & 4763 4819 !--AB contrails radiative effects … … 4832 4888 topsw0p,toplw0p,solsw0p,sollw0p, & 4833 4889 lwdnc0p, lwdn0p, lwdnp, lwupc0p, lwup0p, lwupp, & 4890 lwtoa0bp, lwtoabp , & !FC 4834 4891 swdnc0p, swdn0p, swdnp, swupc0p, swup0p, swupp, & 4835 4892 topswad_aerop, solswad_aerop, & … … 4846 4903 ZLWFT0_i, ZFLDN0, ZFLUP0, & 4847 4904 ZSWFT0_i, ZFSDN0, ZFSUP0, & 4905 ZFLUX_DIR, ZFLUX_DIR_CLEAR, ZFLUX_DIR_SUN, & 4848 4906 cloud_cover_sw, & 4849 4907 !--AB contrails radiative effects … … 4881 4939 topsw0_s2,toplw0_s2,solsw0_s2,sollw0_s2, & 4882 4940 lwdnc0_s2, lwdn0_s2, lwdn_s2, lwupc0_s2, lwup0_s2, lwup_s2, & 4941 lwtoa0b_s2, lwtoab_s2 , & !FC 4883 4942 swdnc0_s2, swdn0_s2, swdn_s2, swupc0_s2, swup0_s2, swup_s2, & 4884 4943 topswad_aero_s2, solswad_aero_s2, & … … 4895 4954 ZLWFT0_i, ZFLDN0, ZFLUP0, & 4896 4955 ZSWFT0_i, ZFSDN0, ZFSUP0, & 4956 ZFLUX_DIR, ZFLUX_DIR_CLEAR, ZFLUX_DIR_SUN, & 4897 4957 cloud_cover_sw_s2) 4898 4958 ENDIF ! ok_3Deffect … … 5115 5175 IF (.not. ok_hines .and. ok_gwd_rando) then 5116 5176 ! ym missing init for east_gwstress & west_gwstress -> added in phys_local_var_mod 5177 CALL acama_GWD_rando_first() 5117 5178 CALL acama_GWD_rando(PHYS_TSTEP, pplay, latitude_deg, t_seri, u_seri, & 5118 5179 v_seri, rot, zustr_gwd_front, zvstr_gwd_front, du_gwd_front, & … … 5133 5194 5134 5195 IF (ok_gwd_rando) THEN 5196 CALL FLOTT_GWD_rando_first() 5135 5197 CALL FLOTT_GWD_rando(PHYS_TSTEP, pplay, t_seri, u_seri, v_seri, & 5136 5198 rain_fall + snow_fall, zustr_gwd_rando, zvstr_gwd_rando, & … … 5249 5311 ! Additional tendency of TKE due to orography 5250 5312 !=============================================================== 5251 !5252 ! Inititialization5253 !------------------5254 5255 addtkeoro=05256 CALL getin_p('addtkeoro',addtkeoro)5257 5258 IF (prt_level.ge.5) &5259 print*,'addtkeoro', addtkeoro5260 5261 alphatkeoro=1.5262 CALL getin_p('alphatkeoro',alphatkeoro)5263 alphatkeoro=min(max(0.,alphatkeoro),1.)5264 5265 smallscales_tkeoro=.FALSE.5266 CALL getin_p('smallscales_tkeoro',smallscales_tkeoro)5267 5268 5313 5269 5314 dtadd(:,:)=0. … … 5512 5557 da,phi,phi2,d1a,dam,mp,ep,sigd,sij,clw,elij, & 5513 5558 epmlmMm,eplaMm,upwd,dnwd,itop_con,ibas_con, & 5514 ev,wdtrainA , wdtrainM,wght_cvfd, &5559 ev,wdtrainAS, wdtrainM,wght_cvfd, & 5515 5560 fm_therm, entr_therm, rneb, & 5516 5561 beta_prec_fisrt,beta_prec, & … … 5774 5819 ENDDO 5775 5820 ENDDO 5821 5822 ! in case of advection of TKE 5823 IF (ok_advtke) THEN 5824 DO k=1,klev 5825 DO i=1,klon 5826 d_qx(i,k,itke)=((pbl_tke(i,k,is_ave)+pbl_tke(i,k+1,is_ave))/2. - qx(i,k,itke)) / phys_tstep 5827 ENDDO 5828 ENDDO 5829 ENDIF 5776 5830 ! 5777 5831 ! DC: All iterations are cycled if nqtot==nqo, so no nqtot>nqo condition required … … 5805 5859 qtc_ancien(:,:)= qtc_seri(:,:) 5806 5860 nic_ancien(:,:)= nic_seri(:,:) 5861 tke_ancien(:,:)= pbl_tke(:,:,is_ave) 5862 5807 5863 CALL water_int(klon,klev,q_ancien,zmasse,prw_ancien) 5808 5864 CALL water_int(klon,klev,ql_ancien,zmasse,prlw_ancien) … … 5969 6025 5970 6026 IF (lafin) THEN 6027 CALL s2s_finalize ! finalization of source to source tools 5971 6028 itau_phy = itau_phy + itap 5972 6029 CALL phyredem ("restartphy.nc")
Note: See TracChangeset
for help on using the changeset viewer.