Skip to content

Commit

Permalink
revert a few changes
Browse files Browse the repository at this point in the history
	modified:   src/physics/cam/ndrop.F90
	modified:   src/physics/cam/nucleate_ice.F90
	modified:   src/physics/cam/physics_types.F90
  • Loading branch information
fvitt committed Dec 12, 2024
1 parent 7b87c3a commit 69fa095
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/physics/cam/ndrop.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
22 changes: 8 additions & 14 deletions src/physics/cam/nucleate_ice.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -589,3 +582,4 @@ subroutine frachom(Tmean,RHimean,detaT,fhom)
end subroutine frachom

end module nucleate_ice

6 changes: 3 additions & 3 deletions src/physics/cam/physics_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 69fa095

Please sign in to comment.