-
Notifications
You must be signed in to change notification settings - Fork 51
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
zenith angle time correction #123
zenith angle time correction #123
Conversation
Thanks a lot for helping to push this forward, @jedwards4b . I think more appropriate reviewers here would be @ekluzek and @swensosc so I'm going to request reviews from them instead of me. In terms of documenting answer changes: my understanding is that this is more than roundoff-level changes; @swensosc, is that correct? We had also talked about getting sign-off from people in the ocean group (@mnlevy1981 @alperaltuntas @klindsay28 or others) and sea ice (@dabail10 ), so I'll add them as possible reviewers. All: feel free to remove yourself or suggest someone else if you feel someone else would be a more appropriate reviewer. |
Here are plots provided by @swensosc |
yes, I expect this is answer changing, because it is changing the incoming
solar radiation when the coszen interpolation is used. I agree that it
would be best to have others who use this time interpolation to review and
sign off on it before bringing it to main.
…On Fri, Oct 1, 2021 at 1:15 PM Bill Sacks ***@***.***> wrote:
Thanks a lot for helping to push this forward, @jedwards4b
<https://github.com/jedwards4b> . I think more appropriate reviewers here
would be @ekluzek <https://github.com/ekluzek> and @swensosc
<https://github.com/swensosc> so I'm going to request reviews from them
instead of me.
In terms of documenting answer changes: my understanding is that this is
more than roundoff-level changes; @swensosc <https://github.com/swensosc>,
is that correct?
We had also talked about getting sign-off from people in the ocean group (
@mnlevy1981 <https://github.com/mnlevy1981> @alperaltuntas
<https://github.com/alperaltuntas> @klindsay28
<https://github.com/klindsay28> or others) and sea ice ***@***.***
<https://github.com/dabail10> ), so I'll add them as possible reviewers.
All: feel free to remove yourself or suggest someone else if you feel
someone else would be a more appropriate reviewer.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#123 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGRN57GM3EF2QAHIUBT7RYDUEYCF3ANCNFSM5FFJXYQA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@@ -1255,7 +1255,7 @@ subroutine shr_strdata_readLBUB(sdat, ns, mDate, mSec, newData, istr, rc) | |||
call ESMF_TraceRegionExit(trim(istr)//'_setup') | |||
|
|||
! if model current date is outside of model lower or upper bound - find the stream bounds | |||
if (rDateM < rDateLB .or. rDateM > rDateUB) then | |||
if (rDateM < rDateLB .or. rDateM >= rDateUB) then |
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've convinced myself this change is correct. Because, it will update the data when rDateM == rDateUB. So this should be done in preparation of that.
!--- advance to next time in [LB,UB] --- | ||
ymd0 = ymd | ||
tod0 = tod | ||
reday0 = reday | ||
call shr_cal_advDateInt(ldt,'seconds',ymd0,tod0,ymd,tod,calendar) | ||
call shr_cal_timeSet(reday,ymd,tod,calendar) | ||
|
||
if (reday > reday2) then |
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.
OK, looking at this, the reason the previous code is wrong is that it's essentially doing the interval (LB,UB] so not starting at ldt after LB (Lower bound) (so LB is exclusive) and continuing until UB (Upper Bound) inclusive. So LB exclusive and UB inclusive. But, once you reach the UB, you go to the next interval. So it should be [LB,UB) LB inclusive, and UB exclusive, which is what the new code changes do.
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 approve this, but as it's answer changing for several components, we need to bring it in as it's own tag in CESM where answer changes are allowed.
@mnlevy1981 @dabail10 and @alperaltuntas can you review this? I'd also like to hear if you agree with the comments I added where I explain why I thought the new changes are correct. @swensosc can you explain your plots that Jim included a little further? It looks like the magenta plots are the current behavior in pages 3 and 5. If I'm reading it right then pages 4 and 6 are the new behavior. But, what's black and blue correspond to? They looked more displaced to me, so why is this better? |
on page 4 the blue is the three hourly forcing. The time step forcing
should change when the three hourly forcing changes. The black is the new
behavior and the magenta is the old behavior on page 4 also. It shows that
the individual sections of the coszen interpolation are shifted by a time
step for the new vs old behavior, and that the new behavior leads to the
interpolation changing at the same time as the forcing data, while the old
behavior is delayed by a time step.
…On Fri, Oct 1, 2021 at 4:01 PM Erik Kluzek ***@***.***> wrote:
@mnlevy1981 <https://github.com/mnlevy1981> @dabail10
<https://github.com/dabail10> and @alperaltuntas
<https://github.com/alperaltuntas> can you review this? I'd also like to
hear if you agree with the comments I added where I explain why I thought
the new changes are correct.
@swensosc <https://github.com/swensosc> can you explain your plots that
Jim included a little further? It looks like the magenta plots are the
current behavior in pages 3 and 5. If I'm reading it right then pages 4 and
6 are the new behavior. But, what's black and blue correspond to? They
looked more displaced to me, so why is this better?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#123 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGRN57ACA4UYDFGOYYVS2DDUEYVSHANCNFSM5FFJXYQA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
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 confirm that this PR resolves the issues I posted earlier:
#35
ESMCI/cime#3802
@swensosc thanks for that explanation. Now, that I understand the plots I agree that the new behavior is better than the old. @alperaltuntas confirmation that it fixes an issue he found as well, confirms this is correct even more. |
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.
Do we have a unit test of this to print out the values at a particular lat/lon? It generally looks good to me.
@klindsay28 and I looked through this code, and have some experiments in mind to determine the extent to which this will change answers in POP... but given @alperaltuntas's assessment that it fixes a bug with the |
Revert PR #123 ### Description of changes PR #123 (solar zenith angle correction) led to exact restart failures in some situations: see #144. This PR backs out the changes from #123 . ### Specific notes Contributors other than yourself, if any: CDEPS Issues Fixed (include github issue #): Temporarily deals with #144. Are there dependencies on other component PRs (if so list): no Are changes expected to change answers (bfb, different to roundoff, more substantial): more substantial. I have verified that this brings answers back to being bfb with those in cdeps0.12.35 (i.e., prior to #123) via a run of the aux_clm test suite. Any User Interface Changes (namelist or namelist defaults changes): no Testing performed (e.g. aux_cdeps, CESM prealpha, etc): aux_clm Hashes used for testing: billsacks/ctsm@3fd7f6fbf
Description of changes
Corrects the calculation of solar zenith angle, which was off by one timestep.
Specific notes
Sean ran two five day simulations, with and without your cdeps changes. The changes correct the bug.
Contributors other than yourself, if any: Sean Swenson
CDEPS Issues Fixes #120 #35
Are there dependencies on other component PRs
Are changes expected to change answers?
Any User Interface Changes (namelist or namelist defaults changes)?
Testing performed:
Hashes used for testing: