-
Notifications
You must be signed in to change notification settings - Fork 376
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
EAMxx: add p3 process rates as outputs #6938
base: master
Are you sure you want to change the base?
Conversation
this impl is kind of hacky because we don't yet have the facility to request output fields adhoc and these fields are buried deep in the p3 impl; in the future, this could be edited to be done more smartly, but for now, this may be just enough...
|
@hassanbeydoun + @brhillman, after we get a review from Luca and/or Jim (or other reviewers), you can test this with dpxx or short runs. In the meanwhile, let me know if I missed something that we might as well add while at it? I expect Luca and Jim to request some edits, because this was a rushed impl. I don't have much time to make this super fancy or complicated, because the p3 source code is pretty convoluted. Actually, dealing with the hardcoded unit tests was probably the most challenging and wasted most of my time. I anticipate we will have to rewrite much of p3 and shoc in the future, because I don't think they're optimal (I'd argue both performance and code readability are much below what I'd think we should have) I know Cornard is working on a way to make this type of work less painful (i.e., by making adhoc diagnostic requests through the field manager). Once that's ready, we can rewrite this impl. But I wanted to get this out because I know people are interested in scientific analysis/validation around these rates asap. |
// if not, let's just use the buffer for the unused? field | ||
// TODO: check if this is actually okay and doesn't have uintended consequences | ||
// if we are not outputing these fields, we really don't care about their values | ||
// but would this have side effects or memory issues? idk | ||
// TODO: maybe just use more buffer and assign stuff? | ||
history_only.P3_qr2qv_evap = m_buffer.unused; | ||
history_only.P3_qi2qv_sublim = m_buffer.unused; | ||
history_only.P3_qc2qr_accret = m_buffer.unused; |
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 may be stupid as hell, so we might need to add more to the buffer or figure out an alternative
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.
Looks fine. If p3_extra_diags is off, we could just leave the views uninitialized. Then, in p3_main_part2, you could check if P3_qr2qv_evap is a "real" view (initialized and allocated) before doing the sets.
adds p3 process rates as outputs controlled by a runtime flag.
fixes #6936