-
Notifications
You must be signed in to change notification settings - Fork 16
Misc fix: 3-D input field read with dycore enabled; cam_in/cam_out from physics data & Add FADIAB test #424
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
base: development
Are you sure you want to change the base?
Conversation
…om physics data. Add FADIAB test Update comment
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 bug fixes @jimmielin! I have some questions and cleanup requests, but otherwise it looks good!
src/control/cam_comp.F90
Outdated
type(cam_out_t) :: cam_out ! Output from CAM to surface | ||
type(cam_in_t) :: cam_in ! Merged input state to CAM |
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.
Should these be declared here, or should they be coming from physics_types
? Maybe a better question is are these variables needed here at all? It looks like they are only used in a commented-out subroutine call, and my guess is that subroutine could just use cam_in
and cam_out
directly from physics_types
itself if it wanted to.
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.
It looks confusing here I think these should be inout arguments since they're passed in from the nuopc coupler. I'll update that part.
I don't know whether they're really needed - there's commented out code as you mentioned and I am not sure how CAM-SIMA will handle restarts (or does it already handle restarts?) -- this and the subsequent various phases have cam_in
and cam_out
passed as inout but I'm not sure what kind of role they play in CAM-SIMA, it just seems to exactly replicate the subroutine signatures for CAM.
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.
All arguments removed or switched to use
from physics_types!
src/control/cam_comp.F90
Outdated
type(cam_out_t), intent(inout) :: cam_out ! Output from CAM to surface | ||
type(cam_in_t), intent(inout) :: cam_in ! Input from surface to CAM |
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.
Are these arguments actually needed anymore? It doesn't look like they are being used anywhere.
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.
Looking at the ESCOMP/CAM version, it appears that there may be uses for these during future development of code which hasn't been ported yet. Your call on whether we keep them or not
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, I've removed all of the arguments. There is one that is passed down to the dycore, and I've changed that to a use
statement that works.
src/control/cam_comp.F90
Outdated
type(cam_out_t) :: cam_out ! Output from CAM to surface | ||
type(cam_in_t) :: cam_in ! Input from merged surface to CAM |
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.
Are these arguments actually needed? They don't appear to be used anywhere in the subroutine.
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.
In ESCOMP/CAM, these variable are used in cam_write_restart. Do we have writing restart implemented in CAM-SIMA yet? If not, and we think this is where restart will happen, then I propose we leave them in
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 use
statement from physics_types
will work, so I've removed all the arguments.
src/cpl/nuopc/atm_comp_nuopc.F90
Outdated
use cam_instance , only : cam_instance_init, inst_suffix, inst_index | ||
use cam_comp , only : cam_init, cam_run1, cam_run2, cam_run3, cam_run4, cam_final | ||
use cam_comp , only : cam_timestep_init, cam_timestep_final | ||
use physics_types , only : cam_out_t, cam_in_t |
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 need to bring in cam_out_t
and cam_in_t
if we are no longer declaring the variables in this module?
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, removed!
Co-authored-by: Jesse Nusbaumer <nusbaume@ucar.edu>
! | ||
!----------------------------------------------------------------------- | ||
use stepon, only: stepon_run3 | ||
use physics_types, only: cam_out ! Output from CAM to surface |
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 is an example that will work instead of passing in through the subroutine. In the end they're all the same object.
Tag name (required for release branches):
Originator(s): @jimmielin
Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):
This PR fixes a set of miscellaneous bugs that were preventing a standalone case to run with the SE dycore - namely, the FADIAB compset.
Previously the model would crash when reading any 3-D field in ncdata with the SE dycore
the vertical dimension was not being handled correctly in
infld_real8_3d
. Additionally, a dimensions name check was missing the rightindex
offset.pointer
attribute fromcam_in
andcam_out
throughoutcam_comp.F90
as this structure no longer has chunks in SIMA.cam_in
andcam_out
directly as allocated inphysics_types.F90
via the CAM registry. Otherwise there would bencdata
here to have test coverage for this functionality as it was fixed by this PR.Describe any changes made to build system: N/A
Describe any changes made to the namelist: N/A
List any changes to the defaults for the input datasets (e.g. boundary datasets): N/A
List all files eliminated and why: N/A
List all files added and what they do: N/A
List all existing files that have been modified, and describe the changes:
(Helpful git command:
git diff --name-status development...<your_branch_name>
)If there are new failures (compared to the
test/existing-test-failures.txt
file),have them OK'd by the gatekeeper, note them here, and add them to the file.
If there are baseline differences, include the test and the reason for the
diff. What is the nature of the change? Roundoff?
B4B except new tests
derecho/intel/aux_sima:
SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_intel.cam-outfrq_se_cslam (Overall: DIFF): new baseline
derecho/gnu/aux_sima:
SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam (Overall: DIFF): new baseline
If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:
CAM-SIMA date used for the baseline comparison tests if different than latest: