-
Notifications
You must be signed in to change notification settings - Fork 148
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
cam6_3_134: Update atmospheric_physics external #891
Conversation
…ric_physics' external.
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.
We had some committed code which had the 1:ncol error as well as more places you added code. This should be all of them in this PR.
Basically the rule of thumb is that any run methods which have arrays dimensioned by pcols in CAM, need to have that subsetted by 1:ncol in the call. (BTW, my ZM conversion doesn't have pcols removed from the lower layer yet - that will come with the metadata creation step - I went and checked!)
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.
A couple of non-critical questions/comments about the constituent_prop_mod stub.
if(present(errmsg)) then | ||
errmsg = 'Still Not Used!' | ||
end if |
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 get why this error message exists for ccp_get_standard_name, but why these other subroutines?
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.
Good point! I've changed the error messages to just be empty strings in order to avoid confusion (and to hint that CAM doesn't actually use these specific error messages). If however you think I should actually be generating and using an error message variable here and in CAM then please let me know.
subroutine ccp_get_standard_name(this, std_name, errcode, errmsg) | ||
! Return this constituent's standard name | ||
|
||
! Dummy arguments | ||
class(ccpp_constituent_prop_ptr_t), intent(in) :: this | ||
character(len=*), intent(out) :: std_name | ||
integer, optional, intent(out) :: errcode | ||
character(len=*), optional, intent(out) :: errmsg | ||
|
||
std_name = 'Not Used!' | ||
|
||
! Provide err values if requested: | ||
if(present(errcode)) then | ||
errcode = 0 | ||
end if | ||
if(present(errmsg)) then | ||
errmsg = 'Still Not Used!' | ||
end if | ||
|
||
end subroutine ccp_get_standard_name |
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.
Why do we need this at all?
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.
Because in CAM we are building (but not running) the CCPP-ized version of qneg
, which uses the standard_name
constituent property, which in-turn is pointing to this subroutine (in the same way that the real CCPP constituents object points to a subroutine).
So without a subroutine like this the CAM build will fail. I could simplify it further, but I also imagine in the future we'll have physics schemes which will really need to use this subroutine, or something like it, which is why I kept it in there.
Hopefully that makes sense? If you still think it would be a good idea to simplify it even further then just let me know.
@jtruesdal just pinging you about reviewing this PR when you get the chance! |
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.
Thanks for the ping. Looks good.
This commit renames time_mod in the SE dycore to dyn_time_mod in order to avoid naming conflicts with building with GEOS-Chem. All USE statements updated; zero differences in run output are expected.
Signed-off-by: Haipeng Lin <[email protected]>
Merge pull request ESCOMP#891 from nusbaume/atmos_phys_update cam6_3_134: Update atmospheric_physics external ESCOMP commit: 1e09295
This PR updates the atmospheric_physics external in CAM, which requires some source modifications on the CAM-side. There has also been some replacement of CAM code with CCPP physics routines in order to reduce duplication.
Finally, this PR also fixes a bug found in Kessler where it was using the wrong pressure when converting to/from potential temperature via the exner function.
Fixes #752
Fixes #802
Closes #904