-
Notifications
You must be signed in to change notification settings - Fork 12
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
New const_get_index logic without cam_ccpp_cap dependency (in atmos_phys) #314
Merged
jimmielin
merged 4 commits into
ESCOMP:development
from
jimmielin:hplin/ccpp_const_index_ccppized
Oct 18, 2024
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e23f9ee
New const_get_index logic without cam_ccpp_cap dependency
jimmielin e6f3fc2
Add check for to_be_ccppized; update comments
jimmielin 98a0cd1
Address review comments; update .gitmodules to point to dev hash
jimmielin f96675a
Pass array to stringify
jimmielin 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 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 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 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 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -285,10 +285,14 @@ end function const_molec_weight | |||||||||
!####################################################################### | ||||||||||
|
||||||||||
subroutine const_get_index(name, cindex, abort, warning, caller) | ||||||||||
use shr_kind_mod, only: CX => SHR_KIND_CX | ||||||||||
use cam_abortutils, only: endrun | ||||||||||
use cam_logfile, only: iulog | ||||||||||
use cam_ccpp_cap, only: cam_const_get_index | ||||||||||
! from to_be_ccppized utility routine | ||||||||||
use ccpp_const_utils, only: ccpp_const_get_idx | ||||||||||
|
||||||||||
use shr_kind_mod, only: CX => SHR_KIND_CX | ||||||||||
use cam_abortutils, only: endrun | ||||||||||
use cam_logfile, only: iulog | ||||||||||
use phys_vars_init_check, only: std_name_len | ||||||||||
use string_utils, only: to_str | ||||||||||
|
||||||||||
! Get the index of a constituent with standard name, <name>. | ||||||||||
! Setting optional <abort> argument to .false. returns control to | ||||||||||
|
@@ -298,11 +302,11 @@ subroutine const_get_index(name, cindex, abort, warning, caller) | |||||||||
! instead of <subname> in messages. | ||||||||||
|
||||||||||
!-----------------------------Arguments--------------------------------- | ||||||||||
character(len=*), intent(in) :: name ! constituent name | ||||||||||
integer, intent(out) :: cindex ! global constituent ind | ||||||||||
logical, optional, intent(in) :: abort ! flag controlling abort | ||||||||||
character(len=*), intent(in) :: name ! constituent name | ||||||||||
integer, intent(out) :: cindex ! global constituent index | ||||||||||
logical, optional, intent(in) :: abort ! flag controlling abort | ||||||||||
logical, optional, intent(in) :: warning ! flag controlling warning | ||||||||||
character(len=*), optional, intent(in) :: caller ! calling routine | ||||||||||
character(len=*), optional, intent(in) :: caller ! calling routine | ||||||||||
|
||||||||||
!---------------------------Local workspace----------------------------- | ||||||||||
logical :: warning_on_error | ||||||||||
|
@@ -312,10 +316,14 @@ subroutine const_get_index(name, cindex, abort, warning, caller) | |||||||||
character(len=*), parameter :: subname = 'const_get_index: ' | ||||||||||
!----------------------------------------------------------------------- | ||||||||||
|
||||||||||
! Find tracer name in the master table | ||||||||||
call cam_const_get_index(name, cindex, errcode=errcode, errmsg=errmsg) | ||||||||||
call ccpp_const_get_idx(const_props, name, cindex, errmsg, errcode) | ||||||||||
|
||||||||||
if (errcode /= 0) then | ||||||||||
call endrun(subname//"Error "//to_str(errcode)//": "// & | ||||||||||
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 use
Suggested change
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. Thanks, updated! |
||||||||||
trim(errmsg), file=__FILE__, line=__LINE__) | ||||||||||
endif | ||||||||||
|
||||||||||
if (cindex == -1) then | ||||||||||
! Unrecognized name, set an error return and possibly abort | ||||||||||
cindex = -1 | ||||||||||
if (present(abort)) then | ||||||||||
|
Oops, something went wrong.
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 think this should be
atm_phys_to_be_ccppized_dir
here: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.
Oops, my bad! Fixed