-
Notifications
You must be signed in to change notification settings - Fork 157
cam6_4_098: CAM updates to bring in CCPP-ized RRTMGP longwave modules #1290
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
Open
peverwhee
wants to merge
37
commits into
ESCOMP:cam_development
Choose a base branch
from
peverwhee:rrtmgp-lw
base: cam_development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 31 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
247774e
use ccppized init
peverwhee dfb5130
merge to 060
peverwhee f2a263c
Merge remote-tracking branch 'ESCOMP/cam_development' into rrtmgp-lw
peverwhee 5e9bc69
Merge remote-tracking branch 'ESCOMP/cam_development' into rrtmgp-lw
peverwhee eb8cc7c
rrtmgp_inputs incorporation validated
peverwhee 7a7713c
lw cloud optics mostly done
peverwhee a17c311
commit everything; will disentangle what goes into ccpp-physics later
peverwhee 9e95339
rrtmgp lw works!
peverwhee 67a5336
add initial attempt at type wrappers; code runs but answers are wrong
peverwhee 3b10681
finish object wrappers; answers now match again
peverwhee 256326f
remove duplicate code; add in fix from cam_development
peverwhee bc68ed5
merge to head of cam_development
peverwhee d3ffdbd
code clean-up and adding comments
727c0f1
move ccppized schemes to atmospheric_physics; fix indexing issues; cl…
peverwhee 75e7838
update atmos_phys hash
peverwhee 217b141
update interface to calculate current calendar day on "host" side
peverwhee 6deb499
remove unused variable
peverwhee 56a02b6
merge to head of cam_development
peverwhee 4961167
subset arrays in call to ccpp layers
peverwhee 0502595
handle conditionally present pbuf fields
peverwhee 42636a1
fix interface bug; remove unnecessary argument from cloud optics scheme
peverwhee 6c6fa44
update atmospheric physics hash
peverwhee 47922f0
update hash; add interstitial q variables
peverwhee 7ae42ac
merge to head of cam_development
peverwhee 51e82ec
Merge remote-tracking branch 'ESCOMP/cam_development' into rrtmgp-lw
peverwhee 78bff29
update hash
peverwhee f22d280
Merge remote-tracking branch 'ESCOMP/cam_development' into rrtmgp-lw
1232b5b
address review comments
30ac479
subset arguments to ncol
peverwhee c7f1db2
address review comments
peverwhee 5349cfe
update to latest atmos_phys hash; merge forward
peverwhee fe44371
take another stab at the open acc directives
peverwhee 13d9de0
fixes to appease the nag compiler; update atmos_phys hash
dcbbf60
update acc directives; remove redundant lowercasing
peverwhee 669f850
Merge remote-tracking branch 'origin/rrtmgp-lw' into rrtmgp-lw
peverwhee 1b579d0
address reviewer comments
31f5513
update git-fleximod
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
Submodule atmos_phys
updated
107 files
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 |
---|---|---|
|
@@ -37,6 +37,7 @@ module cloud_rad_props | |
get_snow_optics_sw, & | ||
snow_cloud_get_rad_props_lw, & | ||
get_grau_optics_sw, & | ||
get_mu_lambda_weights, & | ||
grau_cloud_get_rad_props_lw | ||
|
||
|
||
|
@@ -77,15 +78,26 @@ module cloud_rad_props | |
contains | ||
!============================================================================== | ||
|
||
subroutine cloud_rad_props_init() | ||
|
||
subroutine cloud_rad_props_init(nmu_out, nlambda_out, n_g_d_out, & | ||
abs_lw_liq_out, abs_lw_ice_out, g_mu_out, g_lambda_out, & | ||
g_d_eff_out, tiny_out) | ||
use netcdf | ||
use spmd_utils, only: masterproc | ||
use ioFileMod, only: getfil | ||
use error_messages, only: handle_ncerr | ||
use cam_abortutils, only: handle_allocate_error | ||
#if ( defined SPMD ) | ||
use mpishorthand | ||
#endif | ||
integer, intent(out) :: nmu_out | ||
integer, intent(out) :: nlambda_out | ||
integer, intent(out) :: n_g_d_out | ||
real(r8), allocatable, intent(out) :: abs_lw_liq_out(:,:,:) | ||
real(r8), allocatable, intent(out) :: abs_lw_ice_out(:,:) | ||
real(r8), allocatable, intent(out) :: g_mu_out(:) | ||
real(r8), allocatable, intent(out) :: g_lambda_out(:,:) | ||
real(r8), allocatable, intent(out) :: g_d_eff_out(:) | ||
real(r8), intent(out) :: tiny_out | ||
|
||
character(len=256) :: liquidfile | ||
character(len=256) :: icefile | ||
|
@@ -103,6 +115,7 @@ subroutine cloud_rad_props_init() | |
|
||
integer :: err | ||
character(len=*), parameter :: sub = 'cloud_rad_props_init' | ||
character(len=512) :: errmsg | ||
|
||
liquidfile = liqopticsfile | ||
icefile = iceopticsfile | ||
|
@@ -278,6 +291,26 @@ subroutine cloud_rad_props_init() | |
call mpibcast(abs_lw_ice, n_g_d*nlwbands, mpir8, 0, mpicom, ierr) | ||
#endif | ||
|
||
! Set output variables | ||
tiny_out = tiny | ||
nmu_out = nmu | ||
nlambda_out = nlambda | ||
n_g_d_out = n_g_d | ||
allocate(abs_lw_liq_out(nmu,nlambda,nlwbands), stat=ierr, errmsg=errmsg) | ||
call handle_allocate_error(ierr, sub, 'abs_lw_liq_out') | ||
abs_lw_liq_out = abs_lw_liq | ||
allocate(abs_lw_ice_out(n_g_d,nlwbands), stat=ierr, errmsg=errmsg) | ||
call handle_allocate_error(ierr, sub, 'abs_lw_ice_out') | ||
abs_lw_ice_out = abs_lw_ice | ||
allocate(g_mu_out(nmu), stat=ierr, errmsg=errmsg) | ||
call handle_allocate_error(ierr, sub, 'g_mu_out') | ||
g_mu_out = g_mu | ||
allocate(g_lambda_out(nmu,nlambda), stat=ierr, errmsg=errmsg) | ||
call handle_allocate_error(ierr, sub, 'g_lambda_out') | ||
g_lambda_out = g_lambda | ||
allocate(g_d_eff_out(n_g_d), stat=ierr, errmsg=errmsg) | ||
call handle_allocate_error(ierr, sub, 'g_d_eff_out') | ||
g_d_eff_out = g_d_eff | ||
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 don't think we need the |
||
return | ||
|
||
end subroutine cloud_rad_props_init | ||
|
@@ -728,28 +761,21 @@ end subroutine gam_liquid_sw | |
!============================================================================== | ||
|
||
subroutine get_mu_lambda_weights(lamc, pgam, mu_wgts, lambda_wgts) | ||
use radiation_utils, only: get_mu_lambda_weights_ccpp | ||
real(r8), intent(in) :: lamc ! prognosed value of lambda for cloud | ||
real(r8), intent(in) :: pgam ! prognosed value of mu for cloud | ||
! Output interpolation weights. Caller is responsible for freeing these. | ||
type(interp_type), intent(out) :: mu_wgts | ||
type(interp_type), intent(out) :: lambda_wgts | ||
|
||
integer :: ilambda | ||
real(r8) :: g_lambda_interp(nlambda) | ||
|
||
! Make interpolation weights for mu. | ||
! (Put pgam in a temporary array for this purpose.) | ||
call lininterp_init(g_mu, nmu, [pgam], 1, extrap_method_bndry, mu_wgts) | ||
|
||
! Use mu weights to interpolate to a row in the lambda table. | ||
do ilambda = 1, nlambda | ||
call lininterp(g_lambda(:,ilambda), nmu, & | ||
g_lambda_interp(ilambda:ilambda), 1, mu_wgts) | ||
end do | ||
character(len=512) :: errmsg | ||
integer :: errflg | ||
|
||
! Make interpolation weights for lambda. | ||
call lininterp_init(g_lambda_interp, nlambda, [lamc], 1, & | ||
extrap_method_bndry, lambda_wgts) | ||
call get_mu_lambda_weights_ccpp(nmu, nlambda, g_mu, g_lambda, lamc, pgam, mu_wgts, & | ||
lambda_wgts, errmsg, errflg) | ||
cacraigucar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if (errflg /= 0) then | ||
call endrun('get_mu_lambda_weights: ERROR message: '//errmsg) | ||
end if | ||
|
||
end subroutine get_mu_lambda_weights | ||
|
||
|
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 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.