Skip to content

Commit

Permalink
Only adjust EmanuelConvection tendencies if IPBL is explicitly set.
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-rose committed Feb 22, 2018
1 parent 6642234 commit 3d6cc52
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 2 additions & 3 deletions climlab/convection/_emanuel_convection/Driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ subroutine emanuel_convection(T, Q, QS, U, V, TRA, P, PH, &
real, intent(in) :: T(NCOL,ND),Q(NCOL,ND),QS(NCOL,ND),U(NCOL,ND),V(NCOL,ND)
real, intent(in) :: TRA(NCOL,ND,NTRA),P(ND),PH(ND+1)
real, intent(in) :: DELT ! The model time step (sec) between calls to CONVECT
real, intent(in) :: IPBL ! switch to bypass the dry adiabatic adjustment (bypass if IPBL=0)
integer, intent(in) :: IPBL ! switch to bypass the dry adiabatic adjustment (bypass if IPBL=0)
real, intent(in) :: CBMFold(NCOL) ! The cloud base mass flux ((kg/m**2)/s)
real, intent(in) :: CPD, CPV, CL, RV, RD, LV0, G, ROWL ! thermodynamic constants
integer, intent(in) :: MINORIG ! index of lowest level from which convection may originate
Expand Down Expand Up @@ -77,8 +77,7 @@ subroutine emanuel_convection(T, Q, QS, U, V, TRA, P, PH, &
end if
CBMFnew(j) = 0. + CBMFold(j) ! will be updated during call to CONVECT
call CONVECT(Tout(j,:),Qout(j,:),QSout(j,:),Uout(j,:),Vout(j,:), &
TRAout(j,:,:),P,PH, &
ND,NL,NTRA,DELT,MINORIG, &
TRAout(j,:,:),P,PH, ND,NL,NTRA,DELT,MINORIG, &
CPD, CPV, CL, RV, RD, LV0, G, ROWL, &
ELCRIT, TLCRIT, ENTP, SIGD, SIGS, OMTRAIN, OMTSNOW, &
COEFFR, COEFFS, CU, BETA, DTMAX, ALPHA, DAMP, &
Expand Down
5 changes: 3 additions & 2 deletions climlab/convection/emanuel_convection.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ def _compute(self):
self.CU, self.BETA, self.DTMAX, self.ALPHA, self.DAMP
)
# If dry adjustment is being used then the tendencies need to be adjusted
FT += (Tout - T) / DELT
FQ += (Qout - Q) / DELT
if self.IPBL != 0:
FT += (Tout - T) / DELT
FQ += (Qout - Q) / DELT
tendencies = {'Tatm': _convect_to_climlab(FT)*np.ones_like(self.state['Tatm']),
'q': _convect_to_climlab(FQ)*np.ones_like(self.state['q'])}
if 'Ts' in self.state:
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source:
path: ../

build:
number: 0
number: 5

requirements:
build:
Expand Down

0 comments on commit 3d6cc52

Please sign in to comment.