Changeset 4171
- Timestamp:
- Apr 3, 2026, 5:21:58 PM (7 days ago)
- Location:
- trunk/LMDZ.TITAN
- Files:
-
- 12 edited
-
deftank/callphys.def (modified) (1 diff)
-
libf/muphytitan/mm_clouds.f90 (modified) (3 diffs)
-
libf/muphytitan/mm_globals.f90 (modified) (12 diffs)
-
libf/muphytitan/mm_methods.f90 (modified) (3 diffs)
-
libf/muphytitan/mm_microphysic.f90 (modified) (5 diffs)
-
libf/muphytitan/mmp_gcm.F90 (modified) (4 diffs)
-
libf/phytitan/callkeys_mod.F90 (modified) (1 diff)
-
libf/phytitan/calmufi.F90 (modified) (7 diffs)
-
libf/phytitan/cond_muphy.F90 (modified) (3 diffs)
-
libf/phytitan/inifis_mod.F90 (modified) (1 diff)
-
libf/phytitan/inimufi.F90 (modified) (2 diffs)
-
libf/phytitan/physiq_mod.F90 (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/deftank/callphys.def
r3975 r4171 104 104 # If yes, number of ices ? (must be compatible with traceur.def AND microphysical model) 105 105 nices = 4 106 # Activate latent heat retroaction ? 107 latent_heat = .false. 108 # Constrain minimal methane concentration in the atmosphere? 109 free_ch4 = .false. 106 110 # Use new optics for clouds ? 107 111 opt4clouds = .true. -
trunk/LMDZ.TITAN/libf/muphytitan/mm_clouds.f90
r4084 r4171 71 71 !============================================================================ 72 72 73 SUBROUTINE mm_cloud_microphysics(dm0a,dm3a,dm0n,dm3n,dm3i,dgazs )73 SUBROUTINE mm_cloud_microphysics(dm0a,dm3a,dm0n,dm3n,dm3i,dgazs,dtlc) 74 74 !! Get the evolution of moments tracers through clouds microphysics processes. 75 75 !! … … 92 92 REAL(kind=mm_wp), DIMENSION(:,:), INTENT(out) :: dgazs 93 93 !! Tendencies of each condensible gaz species (\(mol.mol^{-1}\)). 94 REAL(kind=mm_wp), DIMENSION(:), INTENT(out) :: dtlc 95 !! Temperature tendencies due to condensation/evaporation (\(K.s^{-1}\)). 94 96 REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: zdm0n,zdm3n 95 97 REAL(kind=mm_wp), DIMENSION(:,:), ALLOCATABLE :: zdm3i 98 REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: lh ! Latent heat of condensation (?) (J.kg-1) 96 99 INTEGER :: i 97 100 dm0a = 0._mm_wp ; dm3a = 0._mm_wp 98 101 dm0n = 0._mm_wp ; dm3n = 0._mm_wp 99 102 dm3i = 0._mm_wp ; dgazs = 0._mm_wp 103 dtlc = 0._mm_wp 100 104 101 105 IF (mm_w_cloud_nucond) THEN … … 103 107 ! ADDED : Extraction of nucleation and growth rates 104 108 call mm_cloud_nucond(dm0a,dm3a,dm0n,dm3n,dm3i,dgazs,mm_gazs_sat,mm_nrate,mm_grate) 109 ! Latent heat release 110 IF (mm_latent_heat) THEN 111 ALLOCATE(lh(mm_nla)) 112 DO i = 1, mm_nesp 113 lh(:) = mm_lheatX(mm_temp(:),mm_xESPS(i)) 114 dtlc(:) = dtlc(:) - (dgazs(:,i)*mm_xESPS(i)%fmol2fmas)*lh(:) ! We use the tendencies of the gaseous species, thus changing the sign of variation. 115 ENDDO 116 dtlc(:) = dtlc(:)/mm_cpp 117 ENDIF 105 118 ENDIF 106 119 -
trunk/LMDZ.TITAN/libf/muphytitan/mm_globals.f90
r3682 r4171 94 94 !! | mm_w_clouds_sed | Enable/Disable clouds microphysics sedimentation 95 95 !! | mm_w_clouds_nucond | Enable/Disable clouds microphysics nucleation/condensation 96 !! | mm_free_ch4 | Enable/Disable forcing minimum CH4 concentration 97 !! | mm_latent_heat | Enable/Disable latent heat computation 96 98 !! | mm_wsed_m0 | Force all aerosols moments to fall at M0 settling velocity 97 99 !! | mm_wsed_m3 | Force all aerosols moments to fall at M3 settling velocity … … 135 137 !! | mm_rpla | Planet radius (m) 136 138 !! | mm_g0 | Planet acceleration due to gravity constant (ground) (\(m.s^{-2}\)) 139 !! | mm_cpp | Specific heat capacity of the atmosphere (J.kg^{-1}.K^{-1}) 137 140 !! | mm_air_rad | Air molecules mean radius (m) 138 141 !! | mm_air_mmol | Air molecules molar mass (\(kg.mol^{-1}\)) … … 157 160 PROTECTED :: mm_ini,mm_ini_col,mm_ini_aer,mm_ini_cld 158 161 ! model parameters (mm_global_init) 159 PROTECTED :: mm_dt,mm_rhoaer,mm_df,mm_rm,mm_p_prod,mm_rc_prod,mm_tx_prod,mm_rpla,mm_g0,mm_rb2ra 162 PROTECTED :: mm_dt,mm_rhoaer,mm_df,mm_rm,mm_p_prod,mm_rc_prod,mm_tx_prod,mm_rpla,mm_g0,mm_rb2ra,mm_cpp 160 163 ! atmospheric vertical structure (mm_column_init) 161 164 PROTECTED :: mm_nla,mm_nle,mm_zlay,mm_zlev,mm_play,mm_plev,mm_temp,mm_rhoair,mm_btemp,mm_dzlev,mm_dzlay … … 210 213 LOGICAL, SAVE :: mm_w_cloud_sed = .true. !! Enable/Disable cloud sedimentation. 211 214 LOGICAL, SAVE :: mm_w_cloud_nucond = .true. !! Activate cloud nucleation/condensation. 215 LOGICAL, SAVE :: mm_free_ch4 = .false. !! Enable/Disable forcing minimum CH4 concentration 216 LOGICAL, SAVE :: mm_latent_heat = .false. !! Enable/Disable latent heat computation 212 217 213 218 INTEGER, PARAMETER :: mm_coag_no = 0 !! no mode interaction for coagulation (i.e. no coagulation at all). … … 333 338 !> Planet acceleration due to gravity constant (ground) (\(m.s^{-2}\)). 334 339 REAL(kind=mm_wp), SAVE :: mm_g0 = 1.35_mm_wp 340 !> Specific heat capacity of the atmosphere (J.kg^{-1}.K^{-1}) 341 REAL(kind=mm_wp), SAVE :: mm_cpp = 1038.73_mm_wp 335 342 !> Air molecules mean radius (m). 336 343 REAL(kind=mm_wp), SAVE :: mm_air_rad = 1.75e-10_mm_wp … … 606 613 CONTAINS 607 614 608 FUNCTION mm_global_init_0(dt,df,rm,rho_aer,p_prod,tx_prod,rc_prod,rplanet,g0, &609 air_rad,air_mmol,coag_interactions,clouds, spcfile, &615 FUNCTION mm_global_init_0(dt,df,rm,rho_aer,p_prod,tx_prod,rc_prod,rplanet,g0,cpp, & 616 air_rad,air_mmol,coag_interactions,clouds,free_ch4,latent_heat,spcfile, & 610 617 w_haze_prod,w_haze_sed,w_haze_coag,w_cloud_nucond, & 611 618 w_cloud_sed,force_wsed_to_m0,force_wsed_to_m3, & … … 645 652 REAL(kind=mm_wp), INTENT(in) :: g0 646 653 !! Planet gravity acceleration at ground level in \(m.s^{-2}\). 654 REAL(kind=mm_wp), INTENT(in) :: cpp 655 !! Specific heat capacity of the atmosphere (J.kg^{-1}.K^{-1}) 647 656 REAL(kind=mm_wp), INTENT(in) :: air_rad 648 657 !! Air molecules mean radius in meter. … … 653 662 LOGICAL, INTENT(in) :: clouds 654 663 !! Clouds microphysics control flag. 664 LOGICAL, INTENT(in) :: free_ch4 665 !! Methane concentration control flag. 666 LOGICAL, INTENT(in) :: latent_heat 667 !! Latent heat control flag 655 668 CHARACTER(len=*), INTENT(in) :: spcfile 656 669 !! Clouds microphysics condensible species properties file. … … 715 728 mm_rpla = rplanet 716 729 mm_g0 = g0 730 mm_cpp = cpp 717 731 mm_dt = dt 718 732 mm_air_rad = air_rad 719 mm_air_mmol = air_mmol 733 mm_air_mmol = air_mmol 720 734 mm_coag_choice = coag_interactions 721 735 ! check coagulation interactions choice … … 729 743 730 744 mm_w_clouds = clouds 745 mm_free_ch4 = free_ch4 746 mm_latent_heat = latent_heat 731 747 732 748 ! Check clouds microphysics species file … … 937 953 IF (err/=0) RETURN 938 954 err = mm_check_opt(cfg_get_value(cfg,"g0",mm_g0),mm_g0,wlog=mm_log) 955 IF (err/=0) RETURN 956 err = mm_check_opt(cfg_get_value(cfg,"cpp",mm_cpp),mm_cpp,wlog=mm_log) 939 957 IF (err/=0) RETURN 940 958 err = mm_check_opt(cfg_get_value(cfg,"timestep",mm_dt),mm_dt,wlog=mm_log) … … 1331 1349 WRITE(*,'(a,ES14.7)') "mm_rpla : ", mm_rpla 1332 1350 WRITE(*,'(a,ES14.7)') "mm_g0 : ", mm_g0 1351 WRITE(*,'(a,ES14.7)') "mm_cpp : ", mm_cpp 1333 1352 WRITE(*,'(a)') "=======================================" 1334 1353 END SUBROUTINE mm_dump_parameters -
trunk/LMDZ.TITAN/libf/muphytitan/mm_methods.f90
r4014 r4171 363 363 364 364 IF(xESP%name == "C2H2") THEN 365 ! Fray and Schmi dt (2009)365 ! Fray and Schmitt (2009) 366 366 res = (1.0e5 / pres) * exp(1.340e1 - 2.536e3/temp) 367 367 368 368 ELSE IF(xESP%name == "C2H6") THEN 369 ! Fray and Schmi dt (2009)369 ! Fray and Schmitt (2009) 370 370 res = (1.0e5 / pres) * exp(1.511e1 - 2.207e3/temp - 2.411e4/temp**2 + 7.744e5/temp**3 - 1.161e7/temp**4 + 6.763e7/temp**5) 371 371 372 372 ELSE IF(xESP%name == "AC6H6") THEN 373 ! Fray and Schmi dt (2009)373 ! Fray and Schmitt (2009) 374 374 res = (1.0e5 / pres) * exp(1.735e1 - 5.663e3/temp) 375 375 376 376 ELSE IF(xESP%name == "HCN") THEN 377 ! Fray and Schmi dt (2009)377 ! Fray and Schmitt (2009) 378 378 res = (1.0e5 / pres) * exp(1.393e1 - 3.624e3/temp - 1.325e5/temp**2 + 6.314e6/temp**3 - 1.128e8/temp**4) 379 379 380 380 ELSE IF(xESP%name == "HC3N") THEN 381 ! Fray and Schmi dt (2009)381 ! Fray and Schmitt (2009) 382 382 res = (1.0e5 / pres) * exp(1.301e1 - 4.426e3/temp) 383 383 384 384 ELSE IF (xESP%name == "CH4") THEN 385 ! Fray and Schmi dt (2009)385 ! Fray and Schmitt (2009) 386 386 res = (1.0e5 / pres) * exp(1.051e1 - 1.110e3/temp - 4.341e3/temp**2 + 1.035e5/temp**3 - 7.910e5/temp**4) 387 ! Peculiar case of CH4 : x0.80 (dissolution in N2) 387 ! Peculiar case of CH4 : x0.80 (dissolution in N2) 388 388 res = res * 0.80_mm_wp 389 ! Forcing CH4 to 1.4% minimum 390 IF (res < 0.014) THEN 391 res = 0.014 389 IF (.NOT.mm_free_ch4) THEN 390 ! Forcing CH4 to 1.4% minimum 391 IF (res < 0.014) THEN 392 res = 0.014 393 ENDIF 392 394 ENDIF 393 395 ENDIF … … 405 407 TYPE(mm_esp), INTENT(in) :: xESP !! Specie properties. 406 408 REAL(kind=mm_wp), DIMENSION(SIZE(temp)) :: res !! Molar mixing ratios of the specie. 409 INTEGER :: i 407 410 408 411 IF(xESP%name == "C2H2") THEN … … 426 429 res = (1.0e5 / pres) * exp(1.301e1 - 4.426e3/temp) 427 430 428 ! Peculiar case : CH4 : x0.85 (dissolution in N2) 431 ! Peculiar case : CH4 : x0.85 (dissolution in N2) 429 432 ELSE IF (xESP%name == "CH4") THEN 430 433 res = (1.0e5 / pres) * exp(1.051e1 - 1.110e3/temp - 4.341e3/temp**2 + 1.035e5/temp**3 - 7.910e5/temp**4) 431 434 ! Peculiar case of CH4 : x0.80 (dissolution in N2) 432 res = res * 0.80_mm_wp 433 ! Forcing CH4 to 1.4% minimum 434 WHERE (res(:) < 0.014) res(:) = 0.014 435 res(:) = res(:)*0.80_mm_wp 436 IF (.NOT.mm_free_ch4) THEN 437 ! Forcing CH4 to 1.4% minimum 438 WHERE (res(:) < 0.014) res(:) = 0.014 439 ENDIF 435 440 ENDIF 436 441 END FUNCTION ysatX_ve -
trunk/LMDZ.TITAN/libf/muphytitan/mm_microphysic.f90
r3682 r4171 63 63 64 64 65 FUNCTION muphys_all(dm0a_s,dm3a_s,dm0a_f,dm3a_f,dm0n,dm3n,dm3i,dgazs ) RESULT(ret)65 FUNCTION muphys_all(dm0a_s,dm3a_s,dm0a_f,dm3a_f,dm0n,dm3n,dm3i,dgazs,dtlc) RESULT(ret) 66 66 !! Compute the evolution of moments tracers through haze and clouds microphysics processes. 67 67 !! … … 98 98 REAL(kind=mm_wp), INTENT(out), DIMENSION(:,:) :: dgazs 99 99 !! Tendencies of each condensible gaz species (\(mol.mol^{-1}\)). 100 REAL(kind=mm_wp), INTENT(out), DIMENSION(:) :: dtlc 101 !! Temperature tendencies due to condensation/evaporation (\(K.s^{-1}\)). 100 102 LOGICAL :: ret 101 103 !! .true. on success (i.e. model has been initialized at least once previously), .false. otherwise. … … 109 111 IF (mm_w_clouds) THEN 110 112 ! Calls cloud microphysics (-> m-3) 111 call mm_cloud_microphysics(zdm0a_f,zdm3a_f,dm0n,dm3n,dm3i,dgazs )113 call mm_cloud_microphysics(zdm0a_f,zdm3a_f,dm0n,dm3n,dm3i,dgazs,dtlc) 112 114 ! add temporary aerosols tendencies (-> m-3) 113 115 dm0a_f = dm0a_f + zdm0a_f ; dm3a_f = dm3a_f + zdm3a_f … … 119 121 dgazs(:,i) = dgazs(mm_nla:1:-1,i) 120 122 ENDDO 123 dtlc = dtlc(mm_nla:1:-1) 121 124 ELSE 122 dm0n = 0._mm_wp ; dm3n = 0._mm_wp ; dm3i = 0._mm_wp ; dgazs = 0._mm_wp 125 dm0n = 0._mm_wp ; dm3n = 0._mm_wp ; dm3i = 0._mm_wp ; dgazs = 0._mm_wp ; dtlc = 0._mm_wp 123 126 ENDIF 124 127 ! multiply by altitude thickness and reverse vectors so they go from ground to top :) … … 155 158 ! Calls haze microphysics 156 159 call mm_haze_microphysics(dm0a_s,dm3a_s,dm0a_f,dm3a_f) 157 ! reverse vectors so they go from ground to top : )160 ! reverse vectors so they go from ground to top : 158 161 dm0a_s = dm0a_s(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) 159 162 dm3a_s = dm3a_s(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1) -
trunk/LMDZ.TITAN/libf/muphytitan/mmp_gcm.F90
r3699 r4171 48 48 CONTAINS 49 49 50 SUBROUTINE mmp_initialize(dt,p_prod,tx_prod,rc_prod,rplanet,g0, air_rad,air_mmol,clouds,cfgpath)50 SUBROUTINE mmp_initialize(dt,p_prod,tx_prod,rc_prod,rplanet,g0,cpp,air_rad,air_mmol,clouds,free_ch4,latent_heat,cfgpath) 51 51 !! Initialize global parameters of the model. 52 52 !! … … 79 79 REAL(kind=mm_wp), INTENT(in) :: g0 80 80 !! Planet gravity acceleration at ground level in \(m.s^{-2}\). 81 REAL(kind=mm_wp), INTENT(in) :: cpp 82 !! Specific heat capacity of the atmosphere (J.kg^{-1}.K^{-1}) 81 83 REAL(kind=mm_wp), INTENT(in) :: air_rad 82 84 !! Air molecules mean radius in meter. … … 85 87 LOGICAL, INTENT(in) :: clouds 86 88 !! Clouds microphysics control flag. 89 LOGICAL, INTENT(in) :: free_ch4 90 !! Methane control flag 91 LOGICAL, INTENT(in) :: latent_heat 92 !! Latent heat control flag 87 93 CHARACTER(len=*), INTENT(in), OPTIONAL :: cfgpath 88 94 !! Internal microphysic configuration file. … … 173 179 ! YAMMS initialization. 174 180 ! NB: in MESOSCALE this is done in inifis EMoi 175 err = mm_global_init_0(dt,df,rm,rho_aer,p_prod,tx_prod,rc_prod,rplanet,g0, &176 air_rad,air_mmol,coag_choice,clouds, spcpath, &181 err = mm_global_init_0(dt,df,rm,rho_aer,p_prod,tx_prod,rc_prod,rplanet,g0,cpp, & 182 air_rad,air_mmol,coag_choice,clouds,free_ch4,latent_heat,spcpath, & 177 183 w_h_prod,w_h_sed,w_h_coag,w_c_nucond, & 178 184 w_c_sed,fwsed_m0,fwsed_m3, & -
trunk/LMDZ.TITAN/libf/phytitan/callkeys_mod.F90
r4153 r4171 24 24 !$OMP THREADPRIVATE(callchim,callmufi,callclouds) 25 25 logical,save :: latent_heat 26 !$OMP THREADPRIVATE(latent_heat) 26 logical,save :: free_ch4 27 !$OMP THREADPRIVATE(latent_heat,free_ch4) 27 28 logical,save :: global1d 28 29 !$OMP THREADPRIVATE(global1d) -
trunk/LMDZ.TITAN/libf/phytitan/calmufi.F90
r4048 r4171 1 1 2 2 3 SUBROUTINE calmufi(dt, plev, zlev, play, zlay, g3d, temp, pq, zdqfi, zdq )3 SUBROUTINE calmufi(dt, plev, zlev, play, zlay, g3d, temp, pq, zdqfi, zdq, zdt) 4 4 5 5 !! Interface subroutine to YAMMS model for Titan LMDZ GCM. … … 36 36 REAL(kind=8), DIMENSION(:,:,:), INTENT(IN) :: zdqfi !! Tendency from former processes for tracers (\(X.kg^{-1}}\)). 37 37 REAL(kind=8), DIMENSION(:,:,:), INTENT(OUT) :: zdq !! Microphysical tendency for tracers (X.kg_air-1.s-1) 38 REAL(kind=8), DIMENSION(:,:), INTENT(OUT) :: zdt !! Microphysical tendency for temperature (K.s^{-1}). 38 39 39 40 REAL(kind=8), DIMENSION(:,:,:), ALLOCATABLE :: zq !! Local tracers updated from former processes (\(X.kg^{-1}}\)). … … 57 58 REAL(kind=8), DIMENSION(:,:), ALLOCATABLE :: dm3i !! Tendencies of the 3rd order moments of each ice components (\(m^{3}.m^{-2}\)). 58 59 REAL(kind=8), DIMENSION(:,:), ALLOCATABLE :: dgazs !! Tendencies of each condensible gaz species !(\(mol.mol^{-1}\)). 60 REAL(kind=8), DIMENSION(:), ALLOCATABLE :: dtlc !! Temperature tendencies due to condensation/evaporation (\(K.s^{-1}\)). 59 61 60 62 REAL(kind=8), DIMENSION(:,:), ALLOCATABLE :: int2ext !! (kg.m-2) … … 93 95 ALLOCATE( dm3i(nlay,nices) ) 94 96 ALLOCATE( dgazs(nlay,nices) ) 97 ALLOCATE( dtlc(nlay) ) 95 98 96 99 ! Initialization of zdq here since intent=out and no action performed on every tracers 97 100 zdq(:,:,:) = 0.D0 101 102 ! Initialization of zdt 103 zdt(:,:) = 0.D0 98 104 99 105 ! Initialize tracers updated with former processes from physics … … 158 164 ! call microphysics 159 165 IF (callclouds) THEN ! call clouds 160 IF(.NOT.mm_muphys(dm0as,dm3as,dm0af,dm3af,dm0n,dm3n,dm3i,dgazs )) &166 IF(.NOT.mm_muphys(dm0as,dm3as,dm0af,dm3af,dm0n,dm3n,dm3i,dgazs,dtlc)) & 161 167 call abort_program(error("mm_muphys aborted -> initialization not done !",-1)) 162 168 ELSE … … 187 193 ! We use the molar mass ratio from GCM in case there is discrepancy with the mm one 188 194 enddo 195 zdt(ilon,:) = dtlc(:) 189 196 endif 190 197 … … 194 201 ! we want to have routines spitting tendencies in s-1 -> let's divide ! 195 202 zdq(:,:,:) = zdq(:,:,:) / dt 203 zdt(:,:) = zdt(:,:) / dt 196 204 197 205 END SUBROUTINE calmufi -
trunk/LMDZ.TITAN/libf/phytitan/cond_muphy.F90
r4047 r4171 48 48 !------------------ 49 49 integer :: iq 50 real*8 :: Lc(ngrid,nlayer,size(ices_indx)) ! Condensation latent eheat [J.kg-1]50 real*8 :: Lc(ngrid,nlayer,size(ices_indx)) ! Condensation latent heat [J.kg-1] 51 51 52 52 … … 65 65 call calc_condlh(ngrid,nlayer,pt,Lc) 66 66 67 68 67 ! Sum of condensation latent heat [J.kg_air-1.s-1] : 69 68 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 75 74 ! Condensation heating rate : 76 75 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 77 ! If ice formation : dqmuficond <0 --> dtlc > 078 ! Else vaporisation : dqmuficond >0 --> dtlc < 076 ! If ice formation : dqmuficond > 0 --> dtlc > 0 77 ! Else vaporisation : dqmuficond < 0 --> dtlc < 0 79 78 dtlc(:,:) = dtlc(:,:) / cpp ! [K.s-1] 80 79 -
trunk/LMDZ.TITAN/libf/phytitan/inifis_mod.F90
r4153 r4171 505 505 write(*,*)" latent_heat = ",latent_heat 506 506 507 write(*,*) "Constrain minimal methane concentration in the atmosphere?" 508 free_ch4=.false. ! default value 509 call getin_p("free_ch4",free_ch4) 510 write(*,*)" free_ch4 = ",free_ch4 511 507 512 write(*,*) "Disable the coupling of microphysics within rad. transf. ?" 508 513 write(*,*) "If disabled we will assume a planetwide vert. profile of extinction ..." -
trunk/LMDZ.TITAN/libf/phytitan/inimufi.F90
r3656 r4171 2 2 3 3 use mmp_gcm 4 use callkeys_mod, only : callclouds, p_prod, tx_prod, rc_prod, air_rad, eff_gz 4 use callkeys_mod, only : callclouds, p_prod, tx_prod, rc_prod, air_rad, eff_gz, free_ch4, latent_heat 5 5 use tracer_h 6 use comcstfi_mod, only : g, rad, mugaz 6 use comcstfi_mod, only : g, rad, mugaz, cpp 7 7 use datafile_mod 8 8 … … 51 51 52 52 call mmp_initialize(ptimestep,p_prod,tx_prod,rc_prod, & 53 rad,g, air_rad,mugaz,callclouds,config_mufi)53 rad,g,cpp,air_rad,mugaz,callclouds,free_ch4,latent_heat,config_mufi) 54 54 55 55 ! ------------------------- -
trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90
r4153 r4171 249 249 real zdtsw1(ngrid,nlayer), zdtlw1(ngrid,nlayer) ! Callcorrk routine. 250 250 real zdtlc(ngrid,nlayer) ! Condensation heating rate. 251 real refCorr, time ! for hrcorr_mod routines.251 real zdtlcfi(ngrid,nlayer) ! Condensation heating rate computed in the physics 252 252 253 253 ! For Surface Tracers : (kg/m2/s) … … 268 268 real zdqfibar(ngrid,nlayer,nq) ! For 2D chemistry 269 269 real zdqmufibar(ngrid,nlayer,nq) ! For 2D chemistry 270 real zdtlcbar(ngrid,nlayer) ! For 2D chemistry 270 271 271 272 ! For Winds : (m/s/s) … … 394 395 ! Or one can put calmufi in MMP_GCM module (in muphytitan). 395 396 INTERFACE 396 SUBROUTINE calmufi(dt, plev, zlev, play, zlay, g3d, temp, pq, zdqfi, zdq )397 SUBROUTINE calmufi(dt, plev, zlev, play, zlay, g3d, temp, pq, zdqfi, zdq, zdt) 397 398 REAL(kind=8), INTENT(IN) :: dt !! Physics timestep (s). 398 399 REAL(kind=8), DIMENSION(:,:), INTENT(IN) :: plev !! Pressure levels (Pa). … … 405 406 REAL(kind=8), DIMENSION(:,:,:), INTENT(IN) :: zdqfi !! Tendency from former processes for tracers (\(X.kg^{-1}}\)). 406 407 REAL(kind=8), DIMENSION(:,:,:), INTENT(OUT) :: zdq !! Microphysical tendency for tracers (\(X.kg^{-1}}\)). 408 REAL(kind=8), DIMENSION(:,:), INTENT(OUT) :: zdt !! Temperature tendencies due to condensation/evaporation (\(K.s^{-1}\)). 407 409 END SUBROUTINE calmufi 408 410 END INTERFACE … … 441 443 ! ~~~~~~~~~~~~~~~~~~ 442 444 dtrad(:,:) = 0.D0 443 zdtlc(:,:) = 0.D0444 445 fluxrad(:) = 0.D0 445 446 zdtsw(:,:) = 0.D0 446 447 zdtlw(:,:) = 0.D0 448 zdtlc(:,:) = 0.D0 449 zdtlcfi(:,:) = 0.D0 447 450 zpopthi(:,:,:,:) = 0.D0 448 451 zpopthv(:,:,:,:) = 0.D0 … … 1129 1132 #ifdef USE_QTEST 1130 1133 dtpq(:,:,:) = 0.D0 ! we want tpq to go only through mufi 1131 call calmufi(ptimestep,pplev,zzlev,pplay,zzlay,gzlat,pt,tpq,dtpq,zdqmufi )1134 call calmufi(ptimestep,pplev,zzlev,pplay,zzlay,gzlat,pt,tpq,dtpq,zdqmufi,zdtlc) 1132 1135 tpq(:,:,:) = tpq(:,:,:) + zdqmufi(:,:,:)*ptimestep ! only manipulation of tpq->*ptimestep here 1133 1136 1134 1137 #else 1135 call calmufi(ptimestep,pplev,zzlev,pplay,zzlay,gzlat,pt,pq,pdq,zdqmufi )1138 call calmufi(ptimestep,pplev,zzlev,pplay,zzlay,gzlat,pt,pq,pdq,zdqmufi,zdtlc) 1136 1139 pdq(:,:,:) = pdq(:,:,:) + zdqmufi(:,:,:) 1137 1140 … … 1184 1187 zdqfibar(:,:,:) = 0.D0 ! We work in zonal average -> forget processes other than condensation 1185 1188 call calmufi(ptimestep,zplevbar,zzlevbar,zplaybar,zzlaybar, & 1186 gzlat,ztfibar,zqfibar,zdqfibar,zdqmufibar )1189 gzlat,ztfibar,zqfibar,zdqfibar,zdqmufibar,zdtlcbar) 1187 1190 ! TODO : Add a sanity check here ! 1188 1191 endif 1189 1192 1190 1193 ! Condensation heating rate : 1191 if (callclouds ) then1194 if (callclouds .and. latent_heat) then 1192 1195 ! Default value -> no condensation [kg/kg_air/s] : 1193 1196 dmuficond(:,:,:) = 0.D0 … … 1195 1198 dmuficond(:,:,iq) = zdqmufi(:,:,gazs_indx(iq)) 1196 1199 enddo 1197 call cond_muphy(ngrid,nlayer,pt,dmuficond,zdtlc) 1198 if (latent_heat) then 1199 pdt(:,:) = pdt(:,:) + zdtlc(:,:) 1200 endif 1200 call cond_muphy(ngrid,nlayer,pt,dmuficond,zdtlcfi) 1201 pdt(:,:) = pdt(:,:) + zdtlc 1201 1202 endif 1202 1203 endif ! callmufi … … 1360 1361 zdmassmr_col(ig)=SUM(zdmassmr(ig,:)) 1361 1362 enddo 1362 1363 call writediagfi(ngrid,"mass_evap","mass gain"," ",3,zdmassmr) 1364 call writediagfi(ngrid,"mass_evap_col","mass gain col"," ",2,zdmassmr_col) 1365 call writediagfi(ngrid,"mass","mass","kg/m2",3,mass) 1363 1364 #ifndef CPP_XIOS 1365 call writediagfi(ngrid,"mass_evap","mass gain"," ",3,zdmassmr) 1366 call writediagfi(ngrid,"mass_evap_col","mass gain col"," ",2,zdmassmr_col) 1367 call writediagfi(ngrid,"mass","mass","kg/m2",3,mass) 1368 #endif 1366 1369 1367 1370 call mass_redistribution(ngrid,nlayer,nq,ptimestep, & … … 1631 1634 !----------------------------------------------------------------------------------------------------- 1632 1635 1636 #ifndef CPP_XIOS 1633 1637 1634 1638 call writediagfi(ngrid,"Ls","solar longitude","deg",0,zls*180./pi) … … 1715 1719 i2e(:,:) = ( pplev(:,1:nlayer)-pplev(:,2:nlayer+1) ) / gzlat(:,1:nlayer) /(zzlev(:,2:nlayer+1)-zzlev(:,1:nlayer)) 1716 1720 1717 #ifdef USE_QTEST1721 #ifdef USE_QTEST 1718 1722 ! Microphysical tracers passed through dyn+phys(except mufi) 1719 1723 call writediagfi(ngrid,"mu_m0as_dp","Dynphys only spherical mode 0th order moment",'m-3',3,zq(:,:,micro_indx(1))*i2e) … … 1726 1730 call writediagfi(ngrid,"mu_m0af_mo","Mufi only fractal mode 0th order moment",'m-3',3,tpq(:,:,micro_indx(3))*i2e) 1727 1731 call writediagfi(ngrid,"mu_m3af_mo","Mufi only fractal mode 3rd order moment",'m3/m3',3,tpq(:,:,micro_indx(4))*i2e) 1728 #else1732 #else 1729 1733 call writediagfi(ngrid,"mu_m0as","Spherical mode 0th order moment",'m-3',3,zq(:,:,micro_indx(1))*i2e) 1730 1734 call writediagfi(ngrid,"mu_m3as","Spherical mode 3rd order moment",'m3/m3',3,zq(:,:,micro_indx(2))*i2e) 1731 1735 call writediagfi(ngrid,"mu_m0af","Fractal mode 0th order moment",'m-3',3,zq(:,:,micro_indx(3))*i2e) 1732 1736 call writediagfi(ngrid,"mu_m3af","Fractal mode 3rd order moment",'m3/m3',3,zq(:,:,micro_indx(4))*i2e) 1733 #endif 1737 #endif ! USE_QTEST 1734 1738 1735 1739 ! Microphysical diagnostics … … 1751 1755 1752 1756 endif ! end of 'tracer' 1757 #endif ! not CPP_XIOS 1753 1758 1754 1759 #ifdef CPP_XIOS … … 1821 1826 CALL send_xios_field("dtdif",zdtdif) 1822 1827 CALL send_xios_field("dtadj",zdtadj(:,:)) 1823 IF (callclouds ) THEN1828 IF (callclouds .and. latent_heat) THEN 1824 1829 CALL send_xios_field("dtlc",zdtlc) 1830 CALL send_xios_field("dtlcfi",zdtlcfi) 1825 1831 ENDIF 1826 1832 … … 1952 1958 !-------------------------------------------------------- 1953 1959 IF (callmufi) THEN 1960 ! Microphysical tracers are expressed in unit/m3. 1961 ! convert X.kg-1 --> X.m-3 (whereas for optics was -> X.m-2) 1962 i2e(:,:) = ( pplev(:,1:nlayer)-pplev(:,2:nlayer+1) ) / gzlat(:,1:nlayer) /(zzlev(:,2:nlayer+1)-zzlev(:,1:nlayer)) 1954 1963 ! Atmosphere (3D) : 1955 1964 ! Moments M0 and M3 : … … 2012 2021 2013 2022 ! Condensation tendencies from microphysics (mol/mol/s) : 2014 IF (callclouds ) THEN2023 IF (callclouds .and. latent_heat) THEN 2015 2024 DO iq = 1, size(ices_indx) 2016 2025 CALL send_xios_field('dmuficond_'//trim(nameOfTracer(gazs_indx(iq))),dmuficond(:,:,iq)/rat_mmol(gazs_indx(iq))) ! kg/kg/s -> mol/mol/s
Note: See TracChangeset
for help on using the changeset viewer.
