-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fix for sigma_i going to zero in ITD landfast ice. #189
Conversation
kshedstrom
commented
Dec 2, 2022
- We can't divide by zero, so don't let sigma_i be zero.
- We can't divide by zero, so don't let sigma_i be zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand why this change is necessary. When I look at the code as a whole, I see that the expression for sigma_i about 20 lines above this change, sigma_i = max(sqrt(log(1.0 + v_i/m_i**2)), CS%puny)
at line 1959 of this same file, already includes a max with CS%puny
, and I am not seeing anythng between these lines that changes the value of sigma_i
. What am I missing here?
Yes, you are right. I don't remember how I thought sigma_i was getting a zero, except that it was thin new ice. |
Now I remember - thin new ice lead to v_i being zero. |
Sorry, @Hallberg-NOAA, getting my branches confused. How about this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes much more sense than the previous version!
@kshedstrom Could you do something like this?
It would avoid the need for |
This isn't the exact form I tested, given that I need the new SIS_restart code. It's in the queue for a longer test. |
Thanks for testing it out, let's see what happens 😅. However, I think the better test would be to remove I was thinking that the |
Try that one? |
That's what I had in mind, I guess the question is whether it fixed your problem without creating any new ones? |
My short job ran fine, a longer one is stuck in the queue. |
Yes, the year-long job finished successfully! |
Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/SIS2/-/pipelines/19489 ✔️ |
@kshedstrom Can I squash-merge this one? |
Yes, of course. |