Changeset 2066
- Timestamp:
- Jan 14, 2019, 4:34:23 PM (6 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/thermcell_alim.F90
r2060 r2066 2 2 ! 3 3 ! 4 SUBROUTINE thermcell_alim(flag,ngrid,klev,ztv, d_temp,zlev,&5 & alim_star,lalim,lmin)4 SUBROUTINE thermcell_alim(flag,ngrid,klev,ztv,zlev,alim_star, & 5 lalim,lmin) 6 6 7 7 8 USE thermcell_mod 8 USE thermcell_mod, ONLY: linf, d_temp 9 9 10 10 IMPLICIT NONE … … 21 21 !============================================================================== 22 22 23 ! fort(10) ptimestep,ztv,zthl,po,zl,rhobarz,zlev,pplev,pphi,zpspsk,f024 25 23 ! inputs: 26 24 ! ------- … … 31 29 INTEGER, INTENT(IN) :: flag ! useless here 32 30 33 REAL, INTENT(IN) :: ztv(ngrid,klev) ! TRPV environment34 REAL, INTENT(IN) :: d_temp(ngrid) ! useless here 31 REAL, INTENT(IN) :: ztv(ngrid,klev) ! Large scale virtual potential temperature 32 ! Virtual potential temperature offset in linf layer 35 33 REAL, INTENT(IN) :: zlev(ngrid,klev+1) ! levels altitude 36 34 … … 48 46 49 47 REAL :: alim_star_tot(ngrid) ! integrated alimentation 48 REAL :: ztv2(ngrid,klev) ! ztv + d_temp 50 49 51 50 !============================================================================== … … 57 56 alim_star_tot(:) = 0. 58 57 58 ztv2(:,:) = ztv(:,:) 59 ztv2(:,linf) = ztv2(:,linf) + d_temp 60 59 61 !============================================================================== 60 62 ! Alimentation computation 61 63 !============================================================================== 62 64 63 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~64 ! AB : is it necessary to get ztv(l)<ztv(lmin) to compute an alimentation ?65 ! maybe ztv(ig,lmin(ig)).ge.ztv(ig,l) is sufficient.66 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~67 68 65 DO l=lmin(ig),klev-1 69 66 DO ig=1,ngrid 70 IF ((ztv (ig,l)>ztv(ig,l+1)).and.(ztv(ig,lmin(ig))>=ztv(ig,l))) THEN71 alim_star(ig,l) = MAX( (ztv (ig,l) - ztv(ig,l+1)), 0.)&67 IF ((ztv2(ig,l)>ztv2(ig,l+1)).and.(ztv2(ig,lmin(ig))>=ztv2(ig,l))) THEN 68 alim_star(ig,l) = MAX( (ztv2(ig,l) - ztv2(ig,l+1)), 0.) & 72 69 & * sqrt(zlev(ig,l+1)) 73 70 lalim(ig) = l + 1 -
trunk/LMDZ.GENERIC/libf/phystd/thermcell_mod.F90
r2064 r2066 47 47 INTEGER,PARAMETER :: linf = 2 48 48 49 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 50 ! AB : d_temp is an artificial virtual potential temperature added in layer 51 ! linf which can be used to force convection to begin in it. 52 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 53 REAL,PARAMETER :: d_temp = 10. ! 0. 54 49 55 ! Parameters for diagnoses 50 56 -
trunk/LMDZ.GENERIC/libf/phystd/thermcell_plume.F90
r2065 r2066 102 102 REAL zw2m ! 103 103 REAL zdzbis ! 104 REAL d_temp(ngrid) !105 104 REAL coefzlmel ! 106 105 REAL zdz2 ! … … 126 125 zbetalpha = betalpha / (1. + betalpha) 127 126 128 ztva(:,:) = ztv(:,:) 129 ztva_est(:,:) = ztva(:,:) 130 ztla(:,:) = zthl(:,:) 131 zqta(:,:) = po(:,:) 132 zqla(:,:) = 0. 133 zqla_est(:,:) = 0. 134 zha(:,:) = ztva(:,:) 127 ztva(:,:) = ztv(:,:) ! ztva is set to the virtual potential temperature withour latent heat release 128 ztva_est(:,:) = ztva(:,:) ! ztva_est is set to the virtual potential temperature withour latent heat release 129 ztla(:,:) = zthl(:,:) ! ztla is set to the potential temperature 130 zqta(:,:) = po(:,:) ! zqta is set to qt 131 zqla(:,:) = 0. ! zqla is set to ql 132 zqla_est(:,:) = 0. ! zqla_est is set to ql 133 zha(:,:) = ztva(:,:) ! zha is set to the plume virtual potential temperature withour latent heat release 135 134 136 135 zqsat(:) = 0. … … 153 152 lalim(:) = 1 154 153 lmin(:) = linf 155 156 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~157 ! Pour activer un contraste de temperature a la base du panache158 ! AB : It is used only in the thermcell_alim_init subroutine.159 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~160 d_temp(:) = 0.161 154 162 155 !============================================================================== … … 187 180 ! AB : On pourrait n'appeler thermcell_alim que si la plume est active 188 181 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 189 CALL thermcell_alim(iflag_thermals_alim,ngrid,klev,ztv, d_temp, &190 & zlev,alim_star,lalim,lmin)182 CALL thermcell_alim(iflag_thermals_alim,ngrid,klev,ztv,zlev,alim_star, & 183 & lalim,lmin) 191 184 192 185 !============================================================================== … … 323 316 324 317 zdz = zlev(ig,l+1) - zlev(ig,l) 325 zalpha = f0(ig) * f_star(ig,l) / sqrt(w_est(ig,l+1)) / rhobarz(ig,l) 326 327 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 328 ! AB : The next test is added to avoid a division by zero when w_est becomes 329 ! negative. 318 319 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 320 ! AB : The next test is added to avoid divisions by zero when w_est vanishes. 330 321 ! Indeed, entr and detr computed here are of no importance because w_est 331 322 ! <= 0 means it will be the last layer reached by the plume and then they … … 334 325 IF (w_est(ig,l+1).eq.0.) THEN 335 326 zw2m = 1. 327 zalpha = 0. 336 328 ELSE 337 329 zw2m = w_est(ig,l+1) 330 zalpha = f0(ig) * f_star(ig,l) / sqrt(w_est(ig,l+1)) / rhobarz(ig,l) 338 331 ENDIF 339 332
Note: See TracChangeset
for help on using the changeset viewer.