-
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
base: cam_development
Are you sure you want to change the base?
Conversation
…ean-up cesm-log logging; add rrtmgp paths to configure
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.
First section of review - have not reviewed the big sections yet
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 @peverwhee! I had a few requests related to code style and comments, but nothing that requires a re-review.
src/physics/cam/cloud_rad_props.F90
Outdated
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 comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need the errmsg
output here as it isn't actually being used anywhere.
src/physics/rrtmgp/radconstants.F90
Outdated
!========================================================================================= | ||
|
||
subroutine get_sw_spectral_boundaries(low_boundaries, high_boundaries, units) | ||
subroutine get_sw_spectral_boundaries(low_boundaries, high_boundaries, units) |
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 the indent here? It looked like it was already lined-up correctly (but maybe that is just Github fooling me)?
src/physics/rrtmgp/radconstants.F90
Outdated
use radiation_utils, only: get_sw_spectral_boundaries_ccpp | ||
use radiation_utils, only: get_lw_spectral_boundaries_ccpp |
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.
To better match the (newer) CAM coding standards, should we move these two use
statements down into their respective CAM subroutines (i.e. lessen their scope)?
@@ -319,7 +170,7 @@ subroutine rad_gas_get_vmr(icall, gas_name, state, pbuf, nlay, numactivecols, ga | |||
integer, intent(in) :: nlay ! number of layers in radiation calculation | |||
integer, intent(in) :: numactivecols ! number of columns, ncol for LW, nday for SW | |||
|
|||
type(ty_gas_concs), intent(inout) :: gas_concs ! the result is VRM inside gas_concs | |||
type(ty_gas_concs_ccpp), intent(inout) :: gas_concs ! the result is VRM inside gas_concs |
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'm pretty sure the comment here is referring to "Volume Mixing Ratios":
type(ty_gas_concs_ccpp), intent(inout) :: gas_concs ! the result is VRM inside gas_concs | |
type(ty_gas_concs_ccpp), intent(inout) :: gas_concs ! the result is VMR inside gas_concs |
@@ -625,6 +338,7 @@ subroutine rrtmgp_set_cloud_sw( & | |||
integer, intent(in) :: nlay ! number of layers in radiation calculation (may include "extra layer") | |||
integer, intent(in) :: nday ! number of daylight columns | |||
integer, intent(in) :: idxday(pcols) ! indices of daylight columns in the chunk | |||
integer, intent(in) :: nswgpts |
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.
Add a comment here? for example:
integer, intent(in) :: nswgpts | |
integer, intent(in) :: nswgpts ! number of shortwave g-points |
@@ -1173,17 +1179,17 @@ subroutine radiation_tend( & | |||
|
|||
! Compute the gas optics (stored in atm_optics_sw). | |||
! toa_flux is the reference solar source from RRTMGP data. | |||
!$acc data copyin(kdist_sw,pmid_day,pint_day,t_day,gas_concs_sw) & | |||
!$acc copy(atm_optics_sw) & | |||
!$acc data copyin(kdist_sw%gas_props,pmid_day,pint_day,t_day,gas_concs_sw%gas_concs) & |
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.
Just adding a note here that we should double-check with CISL that this is the correct way to handle the OpenACC calls.
Summary
Brings in (via atmospheric_physics) new CCPP-ized longwave routines. Modifies CAM side to use new CCPP interfaces, while maintaining RRTMG functionality.
Addresses #1192
Main modules updated:
Updates configure as well to include new rrtmgp paths (always build utils because RRTMG requires access to radiation_utils.F90)
Testing
Tests are b4b.