diff --git a/src/physics/cam/ndrop.F90 b/src/physics/cam/ndrop.F90 index 7b9e4e8d19..9eea87d218 100644 --- a/src/physics/cam/ndrop.F90 +++ b/src/physics/cam/ndrop.F90 @@ -105,7 +105,7 @@ subroutine ndrop_init(aero_props) do m = 1, aero_props%nbins() - do l = 0, aero_props%nspecies(m) + do l = 0, aero_props%nmasses(m) mm = aero_props%indexer(m,l) diff --git a/src/physics/cam/nucleate_ice.F90 b/src/physics/cam/nucleate_ice.F90 index 42db39a083..ac7268c068 100644 --- a/src/physics/cam/nucleate_ice.F90 +++ b/src/physics/cam/nucleate_ice.F90 @@ -226,11 +226,9 @@ subroutine nucleati( & if ( ((tc.le.0.0_r8).and.(tc.ge.-37.0_r8).and.(qc.lt.1.e-12_r8)).or.(tc.le.-37.0_r8)) then - if ( (soot_num+dst_num) > 0._r8) then - A = -1.4938_r8 * log(soot_num+dst_num) + 12.884_r8 - B = -10.41_r8 * log(soot_num+dst_num) - 67.69_r8 - regm = A * log(wbar1) + B - end if + A = -1.4938_r8 * log(soot_num+dst_num) + 12.884_r8 + B = -10.41_r8 * log(soot_num+dst_num) - 67.69_r8 + regm = A * log(wbar1) + B ! heterogeneous nucleation only if (tc .gt. regm .or. so4_num < 1.0e-10_r8) then @@ -262,11 +260,8 @@ subroutine nucleati( & nihf = 0._r8 n1 = niimm + nidep - if ( (soot_num+dst_num) > 0._r8) then - osoot_num = soot_num * (niimm + nidep) / (soot_num + dst_num) - odst_num = dst_num * (niimm + nidep) / (soot_num + dst_num) - end if - + osoot_num = soot_num * (niimm + nidep) / (soot_num + dst_num) + odst_num = dst_num * (niimm + nidep) / (soot_num + dst_num) endif ! homogeneous nucleation only @@ -327,10 +322,8 @@ subroutine nucleati( & oso4_num = nihf endif - if ( (soot_num+dst_num) > 0._r8) then - osoot_num = soot_num * (niimm + nidep) / (soot_num + dst_num) - odst_num = dst_num * (niimm + nidep) / (soot_num + dst_num) - end if + osoot_num = soot_num * (niimm + nidep) / (soot_num + dst_num) + odst_num = dst_num * (niimm + nidep) / (soot_num + dst_num) nihf = nihf * fhom * ((regm - tc) / 5._r8)**2 oso4_num = oso4_num * fhom * ((regm - tc) / 5._r8)**2 @@ -589,3 +582,4 @@ subroutine frachom(Tmean,RHimean,detaT,fhom) end subroutine frachom end module nucleate_ice + diff --git a/src/physics/cam/physics_types.F90 b/src/physics/cam/physics_types.F90 index 534f87c95f..3228c27105 100644 --- a/src/physics/cam/physics_types.F90 +++ b/src/physics/cam/physics_types.F90 @@ -223,7 +223,7 @@ subroutine physics_update(state, ptend, dt, tend) real(r8), intent(in) :: dt ! time step type(physics_tend ), intent(inout), optional :: tend ! Physics tendencies over timestep - ! tend is usually only needed by calls from physpkg. + ! tend is usually only needed by calls from physpkg. ! !---------------------------Local storage------------------------------- integer :: k,m ! column,level,constituent indices @@ -1267,10 +1267,10 @@ subroutine physics_dme_adjust(state, tend, qini, liqini, iceini, dt) ! if (.not.(dycore_is('MPAS') .or. dycore_is('SE'))) then do k = 1, pver - + ! adjusment factor is just change in water vapor fdq(:ncol) = 1._r8 + state%q(:ncol,k,1) - qini(:ncol,k) - + ! adjust constituents to conserve mass in each layer do m = 1, pcnst state%q(:ncol,k,m) = state%q(:ncol,k,m) / fdq(:ncol)