Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
12c7973
bring in ccppized fortran for rrtmgp
peverwhee Apr 3, 2025
4144fc1
wee cleanup
peverwhee Apr 4, 2025
ea93c74
mods to remove missed time_manager dependency
peverwhee Apr 6, 2025
65edaa1
Merge remote-tracking branch 'atmospheric_physics/development' into r…
peverwhee Apr 6, 2025
28a3dfd
remove use statement
peverwhee Apr 6, 2025
032a252
remove unused variable
peverwhee Apr 7, 2025
d058a41
move cam_out calculation from diagnostics to post
peverwhee Apr 8, 2025
8d2d25c
remove ncol subsetting on ccpp side
peverwhee Apr 10, 2025
0371fd8
remove unnecessary use statement
peverwhee Apr 15, 2025
49e6ec2
remove unnecessary argument from lw cloud optics scheme
peverwhee Apr 22, 2025
0acd798
update to latest rrtmg-lw
peverwhee Apr 24, 2025
d3f0abf
preliminary metadata
cacraigucar May 2, 2025
97ff253
more metadata mods for longwave
cacraigucar May 6, 2025
e07981d
address reviewer comments
peverwhee May 12, 2025
205ad1f
add comment to rad utils routine
peverwhee May 12, 2025
08bc031
simplify rte solver logic
peverwhee May 13, 2025
e247fca
main rte solver scheme cleanup
peverwhee May 13, 2025
665793d
address reviewer comments for rrtmgp_inputs
peverwhee May 13, 2025
9ba97ef
rrtmgp_inputs cleanup
peverwhee May 13, 2025
90ffd79
Merge remote-tracking branch 'atmospheric_physics/development' into r…
peverwhee May 13, 2025
43a2f1b
fix rte_lw logic
peverwhee May 14, 2025
09e64f7
fix input argument
peverwhee May 14, 2025
492cd5b
move io reader to new directory not compiled by CAM
peverwhee May 15, 2025
bdfce0f
merge up; add initial diag and constituent schemes
peverwhee May 15, 2025
7c53dbf
merge to head of rrtmgp-lw
peverwhee May 15, 2025
6c470fd
some metadata fixes and adding more namelist entries
peverwhee May 15, 2025
3896330
Merge remote-tracking branch 'atmospheric_physics/development' into r…
peverwhee May 16, 2025
6712a83
move io reader back
peverwhee May 16, 2025
f229d39
update gas optics code to use file io reader
peverwhee May 18, 2025
4e628d7
add sw gas optics
peverwhee May 19, 2025
787d876
update gas optics scheme to use logical kind
peverwhee May 20, 2025
cf0f66c
use file io reader for cloud optics
peverwhee May 29, 2025
e920942
merge in fileio stuff
peverwhee May 29, 2025
35d186f
remove unused file
peverwhee May 29, 2025
9c4d2e6
update metadata; create interstitial to make rad_const_array
peverwhee May 29, 2025
d38980d
add missing use statements
peverwhee May 30, 2025
67a5178
Merge remote-tracking branch 'ESCOMP/development' into rrtmgp-lw
peverwhee May 30, 2025
757f70c
initial round of fixes to get sima to build
Jun 5, 2025
577ce00
Merge remote-tracking branch 'origin/rrtmgp-fileio' into rrtmgp-diagn…
Jun 5, 2025
f7c1b65
merge up
Jun 5, 2025
9ac4b56
framework successfully generates caps
Jun 6, 2025
cce8c99
add temporary gitmodules file
Jun 6, 2025
952f5b7
update dependencies, initial submodule
Jun 6, 2025
4d4f244
update gitmodules
Jun 6, 2025
61aea3a
fix sparse checkout file
Jun 6, 2025
b50b702
add hooks
Jun 6, 2025
04bb4ca
update the relative path to rrtmgp external
Jun 6, 2025
1a05947
disable sparse checkout for testing git-fleximod
Jun 6, 2025
b70cea4
add sparse checkout back
Jun 6, 2025
a22d70f
rrtmgp-lw physics builds
Jun 9, 2025
58826e2
merge up
peverwhee Jun 23, 2025
ae847e6
fix memory leak
peverwhee Jun 23, 2025
db86454
fix calling list
peverwhee Jun 30, 2025
71e4edc
merge up
peverwhee Jun 30, 2025
e504efb
add logical kind
peverwhee Jun 30, 2025
9cfcb2e
add missing use statements
peverwhee Jun 30, 2025
6d6b5d1
remove duplicate free_optics_lw call
peverwhee Jun 30, 2025
a753b2f
remove unused gaslist argument left over from merge
peverwhee Jun 30, 2025
6d34fb7
add shortwave modules
Jul 1, 2025
6e4e493
working cloud optics and mcica subcol gen modules
Jul 8, 2025
9135821
working gas optics run and modified solar var
Jul 10, 2025
74c16d2
address reviewer comments
peverwhee Jul 11, 2025
67617d3
change remaining .eq. references
peverwhee Jul 11, 2025
90efd1e
missing parameter reference
peverwhee Jul 11, 2025
3d5a016
working shortwave gas optics pre
Jul 11, 2025
1a67731
working sw main rte
Jul 13, 2025
912bec2
update comments
Jul 14, 2025
e324603
rename main to rte and add git modules file
Jul 14, 2025
f18d36a
merge to head of rrtmgp-fileio
Jul 14, 2025
37ad426
cleanup and units
Jul 14, 2025
b41241a
standard name fix
Jul 15, 2025
ac661eb
merge to head of rrtmgp-sw
Jul 15, 2025
a3df1ac
Merge remote-tracking branch 'ESCOMP/development' into rrtmgp-diagnos…
Jul 15, 2025
e750700
add missing argument declaration
peverwhee Jul 15, 2025
c5363d2
remove duplicate ncol declaration
peverwhee Jul 15, 2025
403130e
address review comments; remove deallocation statements in anticipati…
peverwhee Jul 17, 2025
a2cc351
use cloud optics variables instead of passing them around
Jul 22, 2025
86fc6f9
cleanup, fixes to get use statements to work
Jul 24, 2025
4af2073
change allocatable file io object to pointer
Jul 24, 2025
98470f5
updates to get sima to build; will merge in new file-io updates
peverwhee Jul 25, 2025
e5b5583
Merge remote-tracking branch 'ESCOMP/development' into rrtmgp-fileio
peverwhee Aug 1, 2025
81daf38
Merge remote-tracking branch 'ESCOMP/development' into rrtmgp-fileio
peverwhee Aug 1, 2025
46f5a66
modify file i/o interface to match
peverwhee Aug 1, 2025
8f302be
fix int2log type
peverwhee Aug 5, 2025
67b812d
lw answers match for 2 timesteps running radiation
peverwhee Aug 7, 2025
be18873
merge up
peverwhee Aug 8, 2025
bb33f13
add initialize_constituents scheme to rrtmgp sdf
peverwhee Aug 9, 2025
18ee2e1
add/update diagnostic schemes
peverwhee Aug 9, 2025
107b662
merge in rrtmgp-fileio branch
peverwhee Aug 11, 2025
ab5c984
Merge remote-tracking branch 'origin/rrtmgp-diagnostics' into sw-diag…
peverwhee Aug 11, 2025
d0fce42
initial metadata commit
peverwhee Aug 11, 2025
d491b84
perhaps don't redundantly calculate things
peverwhee Aug 12, 2025
2605f3f
more sw metadata
peverwhee Aug 12, 2025
29c0080
Merge remote-tracking branch 'origin/rrtmgp-diagnostics' into sw-diag…
peverwhee Aug 12, 2025
c5c15ea
sw diagnostic calculations
peverwhee Aug 12, 2025
3343e88
remove unused sparse checkout file
peverwhee Aug 22, 2025
f12de20
merge to head of development
peverwhee Aug 22, 2025
4b494f6
merge to head of development
peverwhee Aug 22, 2025
c08451b
remove unused argument
peverwhee Aug 22, 2025
ad12f78
update sw cloud optics to use setup variables
peverwhee Aug 23, 2025
688cb96
add in sw updates
peverwhee Aug 23, 2025
80277f9
merge in sw updates
peverwhee Aug 25, 2025
6cd02e8
add NL; appease metadata comparator
peverwhee Aug 25, 2025
28d69e2
merge in latest sw stuff
peverwhee Aug 25, 2025
6da0e2d
add rrtmgp submodule
peverwhee Aug 26, 2025
5bfab5a
merge to head of development
peverwhee Aug 26, 2025
81659a2
merge to head of development
peverwhee Aug 26, 2025
124e43a
Merge remote-tracking branch 'origin/rrtmgp-sw' into rrtmgp-diagnostics
peverwhee Aug 26, 2025
493db33
continuing solar irrad mods
peverwhee Aug 26, 2025
2459e55
address reviewer requests
peverwhee Sep 2, 2025
598993f
remove duplicate var
peverwhee Sep 2, 2025
3a5424d
add missing end if
peverwhee Sep 2, 2025
5458be3
add missing argument
peverwhee Sep 2, 2025
baec9b8
merge in latest sw mods
peverwhee Sep 2, 2025
8bf9bbd
working on getting rrtmgp to build with sw schemes
peverwhee Sep 2, 2025
d36b8d9
fix comment
peverwhee Sep 3, 2025
8d8771c
remove unnecessary comment
peverwhee Sep 3, 2025
f343c01
merge in development; update rrtmgp submodule version
peverwhee Sep 5, 2025
d65ef2f
update rrtmgp submodule
peverwhee Sep 5, 2025
3f9deba
remove top_at_1 from sw interface to reflect updated RRTMGP
peverwhee Sep 8, 2025
efe3b35
sima builds and runs
peverwhee Sep 11, 2025
f64aaff
Merge remote-tracking branch 'ESCOMP/development' into rrtmgp-sw
peverwhee Sep 22, 2025
51783ec
merge latest rrtmgp-sw mods
peverwhee Sep 22, 2025
a5af76a
zero out sw aerosols
peverwhee Sep 22, 2025
b62a6ed
fix metadata to match mods
peverwhee Sep 22, 2025
770ccaf
update default single scattering albedo
peverwhee Sep 22, 2025
4dc0b4c
some dimensions fixes; standrad name updates
peverwhee Sep 23, 2025
f85612d
Create tag for dme_adjust (#227)
cacraigucar Apr 4, 2025
62107eb
remove gas_mmr variable to fix rrtmgp bug
sjsprecious Oct 8, 2025
5b48970
correct rebase error
sjsprecious Oct 8, 2025
be1eca0
standard name fixes; cleanup
peverwhee Oct 8, 2025
aca8edf
merge in latest sw updates; bugfix from jian
peverwhee Oct 8, 2025
b20fc8f
mods to get answers to match
peverwhee Oct 11, 2025
b773615
fix diagnostic issues
peverwhee Oct 12, 2025
16c146f
add cloud diagnostics
peverwhee Oct 12, 2025
e154fb9
add missing dependencies
peverwhee Oct 13, 2025
8c95426
fix parallel issue
peverwhee Oct 14, 2025
fac586f
fix so do_snow is set properly; cloud diagnostics need a new idea!
peverwhee Oct 15, 2025
107dca4
add nday check to sw aerosol scheme
peverwhee Oct 18, 2025
12eca68
add loop variable
peverwhee Oct 18, 2025
b56f64b
get cloud diagnostics back
peverwhee Oct 20, 2025
bff238e
code clean up and adding missing dependencies
peverwhee Oct 20, 2025
b0cf14d
remove unused diagnostics
peverwhee Oct 20, 2025
d762894
clean up white space
peverwhee Oct 21, 2025
6029484
initialize irad value
peverwhee Oct 22, 2025
0831605
add support for gpu-enabled rrtmgp
peverwhee Oct 22, 2025
68fd028
remove h2o from nl source list; move gaslist to nl
peverwhee Oct 23, 2025
215a362
add rrtmgp to cam4 suite but comment it out until we get a working qp…
peverwhee Oct 23, 2025
9e8bf60
remove commented code
peverwhee Oct 23, 2025
7ffd338
Merge remote-tracking branch 'ESCOMP/development' into rrtmgp-diagnos…
peverwhee Oct 23, 2025
87a5214
initialize irad_always_out
peverwhee Oct 23, 2025
e3ab8e8
fix indents
peverwhee Oct 23, 2025
2bd1882
remove temp scheme
peverwhee Oct 23, 2025
b0a79e8
update dimension names
peverwhee Oct 24, 2025
0344b67
fix constituent units
peverwhee Nov 3, 2025
a679332
Fix bugs/error messages found during CAM4 aquaplanet testing.
nusbaume Nov 10, 2025
b0a631e
Always allocate 'we' variable in order to avoid CCPP runtime subsetti…
nusbaume Nov 20, 2025
066614c
merge to head of development
peverwhee Dec 8, 2025
76f3878
use existing rebin functionality
peverwhee Dec 8, 2025
18dc65d
address some review comments
peverwhee Dec 9, 2025
371f333
address further review comments
peverwhee Dec 11, 2025
7209787
fixes to get sima to work
peverwhee Dec 15, 2025
aabfd2f
remove save attribute
peverwhee Dec 15, 2025
5f06efa
Deallocate file_reader at init time if solar forcing is fixed.
nusbaume Dec 17, 2025
bc09f55
further review comments; move solar irradiance read to timestep init
peverwhee Dec 18, 2025
02ca994
Merge branch 'rrtmgp-diagnostics' of https://github.com/peverwhee/atm…
peverwhee Dec 18, 2025
a970769
add subroutine name to error message
peverwhee Dec 19, 2025
477ea3d
Merge remote-tracking branch 'ESCOMP/development' into rrtmgp-diagnos…
Dec 19, 2025
a385cf1
unify gpuized and cpuized schemes
peverwhee Dec 22, 2025
87ba8c1
merge to head of development
peverwhee Dec 22, 2025
436d090
merge in development branch
peverwhee Dec 22, 2025
58915fb
remove unused suite
peverwhee Dec 22, 2025
4ad6d2d
change standard name for constant and update units of fractional day …
peverwhee Jan 5, 2026
b45d07d
move optical props to copy directive
peverwhee Jan 13, 2026
063f591
remove returns within the acc blocks
peverwhee Jan 23, 2026
18eae2a
move optics to copyin
peverwhee Jan 27, 2026
6b856cf
remove optical props objs from acc directives
peverwhee Jan 29, 2026
2c729d8
Merge remote-tracking branch 'ESCOMP/main' into rrtmgp-gpu
peverwhee Jan 29, 2026
2762781
add space between else and if
peverwhee Jan 29, 2026
5677c3d
add clarifying comment about returning within acc directive block
peverwhee Jan 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions schemes/rrtmgp/rrtmgp_inputs_setup.meta
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
intent = in
[ current_cal_day ]
standard_name = fractional_calendar_days_on_end_of_current_timestep
units = 1
units = days
type = real | kind = kind_phys
dimensions = ()
intent = in
Expand Down Expand Up @@ -232,7 +232,7 @@
standard_name = shortwave_start_and_end_gpoint_for_each_band
units = index
type = integer
dimensions = (ccpp_constant_two,number_of_bands_for_shortwave_radiation)
dimensions = (constant_dimension_two,number_of_bands_for_shortwave_radiation)
intent = out
[ irad_always_out ]
standard_name = number_of_timesteps_to_force_radiation_calculation_after_initialization
Expand Down
8 changes: 8 additions & 0 deletions schemes/rrtmgp/rrtmgp_lw_gas_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,13 @@ subroutine rrtmgp_lw_gas_optics_run(dolw, iter_num, ncol, rrtmgp_phys_blksz, p_l
iCol = ((iter_num - 1) * rrtmgp_phys_blksz) + 1
iCol2= min(iCol + rrtmgp_phys_blksz - 1, ncol)

!$acc data copyin(lw_gas_props%gas_props, p_lay, p_lev, t_lay, &
!$acc tsfg, gas_concs%gas_concs) &
!$acc copy(sources%sources, sources%sources%lay_source, &
!$acc sources%sources%sfc_source, &
!$acc sources%sources%lev_source, &
!$acc sources%sources%sfc_source_jac)

if (include_interface_temp) then
errmsg = lw_gas_props%gas_props%gas_optics(&
p_lay(iCol:iCol2,:), & ! IN - Pressure @ layer-centers (Pa)
Expand Down Expand Up @@ -386,6 +393,7 @@ subroutine rrtmgp_lw_gas_optics_run(dolw, iter_num, ncol, rrtmgp_phys_blksz, p_l
errflg = 1
end if
end if
!$acc end data

end subroutine rrtmgp_lw_gas_optics_run

Expand Down
2 changes: 2 additions & 0 deletions schemes/rrtmgp/rrtmgp_lw_gas_optics.meta
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
type = scheme
dependencies = ext/rte-kernels/mo_rte_kind.F90
dependencies = objects/ccpp_gas_concentrations.F90
dependencies = ext/rte-kernels/accel/mo_optical_props_kernels.F90
dependencies = ext/rrtmgp-kernels/accel/mo_gas_optics_rrtmgp_kernels.F90

[ccpp-arg-table]
name = rrtmgp_lw_gas_optics_init
Expand Down
40 changes: 25 additions & 15 deletions schemes/rrtmgp/rrtmgp_lw_rte.F90
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, doGP_lwscat, use_LW_jacobian,

if (.not. doLWrad) return

!$acc data copyin(lw_optical_props_clrsky%optical_props,lw_optical_props_clrsky%optical_props%tau, &
!$acc aerlw%optical_props,aerlw%optical_props%tau, &
!$acc lw_optical_props_clouds%optical_props, lw_optical_props_clouds%optical_props%tau, &
!$acc sources%sources,sources%sources%lay_source, &
!$acc sources%sources%sfc_source, &
!$acc sources%sources%lev_source, &
!$acc sources%sources%sfc_source_jac, &
!$acc sfc_emiss_byband) &
!$acc copy(flux_clrsky%fluxes, flux_clrsky%fluxes%flux_net, flux_clrsky%fluxes%flux_up, &
!$acc flux_clrsky%fluxes%flux_dn, flux_allsky%fluxes, flux_allsky%fluxes%flux_net, &
!$acc flux_allsky%fluxes%flux_up, flux_allsky%fluxes%flux_dn, &
!$acc lw_Ds)

! ###################################################################################
!
! Compute clear-sky fluxes (gaseous+aerosol) (optional)
Expand All @@ -67,27 +80,26 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, doGP_lwscat, use_LW_jacobian,
call check_error_msg('rrtmgp_lw_rte_increment_aerosol_to_clrsky', errmsg)
if (len_trim(errmsg) /= 0) then
errflg = 1
return
! Can't return from within a top-level acc block
end if

! Call RTE solver
if (doLWclrsky) then
if (errflg == 0 .and. doLWclrsky) then
if (use_lw_optimal_angles) then
errmsg = lw_gas_props%gas_props%compute_optimal_angles(lw_optical_props_clrsky%optical_props,lw_Ds)
call check_error_msg('rrtmgp_lw_rte_opt_angle', errmsg)
if (len_trim(errmsg) /= 0) then
errflg = 1
return
end if
if (nGauss_angles > 1) then
if (nGauss_angles > 1 .and. errflg == 0) then
errmsg = rte_lw( &
lw_optical_props_clrsky%optical_props, & ! IN - optical-properties
sources%sources, & ! IN - source function
sfc_emiss_byband, & ! IN - surface emissivity in each LW band
flux_clrsky%fluxes, & ! OUT - Fluxes
n_gauss_angles = nGauss_angles, & ! IN - Number of angles in Gaussian quadrature
lw_Ds = lw_Ds) ! IN - 1/cos of transport angle per column and g-point
else
else if (errflg == 0) then
errmsg = rte_lw( &
lw_optical_props_clrsky%optical_props, & ! IN - optical-properties
sources%sources, & ! IN - source function
Expand All @@ -96,14 +108,14 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, doGP_lwscat, use_LW_jacobian,
lw_Ds = lw_Ds) ! IN - 1/cos of transport angle per column and g-point
end if
else
if (nGauss_angles > 1) then
if (nGauss_angles > 1 .and. errflg == 0) then
errmsg = rte_lw( &
lw_optical_props_clrsky%optical_props, & ! IN - optical-properties
sources%sources, & ! IN - source function
sfc_emiss_byband, & ! IN - surface emissivity in each LW band
flux_clrsky%fluxes, & ! OUT - Fluxes
n_gauss_angles = nGauss_angles) ! IN - Number of angles in Gaussian quadrature
else
else if (errflg == 0) then
errmsg = rte_lw( &
lw_optical_props_clrsky%optical_props, & ! IN - optical-properties
sources%sources, & ! IN - source function
Expand All @@ -114,7 +126,6 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, doGP_lwscat, use_LW_jacobian,
call check_error_msg('rrtmgp_lw_rte_lw_rte_clrsky', errmsg)
if (len_trim(errmsg) /= 0) then
errflg = 1
return
end if
end if

Expand All @@ -134,15 +145,14 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, doGP_lwscat, use_LW_jacobian,
! ###################################################################################

! Include LW cloud-scattering?
if (doGP_lwscat) then
if (doGP_lwscat .and. errflg == 0) then
! Increment
errmsg = lw_optical_props_clrsky%optical_props%increment(lw_optical_props_clouds%optical_props)
call check_error_msg('rrtmgp_lw_rte_increment_clrsky_to_clouds', errmsg)
if (len_trim(errmsg) /= 0) then
errflg = 1
return
end if
if (use_LW_jacobian) then
if (use_LW_jacobian .and. errflg == 0) then
if (nGauss_angles > 1) then
errmsg = rte_lw( &
lw_optical_props_clouds%optical_props, & ! IN - optical-properties
Expand All @@ -159,7 +169,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, doGP_lwscat, use_LW_jacobian,
flux_allsky%fluxes, & ! OUT - Fluxes
flux_up_Jac = fluxlwUP_jac) ! OUT - surface temperature flux (upward) Jacobian (W m-2 K-1)
end if
else
else if (errflg == 0) then
if (nGauss_angles > 1) then
errmsg = rte_lw( &
lw_optical_props_clouds%optical_props, & ! IN - optical-properties
Expand All @@ -182,10 +192,9 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, doGP_lwscat, use_LW_jacobian,
call check_error_msg('rrtmgp_lw_rte_increment_clouds_to_clrsky', errmsg)
if (len_trim(errmsg) /= 0) then
errflg = 1
return
end if

if (use_LW_jacobian) then
if (use_LW_jacobian .and. errflg == 0) then
if (nGauss_angles > 1) then
errmsg = rte_lw( &
lw_optical_props_clrsky%optical_props, & ! IN - optical-properties
Expand All @@ -202,7 +211,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, doGP_lwscat, use_LW_jacobian,
flux_allsky%fluxes, & ! OUT - Fluxes
flux_up_Jac = fluxlwUP_jac) ! OUT - surface temperature flux (upward) Jacobian (W m-2 K-1)
end if
else
else if (errflg == 0) then
if (nGauss_angles > 1) then
errmsg = rte_lw( &
lw_optical_props_clrsky%optical_props, & ! IN - optical-properties
Expand All @@ -223,6 +232,7 @@ subroutine rrtmgp_lw_rte_run(doLWrad, doLWclrsky, doGP_lwscat, use_LW_jacobian,
if (len_trim(errmsg) /= 0) then
errflg = 1
end if
!$acc end data

end subroutine rrtmgp_lw_rte_run
end module rrtmgp_lw_rte
1 change: 1 addition & 0 deletions schemes/rrtmgp/rrtmgp_lw_rte.meta
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
dependencies = ext/rte-frontend/mo_rte_util_array_validation.F90
dependencies = ext/rte-kernels/mo_rte_solver_kernels.F90
dependencies = ext/rte-kernels/mo_fluxes_broadband_kernels.F90
dependencies = ext/rte-kernels/accel/mo_rte_solver_kernels.F90
dependencies = utils/radiation_tools.F90
dependencies = objects/ccpp_source_functions.F90,objects/ccpp_gas_optics_rrtmgp.F90
dependencies = objects/ccpp_optical_props.F90
Expand Down
2 changes: 1 addition & 1 deletion schemes/rrtmgp/rrtmgp_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
intent = in
[ next_cday ]
standard_name = fractional_calendar_days_on_end_of_next_timestep
units = 1
units = days
type = real | kind = kind_phys
dimensions = ()
intent = in
Expand Down
3 changes: 3 additions & 0 deletions schemes/rrtmgp/rrtmgp_sw_gas_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ subroutine rrtmgp_sw_gas_optics_run(dosw, iter_num, ncol, rrtmgp_phys_blksz, p_l
iCol = ((iter_num - 1) * rrtmgp_phys_blksz) + 1
iCol2= min(iCol + rrtmgp_phys_blksz - 1, ncol)

!$acc data copyin(sw_gas_props%gas_props,p_lay,p_lev,t_lay,gas_concs%gas_concs) &
!$acc copyout(toa_src_sw)
errmsg = sw_gas_props%gas_props%gas_optics(&
p_lay(iCol:iCol2,:), & ! IN - Pressure @ layer-centers (Pa)
p_lev(iCol:iCol2,:), & ! IN - Pressure @ layer-interfaces (Pa)
Expand All @@ -381,6 +383,7 @@ subroutine rrtmgp_sw_gas_optics_run(dosw, iter_num, ncol, rrtmgp_phys_blksz, p_l
if (len_trim(errmsg) /= 0) then
errflg = 1
end if
!$acc end data

end subroutine rrtmgp_sw_gas_optics_run

Expand Down
2 changes: 2 additions & 0 deletions schemes/rrtmgp/rrtmgp_sw_gas_optics.meta
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[ccpp-table-properties]
name = rrtmgp_sw_gas_optics
type = scheme
dependencies = ext/rte-kernels/accel/mo_optical_props_kernels.F90
dependencies = ext/rrtmgp-kernels/accel/mo_gas_optics_rrtmgp_kernels.F90

[ccpp-arg-table]
name = rrtmgp_sw_gas_optics_init
Expand Down
40 changes: 24 additions & 16 deletions schemes/rrtmgp/rrtmgp_sw_rte.F90
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,24 @@ subroutine rrtmgp_sw_rte_run(doswrad, doswclrsky, doswallsky, nday, iter_num, rr
! Compute clear-sky fluxes (gaseous+aerosol)
!
! ###################################################################################
!$acc data copyin(coszen_day, toa_src_sw, sfc_alb_dir, sfc_alb_dif, &
!$acc sw_optical_props%optical_props, sw_optical_props%optical_props%tau, sw_optical_props%optical_props%ssa, &
!$acc sw_optical_props%optical_props%g, aersw%optical_props%tau, &
!$acc aersw%optical_props, aersw%optical_props%ssa, aersw%optical_props%g, &
!$acc sw_optical_props_clouds%optical_props, sw_optical_props_clouds%optical_props%tau, sw_optical_props_clouds%optical_props%ssa, &
!$acc sw_optical_props_clouds%optical_props%g) &
!$acc copy(flux_clrsky%fluxes, flux_clrsky%fluxes%flux_net,flux_clrsky%fluxes%flux_up,flux_clrsky%fluxes%flux_dn, &
!$acc flux_allsky%fluxes, flux_allsky%fluxes%flux_net,flux_allsky%fluxes%flux_up,flux_allsky%fluxes%flux_dn)
! Increment optics (always)
errmsg = aersw%optical_props%increment(sw_optical_props%optical_props)
call check_error_msg('rrtmgp_sw_rte_increment_aerosol_to_clrsky', errmsg)
if (len_trim(errmsg) /= 0) then
errflg = 1
return
! Can't return from within a top-level acc block
end if

! Optionally compute clear-sky fluxes
if (doswclrsky) then
if (doswclrsky .and. errflg == 0) then
errmsg = rte_sw( &
sw_optical_props%optical_props, & ! IN - optical-properties
coszen_day(iCol:iCol2), & ! IN - Cosine of solar zenith angle
Expand All @@ -83,7 +91,6 @@ subroutine rrtmgp_sw_rte_run(doswrad, doswclrsky, doswallsky, nday, iter_num, rr
call check_error_msg('rrtmgp_sw_rte_rte_sw_clrsky', errmsg)
if (len_trim(errmsg) /= 0) then
errflg = 1
return
end if
end if

Expand All @@ -93,29 +100,30 @@ subroutine rrtmgp_sw_rte_run(doswrad, doswclrsky, doswallsky, nday, iter_num, rr
!
! ###################################################################################

if (doswallsky) then
if (doswallsky .and. errflg == 0) then
! Increment
errmsg = sw_optical_props_clouds%optical_props%increment(sw_optical_props%optical_props)
call check_error_msg('rrtmgp_sw_rte_increment_clouds_to_clrsky', errmsg)
if (len_trim(errmsg) /= 0) then
errflg = 1
return
end if

! Compute fluxes
errmsg = rte_sw( &
sw_optical_props%optical_props, & ! IN - optical-properties
coszen_day(iCol:iCol2), & ! IN - Cosine of solar zenith angle
toa_src_sw, & ! IN - incident solar flux at TOA
sfc_alb_dir, & ! IN - Shortwave surface albedo (direct)
sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse)
flux_allsky%fluxes) ! OUT - Fluxes, all-sky, 3D (1,nLay,nBand)
call check_error_msg('rrtmgp_sw_rte_rte_sw_allsky', errmsg)
if (len_trim(errmsg) /= 0) then
errflg = 1
return
if (errflg == 0) then
errmsg = rte_sw( &
sw_optical_props%optical_props, & ! IN - optical-properties
coszen_day(iCol:iCol2), & ! IN - Cosine of solar zenith angle
toa_src_sw, & ! IN - incident solar flux at TOA
sfc_alb_dir, & ! IN - Shortwave surface albedo (direct)
sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse)
flux_allsky%fluxes) ! OUT - Fluxes, all-sky, 3D (1,nLay,nBand)
call check_error_msg('rrtmgp_sw_rte_rte_sw_allsky', errmsg)
if (len_trim(errmsg) /= 0) then
errflg = 1
end if
end if
end if
!$acc end data

end subroutine rrtmgp_sw_rte_run
end module rrtmgp_sw_rte
9 changes: 5 additions & 4 deletions schemes/rrtmgp/rrtmgp_sw_rte.meta
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
dependencies = ext/rte-frontend/mo_rte_util_array_validation.F90
dependencies = ext/rte-kernels/mo_rte_solver_kernels.F90
dependencies = ext/rte-kernels/mo_fluxes_broadband_kernels.F90
dependencies = ./utils/radiation_tools.F90
dependencies = ./objects/ccpp_source_functions.F90,./objects/ccpp_gas_optics_rrtmgp.F90
dependencies = ./objects/ccpp_optical_props.F90
dependencies = ./objects/ccpp_fluxes.F90,./objects/ccpp_fluxes_byband.F90
dependencies = ext/rte-kernels/accel/mo_rte_solver_kernels.F90
dependencies = utils/radiation_tools.F90
dependencies = objects/ccpp_source_functions.F90,objects/ccpp_gas_optics_rrtmgp.F90
dependencies = objects/ccpp_optical_props.F90
dependencies = objects/ccpp_fluxes.F90,objects/ccpp_fluxes_byband.F90

[ccpp-arg-table]
name = rrtmgp_sw_rte_run
Expand Down
4 changes: 2 additions & 2 deletions schemes/rrtmgp/rrtmgp_sw_solar_var.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module rrtmgp_sw_solar_var
!> \section arg_table_rrtmgp_sw_solar_var_run Argument Table
!! \htmlinclude rrtmgp_sw_solar_var_run.html
!!
subroutine rrtmgp_sw_solar_var_run(toa_flux, ccpp_constant_two, band2gpt_sw, nswbands, sol_irrad, wave_end, nbins, sol_tsi, &
subroutine rrtmgp_sw_solar_var_run(toa_flux, constant_dim_two, band2gpt_sw, nswbands, sol_irrad, wave_end, nbins, sol_tsi, &
nday, dosw, do_spectral_scaling, sfac, eccf, errmsg, errflg)
use rrtmgp_sw_solar_var_setup, only: irrad, radbinmax, radbinmin
use ccpp_kinds, only : kind_phys
Expand All @@ -30,7 +30,7 @@ subroutine rrtmgp_sw_solar_var_run(toa_flux, ccpp_constant_two, band2gpt_sw, nsw
real(kind_phys), intent(in) :: wave_end(:) ! wavelength endpoints
integer, intent(in) :: nday ! number of daytime points
integer, intent(in) :: nbins ! number of bins
integer, intent(in) :: ccpp_constant_two ! dimension for band2gpt_sw
integer, intent(in) :: constant_dim_two ! dimension for band2gpt_sw
integer, intent(in) :: band2gpt_sw(:,:) ! array for converting shortwave band limits to g-points
integer, intent(in) :: nswbands ! number of shortwave bands
logical, intent(in) :: do_spectral_scaling ! flag to do spectral scaling
Expand Down
6 changes: 3 additions & 3 deletions schemes/rrtmgp/rrtmgp_sw_solar_var.meta
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
type = real | kind = kind_phys
dimensions = (daytime_columns_dimension,number_of_shortwave_g_point_intervals)
intent = inout
[ ccpp_constant_two ]
standard_name = ccpp_constant_two
[ constant_dim_two ]
standard_name = constant_dimension_two
units = count
type = integer
dimensions = ()
Expand All @@ -22,7 +22,7 @@
standard_name = shortwave_start_and_end_gpoint_for_each_band
units = index
type = integer
dimensions = (ccpp_constant_two,number_of_bands_for_shortwave_radiation)
dimensions = (constant_dimension_two,number_of_bands_for_shortwave_radiation)
intent = in
[ nswbands ]
standard_name = number_of_bands_for_shortwave_radiation
Expand Down
2 changes: 1 addition & 1 deletion schemes/tropopause_find/tropopause_find.meta
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
intent = in
[ calday ]
standard_name = fractional_calendar_days_on_end_of_current_timestep
units = 1
units = days
type = real | kind = kind_phys
dimensions = ()
intent = in
Expand Down
Loading