Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions physics/sfc_diff.f
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,12 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
tem2 = tem1 * tem1
tem1 = one - tem2

if( ivegsrc == 1 ) then

z0max = exp( tem2*log01 + tem1*log(z0max) )
elseif (ivegsrc == 2 ) then
z0max = exp( tem2*log01 + tem1*log(z0max) )
endif
!wz if( ivegsrc == 1 ) then
!wz
!wz z0max = exp( tem2*log01 + tem1*log(z0max) )
!wz elseif (ivegsrc == 2 ) then
!wz z0max = exp( tem2*log01 + tem1*log(z0max) )
!wz endif
Comment on lines +310 to +315

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented-out code should only be in the repository for a good reason. Please add a comment above the "!wz" lines giving the context. For example: what the code did, why it was removed, and what it should be replaced with. (This can be short, and only understandable by a subject matter expert.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I added a comment before "!wz" lines. Thanks!!
In fact, these lines are used to calculate the effective momentum roughness length z0m proposed by Zheng et al.
(2012, https://doi.org/10.1029/2011JD015901). However, the effective z0m formulation is applied only for land, rather than for ice.
Moreover, since "shdmax" is zero over ice, these lines of code yield that z0max is actually 0.01 which is the momentum roughness length over bare soil (z0g) and not related to the ice momentum roughness length.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.


z0max = max(z0max, zmin)

Expand Down