-
Notifications
You must be signed in to change notification settings - Fork 173
part of cam6_3_022: Update Held_Suarez to CCPP version #386
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,12 +40,15 @@ subroutine held_suarez_init(pbuf2d) | |
| use cam_history, only: addfld, add_default | ||
| use physconst, only: cappa, cpair | ||
| use ref_pres, only: pref_mid_norm, psurf_ref | ||
| use held_suarez, only: held_suarez_1994_init | ||
| use held_suarez_1994, only: held_suarez_1994_init | ||
|
|
||
| type(physics_buffer_desc), pointer :: pbuf2d(:,:) | ||
|
|
||
| character(len=512) :: errmsg | ||
| integer :: errflg | ||
|
|
||
| ! Set model constant values | ||
| call held_suarez_1994_init(cappa, cpair, psurf_ref, pref_mid_norm) | ||
| call held_suarez_1994_init(pver, cappa, cpair, psurf_ref, pref_mid_norm, errmsg, errflg) | ||
|
|
||
| ! This field is added by radiation when full physics is used | ||
| call addfld('QRS', (/ 'lev' /), 'A', 'K/s', & | ||
|
|
@@ -60,7 +63,7 @@ subroutine held_suarez_tend(state, ptend, ztodt) | |
| use physics_types, only: physics_ptend_init | ||
| use cam_abortutils, only: endrun | ||
| use cam_history, only: outfld | ||
| use held_suarez, only: held_suarez_1994 | ||
| use held_suarez_1994, only: held_suarez_1994_run | ||
|
|
||
| ! | ||
| ! Input arguments | ||
|
|
@@ -81,6 +84,9 @@ subroutine held_suarez_tend(state, ptend, ztodt) | |
| real(r8) :: pmid(pcols,pver) ! mid-point pressure | ||
| integer :: i, k ! Longitude, level indices | ||
|
|
||
| character(len=512) :: errmsg | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I might replace
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same response. |
||
| integer :: errflg | ||
|
|
||
| ! | ||
| !----------------------------------------------------------------------- | ||
| ! | ||
|
|
@@ -98,8 +104,8 @@ subroutine held_suarez_tend(state, ptend, ztodt) | |
| ! initialize individual parameterization tendencies | ||
| call physics_ptend_init(ptend, state%psetcols, 'held_suarez', ls=.true., lu=.true., lv=.true.) | ||
|
|
||
| call held_suarez_1994(pcols, ncol, clat, state%pmid, & | ||
| state%u, state%v, state%t, ptend%u, ptend%v, ptend%s) | ||
| call held_suarez_1994_run(pver, ncol, clat, state%pmid, & | ||
| state%u, state%v, state%t, ptend%u, ptend%v, ptend%s, errmsg, errflg) | ||
|
|
||
| ! Note, we assume that there are no subcolumns in simple physics | ||
| pmid(:ncol,:) = ptend%s(:ncol, :)/cpairv(:ncol,:,lchnk) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 might replace
512here withSHR_KIND_CX.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.
@nusbaume, the issue here is that we don't have symbolic sizes in the metadata. Hopefully, this will be fixed at some point.
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.
@goldy that makes sense to me when it comes to CAMDEN, but why would that matter for CAM, given that it is just using the fortran code directly (so the metadata is never involved)?
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.
That is true but it is good if the code reflects what is in CCPP so we can easily find and fix these interfaces when the CCPP changes. Not a big deal either way IMHO.
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.
Totally agree that this is not really a big deal. If @cacraigucar just wants to merge this without worrying about these particular changes then that is fine with me!