Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ustar_prev to while loop in icepack_atmo #341

Merged
merged 1 commit into from
Nov 10, 2020
Merged
Changes from all commits
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
3 changes: 2 additions & 1 deletion columnphysics/icepack_atmo.F90
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ subroutine atmo_boundary_layer (sfctype, &

k = 1
do while (abs(ustar - ustar_prev)/ustar > atmiter_conv .and. k <= natmiter)
k = k + 1
ustar_prev = ustar
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like a bug fix! Thanks for catching this. Why are these two lines not at the end of the loop though?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ustar_prev = ustar can't be at the end of the loop, because it would not be ustar_prev if it was. It doesn't matter if k=k+1 is at the start or end of the loop, but I have changed this so that it is consistent with the ocean coupling routine while loop now in CIME.

Copy link
Contributor

Choose a reason for hiding this comment

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

You are correct! Looks good. Approving.


! compute stability & evaluate all stability functions
hol = vonkar * gravit * zlvl &
Expand Down Expand Up @@ -301,7 +303,6 @@ subroutine atmo_boundary_layer (sfctype, &
tstar = rh * delt
qstar = re * delq

k = k + 1
enddo ! end iteration

if (calc_strair) then
Expand Down