Changeset 3342 for trunk/LMDZ.GENERIC
- Timestamp:
- May 23, 2024, 10:08:50 AM (7 months ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/changelog.txt
r3341 r3342 1941 1941 Follow-up of including surface albedo in restartfi.nc 1942 1942 Ensure initialization of this albedo to bare ground albedo in newstart 1943 1944 == 23/05/2024 == ALS 1945 Adapts the Thermal Plume Model for generic tracers. 1946 Adds variables such as vteta in writediagfi section. -
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r3335 r3342 1336 1336 IF (water) THEN 1337 1337 CALL evap(ngrid,nlayer,nq,ptimestep,pt,pq,pdq,pdt,dqevap,dtevap,zqtherm,zttherm) 1338 !ALS24 adapats for generic tracer 1339 ELSEIF (generic_condensation .and. .not. water) THEN 1340 DO iq=1,nq 1341 CALL generic_tracer_index(nq,iq,igcm_generic_vap,igcm_generic_ice,call_ice_vap_generic) 1342 CALL evap_generic(ngrid,nlayer,nq,ptimestep,pt,pq,pdq,pdt,igcm_generic_vap, & 1343 igcm_generic_ice,dqevap,dtevap,zqtherm,zttherm) 1344 ENDDO 1338 1345 ELSE 1339 1346 zttherm(:,:) = pt(:,:) + pdt(:,:) * ptimestep … … 2522 2529 call writediagfi(ngrid,'w_plm','Squared vertical velocity','m s$^{-1}$', 3, zw2_bis) 2523 2530 call writediagfi(ngrid,'fraca','Updraft fraction','', 3, fraca) 2531 call writediagfi(ngrid,"zdttherm","dt due to plumes","K-1 s-1",3,zdttherm) !ALS24 2532 IF (tracer) THEN 2533 call writediagfi(ngrid,"zdqtherm","dq due to plumes, iq = 1","kg kg-1 s-1",3, & 2534 zdqtherm(1:ngrid,1:nlayer,1)) !ALS24 2535 call writediagfi(ngrid,"zdqtherm2","dq due to plumes; iq = 2","kg kg-1 s-1",3, & 2536 zdqtherm(1:ngrid,1:nlayer,2)) !ALS24 2537 ENDIF 2524 2538 endif 2525 2539 … … 2655 2669 call writediagfi(ngrid,"CLFt","H2O column cloud fraction"," ",2,totcloudfrac) 2656 2670 call writediagfi(ngrid,"RH","relative humidity"," ",3,RH) 2671 call writediagfi(ngrid,"vteta","virtual potential temperature","K",3,zh * (1.+(1./epsi-1.) * & 2672 zq(1:ngrid,1:nlayer,1))) 2657 2673 endif 2658 2674 … … 2667 2683 call writediagfi(ngrid,"CLF","GCS cloud fraction"," ",3,cloudfrac) 2668 2684 call writediagfi(ngrid,"RH_generic","GCS relative humidity"," ",3,RH_generic) 2685 call writediagfi(ngrid,"vteta","virtual potential temperature","K",3,zh * (1.+(1./epsi_generic-1.) * & 2686 zq(1:ngrid,1:nlayer,1) )) 2669 2687 endif 2670 2688 -
trunk/LMDZ.GENERIC/libf/phystd/thermcell_dq.F90
r2229 r3342 102 102 ! Computation of tracer concentrations in the ascending plume 103 103 !------------------------------------------------------------------------------- 104 104 !ALS24 initialises qa in first layer 105 105 DO ig=1,ngrid 106 DO l=1,nlay 106 qa(ig,1) = q(ig,1) 107 ENDDO 108 109 DO ig=1,ngrid 110 DO l=2,nlay 107 111 IF ((fm(ig,l+1)+detr(ig,l))*ptimestep > 1.e-6*masse(ig,l)) THEN 108 112 qa(ig,l) = (fm(ig,l) * qa(ig,l-1) + entr(ig,l) * q(ig,l)) & -
trunk/LMDZ.GENERIC/libf/phystd/thermcell_env.F90
r2230 r3342 26 26 USE watercommon_h, ONLY: RLvCp, RETV, Psat_water 27 27 USE tracer_h, ONLY: igcm_h2o_vap, igcm_h2o_ice 28 USE callkeys_mod, ONLY: water 29 28 USE callkeys_mod, ONLY: water, generic_condensation 29 USE comcstfi_mod, ONLY: r, cpp, mugaz 30 USE generic_cloud_common_h, ONLY: Psat_generic, epsi_generic, RLVTT_generic 31 USE generic_tracer_index_mod, ONLY: generic_tracer_index 32 30 33 IMPLICIT NONE 31 34 … … 65 68 ! ------ 66 69 67 INTEGER ig, k 70 INTEGER ig, k, iq 68 71 69 72 REAL psat ! Dummy argument for Psat_water() 70 73 74 !ALS24 declaration for generic tracer 75 INTEGER :: igcm_generic_vap, igcm_generic_ice! index of the vap and ice of generic_tracer 76 LOGICAL :: call_ice_vap_generic ! to call only one time the ice/vap pair of a tracer 77 REAL, SAVE :: metallicity ! metallicity of planet --- is not used here, but necessary to call function Psat_generic 78 !$OMP THREADPRIVATE(metallicity) 79 REAL :: RETV_generic, RV_generic, RLvCp_generic 80 71 81 !=============================================================================== 72 82 ! Initialization … … 81 91 zql(:,:) = 0. 82 92 93 metallicity=0.0 ! default value --- is not used here but necessary to call function Psat_generic 94 83 95 !=============================================================================== 84 96 ! Condensation and latent heat release … … 103 115 ENDDO 104 116 ENDDO 105 117 118 ELSEIF (generic_condensation .AND. .NOT. water ) THEN 119 120 DO iq=1,nq 121 122 CALL generic_tracer_index(nq,iq,igcm_generic_vap,igcm_generic_ice,call_ice_vap_generic) 123 124 IF (call_ice_vap_generic) THEN ! to call only one time the ice/vap pair of a tracer 125 126 zqt(:,:) = pq(:,:,igcm_generic_vap) 127 128 DO k = 1,nlay 129 DO ig=1,ngrid 130 CALL Psat_generic(pt(ig,k),pplev(ig,k),metallicity,psat,zqs(ig,k)) 131 ENDDO 132 ENDDO 133 134 RV_generic = (8.314511*1000.)/(epsi_generic*mugaz) 135 RETV_generic = RV_generic/(r-1.) 136 RLvCp_generic = RLVTT_generic/cpp 137 138 DO k = 1,nlay 139 DO ig=1,ngrid 140 zql(ig,k) = max(0.,pq(ig,k,igcm_generic_vap) - zqs(ig,k)) 141 zt(ig,k) = pt(ig,k) + RLvCp_generic * zql(ig,k) 142 ztv(ig,k) = zt(ig,k) / zpopsk(ig,k) & 143 & * (1. + RETV_generic * (zqt(ig,k)-zql(ig,k)) - zql(ig,k)) 144 ENDDO 145 ENDDO 146 147 ENDIF !call_ice_vap_generic 148 149 ENDDO!nq 150 106 151 ELSE 107 152 -
trunk/LMDZ.GENERIC/libf/phystd/thermcell_plume.F90
r2470 r3342 26 26 USE tracer_h, ONLY: igcm_h2o_vap 27 27 USE thermcell_mod 28 28 USE comcstfi_mod, ONLY: r, cpp, mugaz 29 USE callkeys_mod, ONLY: water, generic_condensation 30 USE generic_cloud_common_h, ONLY: Psat_generic, epsi_generic, RLVTT_generic 31 29 32 IMPLICIT NONE 30 33 … … 98 101 LOGICAL active(ngrid) ! If the plume is active (speed and incoming mass flux > 0) 99 102 LOGICAL activetmp(ngrid) ! If the plume is active (active=true and outgoing mass flux > 0) 100 103 104 REAL, SAVE :: metallicity ! metallicity of planet --- is not used here, but necessary to call function Psat_generic 105 REAL :: RV_generic 106 REAL :: RETV_comp, RLvCp_comp !values used for computation (depends if water or generic tracer) 107 101 108 !=============================================================================== 102 109 ! Initialization … … 129 136 130 137 l_start = nlay 131 138 139 metallicity=0.0 ! default value --- is not used here but necessary to call function Psat_generic 140 141 ! ALS24 for thermal plume model with generic tracer 142 IF (water) THEN 143 RETV_comp = RETV 144 RLvCp_comp = RLvCp 145 ELSEIF (generic_condensation .AND. .NOT. water ) THEN 146 RV_generic = (8.314511*1000.)/(epsi_generic*mugaz) 147 RETV_comp = RV_generic/(r-1.) 148 RLvCp_comp = RLVTT_generic/cpp 149 ENDIF 150 132 151 !=============================================================================== 133 152 ! First layer computation … … 180 199 DO ig=1,ngrid 181 200 IF (active(ig)) THEN 182 CALL Psat_water(ztemp(ig), pplev(ig,l), psat, zqsa_est(ig)) 201 IF (water) THEN 202 CALL Psat_water(ztemp(ig), pplev(ig,l), psat, zqsa_est(ig)) 203 ELSEIF (generic_condensation .AND. .NOT. water) THEN 204 CALL Psat_generic(ztemp(ig),pplev(ig,l),metallicity,psat,zqsa_est(ig)) 205 ENDIF 183 206 ENDIF 184 207 ENDDO … … 192 215 zqla_est(ig,l) = MAX(0.,zqta(ig,l-1) - zqsa_est(ig)) ! zqla_est is set to ql plume 193 216 zta_est(ig,l) = zhla(ig,l-1) * zpopsk(ig,l) & ! zta_est is set to TR plume 194 & + RLvCp * zqla_est(ig,l)217 & + RLvCp_comp * zqla_est(ig,l) 195 218 ztva_est(ig,l) = zta_est(ig,l) / zpopsk(ig,l) & ! ztva_est is set to TRPV plume 196 & * (1. + RETV * (zqta(ig,l-1)-zqla_est(ig,l)) - zqla_est(ig,l))219 & * (1. + RETV_comp * (zqta(ig,l-1)-zqla_est(ig,l)) - zqla_est(ig,l)) 197 220 198 221 zbuoy(ig,l) = RG * (ztva_est(ig,l) - ztv(ig,l)) / ztv(ig,l) … … 263 286 DO ig=1,ngrid 264 287 IF (activetmp(ig)) THEN 265 CALL Psat_water(ztemp(ig), pplev(ig,l), psat, zqsa(ig,l)) 288 IF (water) THEN 289 CALL Psat_water(ztemp(ig), pplev(ig,l), psat, zqsa(ig,l)) 290 ELSEIF (generic_condensation .AND. .NOT. water ) THEN 291 CALL Psat_generic(ztemp(ig),pplev(ig,l),metallicity,psat,zqsa(ig,l)) 292 ENDIF 266 293 ENDIF 267 294 ENDDO … … 275 302 zqla(ig,l) = MAX(0.,zqta(ig,l) - zqsa(ig,l)) ! zqla is set to ql plume (mixed) 276 303 zta(ig,l) = zhla(ig,l) * zpopsk(ig,l) & ! ztva is set to TR plume (mixed) 277 & + RLvCp * zqla(ig,l)304 & + RLvCp_comp * zqla(ig,l) 278 305 ztva(ig,l) = zta(ig,l) / zpopsk(ig,l) & ! ztva is set to TRPV plume (mixed) 279 & * (1. + RETV *(zqta(ig,l)-zqla(ig,l)) - zqla(ig,l))306 & * (1. + RETV_comp*(zqta(ig,l)-zqla(ig,l)) - zqla(ig,l)) 280 307 281 308 zbuoy(ig,l) = RG * (ztva(ig,l) - ztv(ig,l)) / ztv(ig,l)
Note: See TracChangeset
for help on using the changeset viewer.