Skip to content

Commit

Permalink
Merge pull request ESCOMP#824 from fvitt/aerosol_optics
Browse files Browse the repository at this point in the history
cam6_3_125:  Refactor aerosol optics for radiation transfer
  • Loading branch information
fvitt authored Aug 29, 2023
2 parents f5aec67 + aeece27 commit c3a1cbe
Show file tree
Hide file tree
Showing 14 changed files with 2,781 additions and 1,721 deletions.
2 changes: 1 addition & 1 deletion bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5581,7 +5581,7 @@ Default: false
<!-- Aerosol and cloud optics -->

<entry id="water_refindex_file" type="char*256" input_pathname="abs" category="radiation"
group="modal_aer_opt_nl" valid_values="" >
group="aerosol_optics_nl" valid_values="" >
Full pathname of dataset for water refractive indices used in modal aerosol optics
Default: none
</entry>
Expand Down
174 changes: 174 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,179 @@
===============================================================

Tag name: cam6_3_125
Originator(s): fvitt
Date: 29 Aug 2023
One-line Summary: Introduce abstract interface to aerosol optics
Github PR URL: https://github.com/ESCOMP/CAM/pull/824

Purpose of changes (include the issue number and title text for each relevant GitHub issue):

Issue #816 -- Refactor aerosol optics to use abstract aerosol optics class which can be
extended for different aerosol representations such as MAM and CARMA

Describe any changes made to build system: n/a

Describe any changes made to the namelist:

Namelist group "modal_aer_opt_nl" is renamed as "aerosol_optics_nl"

List any changes to the defaults for the boundary datasets: n/a

Describe any substantial timing or memory changes: n/a

Code reviewed by: cacraigucar mattldawson nusbaume

List all files eliminated:

D src/physics/cam/modal_aer_opt.F90
- replaced by generalized aer_rad_props module

List all files added and what they do:

A src/chemistry/aerosol/aerosol_optics_mod.F90
- abstract interface to aerosol optics

A src/chemistry/aerosol/refractive_aerosol_optics_mod.F90
- index of refaction based aerosol optics

A src/physics/cam/aerosol_optics_cam.F90
- generalized aerosol optics module

List all existing files that have been modified, and describe the changes:

M bld/namelist_files/namelist_definition.xml
- modal_aer_opt_nl group renamed as aerosol_optics_nl

M src/chemistry/aerosol/aerosol_properties_mod.F90
M src/chemistry/aerosol/modal_aerosol_properties_mod.F90
- add methods for optical parameters

M src/chemistry/aerosol/aerosol_state_mod.F90
M src/chemistry/aerosol/modal_aerosol_state_mod.F90
- add methods for optics

M src/control/runtime_opts.F90
- modal_aer_opt --> aerosol_optics_cam

M src/physics/cam/aer_rad_props.F90
- modal_aer_opt --> aerosol_optics_cam

M src/physics/cam/rad_constituents.F90
- add opticstype arg to rad_cnst_get_mode_props

M src/physics/rrtmg/radiation.F90
- remove modal_aer_opt_init call

If there were any failures reported from running test_driver.sh on any test
platform, and checkin with these failures has been OK'd by the gatekeeper,
then copy the lines from the td.*.status files for the failed tests to the
appropriate machine below. All failed tests must be justified.

cheyenne/intel/aux_cam:

ERP_Ln9_Vnuopc.ne30pg3_ne30pg3_mg17.FW2000climo.cheyenne_intel.cam-outfrq9s_wcm_ne30 (Overall: FAIL) details:
ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq9s (Overall: FAIL) details:
SMS_Lh12_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq3h (Overall: DIFF) details:
- pre-existing failures

ERC_D_Ln9_P144x1_Vnuopc.ne16pg3_ne16pg3_mg17.QPC6HIST.cheyenne_intel.cam-outfrq3s_ttrac_usecase (Overall: NLFAIL) details:
ERC_D_Ln9_Vnuopc.f19_f19_mg17.QPC6.cheyenne_intel.cam-outfrq3s_cosp (Overall: NLFAIL) details:
ERC_D_Ln9_Vnuopc.ne16_ne16_mg17.QPC5HIST.cheyenne_intel.cam-outfrq3s_usecase (Overall: NLFAIL) details:
ERP_D_Ln9.ne30pg3_ne30pg3_mg17.FLTHIST.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_D_Ln9_Vnuopc.f09_f09_mg17.QSC6.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_D_Ln9_Vnuopc.f19_f19_mg17.QPC6.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_D_Ln9_Vnuopc.ne30pg3_ne30pg3_mg17.F2000dev.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_Ld3_Vnuopc.f09_f09_mg17.FWHIST.cheyenne_intel.cam-reduced_hist1d (Overall: NLFAIL) details:
ERP_Ln9_P24x3_Vnuopc.f45_f45_mg37.QPWmaC6.cheyenne_intel.cam-outfrq9s_mee_fluxes (Overall: NLFAIL) details:
ERP_Ln9_Vnuopc.C96_C96_mg17.F2000climo.cheyenne_intel.cam-outfrq9s_mg3 (Overall: NLFAIL) details:
ERP_Ln9_Vnuopc.f09_f09_mg17.F1850.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_Ln9_Vnuopc.f09_f09_mg17.F2000climo.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_Ln9_Vnuopc.f09_f09_mg17.F2000dev.cheyenne_intel.cam-outfrq9s_mg3 (Overall: NLFAIL) details:
ERP_Ln9_Vnuopc.f09_f09_mg17.F2010climo.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_Ln9_Vnuopc.f09_f09_mg17.FHIST_BDRD.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_Ln9_Vnuopc.f19_f19_mg17.FWsc1850.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_Ln9_Vnuopc.ne30_ne30_mg17.FCnudged.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERS_Ld3_Vnuopc.f10_f10_mg37.F1850.cheyenne_intel.cam-outfrq1d_14dec_ghg_cam_dev (Overall: NLFAIL) details:
ERS_Ln9_P288x1_Vnuopc.mpasa120_mpasa120.F2000climo.cheyenne_intel.cam-outfrq9s_mpasa120 (Overall: NLFAIL) details:
ERS_Ln9_P36x1_Vnuopc.mpasa480_mpasa480.F2000climo.cheyenne_intel.cam-outfrq9s_mpasa480 (Overall: NLFAIL) details:
ERS_Ln9_Vnuopc.f09_f09_mg17.FX2000.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERS_Ln9_Vnuopc.f19_f19_mg17.FXSD.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
SCT_D_Ln7_Vnuopc.T42_T42_mg17.QPC5.cheyenne_intel.cam-scm_prep (Overall: NLFAIL) details:
SMS_D_Ld2_Vnuopc.f19_f19_mg17.QPC5HIST.cheyenne_intel.cam-volc_usecase (Overall: NLFAIL) details:
SMS_D_Ln9.ne30pg3_ne30pg3_mg17.FMTHIST.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.f09_f09_mg17.FCts2nudged.cheyenne_intel.cam-outfrq9s_leapday (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.f09_f09_mg17.FCvbsxHIST.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.f09_f09_mg17.FSD.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.f19_f19_mg17.FWma2000climo.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.f19_f19_mg17.FWma2000climo.cheyenne_intel.cam-outfrq9s_waccm_ma_mam4 (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.f19_f19_mg17.FXHIST.cheyenne_intel.cam-outfrq9s_amie (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.f19_f19_mg17.QPC2000climo.cheyenne_intel.cam-outfrq3s_usecase (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.f19_f19_mg17.QPC5M7.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.ne16_ne16_mg17.FX2000.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc_P720x1.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.FHIST.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc_P720x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc_P720x1.ne30pg3_ne30pg3_mg17.FCLTHIST.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.T42_T42.FSCAM.cheyenne_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_Ld1_Vnuopc.f09_f09_mg17.FW2000climo.cheyenne_intel.cam-outfrq1d (Overall: NLFAIL) details:
SMS_Ld1_Vnuopc.f19_f19.F2000dev.cheyenne_intel.cam-outfrq1d (Overall: NLFAIL) details:
SMS_Ld1_Vnuopc.ne30pg3_ne30pg3_mg17.FC2010climo.cheyenne_intel.cam-outfrq1d (Overall: NLFAIL) details:
SMS_Ld5_Vnuopc.f09_f09_mg17.PC6.cheyenne_intel.cam-cam6_port_f09 (Overall: NLFAIL) details:
SMS_Lm13_Vnuopc.f10_f10_mg37.F2000climo.cheyenne_intel.cam-outfrq1m (Overall: NLFAIL) details:
SMS_Ln9_Vnuopc.f09_f09_mg17.F2010climo.cheyenne_intel.cam-nudging (Overall: NLFAIL) details:
SMS_Ln9_Vnuopc.f09_f09_mg17.FW1850.cheyenne_intel.cam-reduced_hist3s (Overall: NLFAIL) details:
SMS_Ln9_Vnuopc.f19_f19.F2000climo.cheyenne_intel.cam-silhs (Overall: NLFAIL) details:
- modal_aer_opt_nl namelist group renamed as aerosol_optics_nl

izumi/nag/aux_cam:

DAE_Vnuopc.f45_f45_mg37.FHS94.izumi_nag.cam-dae (Overall: FAIL) details:
- pre-existing failure

ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-carma_sea_salt (Overall: NLFAIL) details:
ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-outfrq3s_cosp (Overall: NLFAIL) details:
ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-outfrq3s_subcol (Overall: NLFAIL) details:
ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s_am (Overall: NLFAIL) details:
ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s_convmic (Overall: NLFAIL) details:
ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s_cospsathist (Overall: NLFAIL) details:
ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPC6.izumi_nag.cam-outfrq3s (Overall: NLFAIL) details:
ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPWmaC6.izumi_nag.cam-outfrq3s (Overall: NLFAIL) details:
ERC_D_Ln9_Vnuopc.ne5_ne5_mg37.QPC5.izumi_nag.cam-outfrq3s_ttrac (Overall: NLFAIL) details:
ERI_D_Ln18_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-outfrq3s_eoyttrac (Overall: NLFAIL) details:
ERI_D_Ln18_Vnuopc.f19_f19_mg17.QPC6.izumi_nag.cam-ghgrmp_e8 (Overall: NLFAIL) details:
ERP_Ln9_Vnuopc.ne5pg3_ne5pg3_mg37.QPC6.izumi_nag.cam-outfrq9s_clubbmf (Overall: NLFAIL) details:
PLB_D_Ln9_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-ttrac_loadbal0 (Overall: NLFAIL) details:
PLB_D_Ln9_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-ttrac_loadbal1 (Overall: NLFAIL) details:
PLB_D_Ln9_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-ttrac_loadbal3 (Overall: NLFAIL) details:
PLB_D_Ln9_Vnuopc.ne5_ne5_mg37.QPC5.izumi_nag.cam-ttrac_loadbal0 (Overall: NLFAIL) details:
PLB_D_Ln9_Vnuopc.ne5_ne5_mg37.QPC5.izumi_nag.cam-ttrac_loadbal1 (Overall: NLFAIL) details:
PLB_D_Ln9_Vnuopc.ne5_ne5_mg37.QPC5.izumi_nag.cam-ttrac_loadbal3 (Overall: NLFAIL) details:
SMS_D_Ld2_Vnuopc.f45_f45_mg37.PC5.izumi_nag.cam-outfrq24h_port (Overall: NLFAIL) details:
SMS_D_Ln7_Vnuopc.T42_T42_mg17.QPSCAMC5.izumi_nag.cam-scmarm (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-rad_diag_mam (Overall: NLFAIL) details:
SMS_P48x1_D_Ln3_Vnuopc.f09_f09_mg17.QPC6HIST.izumi_nag.cam-outfrq3s_co2cycle_usecase (Overall: NLFAIL) details:
SUB_D_Ln9_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-outfrq3s (Overall: NLFAIL) details:
TMC_D_Vnuopc.f10_f10_mg37.QPC5.izumi_nag.cam-outfrq3s_eoyttrac (Overall: NLFAIL) details:
TMC_D_Vnuopc.T5_T5_mg37.QPC5.izumi_nag.cam-ghgrmp_e8 (Overall: NLFAIL) details:
- modal_aer_opt_nl namelist group renamed as aerosol_optics_nl

izumi/gnu/aux_cam:

ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPC5.izumi_gnu.cam-outfrq3s_unicon (Overall: NLFAIL) details:
ERC_D_Ln9_Vnuopc.f10_f10_mg37.QPSPCAMM.izumi_gnu.cam-outfrq3s (Overall: NLFAIL) details:
ERP_Ln9_Vnuopc.ne5_ne5_mg37.QPC5.izumi_gnu.cam-outfrq9s (Overall: NLFAIL) details:
PLB_D_Ln9_Vnuopc.ne5pg3_ne5pg3_mg37.QPC5.izumi_gnu.cam-ttrac_loadbal0 (Overall: NLFAIL) details:
PLB_D_Ln9_Vnuopc.ne5pg3_ne5pg3_mg37.QPC5.izumi_gnu.cam-ttrac_loadbal1 (Overall: NLFAIL) details:
PLB_D_Ln9_Vnuopc.ne5pg3_ne5pg3_mg37.QPC5.izumi_gnu.cam-ttrac_loadbal3 (Overall: NLFAIL) details:
SCT_D_Ln7_Vnuopc.T42_T42_mg17.QPC6.izumi_gnu.cam-scm_prep_c6 (Overall: NLFAIL) details:
SMS_D_Ln9.f10_f10_mg37.2000_CAM%DEV%GHGMAM4_CLM50%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV_SESP.izumi_gnu.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9_Vnuopc.ne5pg3_ne5pg3_mg37.QPC5.izumi_gnu.cam-outfrq3s_ttrac (Overall: NLFAIL) details:
- modal_aer_opt_nl namelist group renamed as aerosol_optics_nl

Summarize any changes to answers: bit-for-bit unchanged

===============================================================
===============================================================

Tag name: cam6_3_124
Originator(s): fvitt
Date: 23 Aug 2023
Expand Down
58 changes: 58 additions & 0 deletions src/chemistry/aerosol/aerosol_optics_mod.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
module aerosol_optics_mod
use shr_kind_mod, only: r8 => shr_kind_r8

implicit none

private
public :: aerosol_optics

!> aerosol_optics defines interfaces to optical properties of any aerosol package
!!
!! Each aerosol optics type must extend the abstract aerosol_optics class
!! to define details of how aerosol optics properties are derived from
!! aerosol states.
type, abstract :: aerosol_optics

contains

procedure(aeropts_sw_props),deferred :: sw_props
procedure(aeropts_lw_props),deferred :: lw_props

end type aerosol_optics

abstract interface

!------------------------------------------------------------------------------
! returns short wave aerosol optics properties
!------------------------------------------------------------------------------
subroutine aeropts_sw_props(self, ncol, ilev, iwav, pext, pabs, palb, pasm)
import :: aerosol_optics, r8

class(aerosol_optics), intent(in) :: self
integer, intent(in) :: ncol ! number of columns
integer, intent(in) :: ilev ! vertical level index
integer, intent(in) :: iwav ! wave length index
real(r8),intent(out) :: pext(ncol) ! parameterized specific extinction (m2/kg)
real(r8),intent(out) :: pabs(ncol) ! parameterized specific absorption (m2/kg)
real(r8),intent(out) :: palb(ncol) ! parameterized asymmetry factor
real(r8),intent(out) :: pasm(ncol) ! parameterized single scattering albedo

end subroutine aeropts_sw_props

!------------------------------------------------------------------------------
! returns long wave aerosol optics properties
!------------------------------------------------------------------------------
subroutine aeropts_lw_props(self, ncol, ilev, iwav, pabs)
import :: aerosol_optics, r8

class(aerosol_optics), intent(in) :: self
integer, intent(in) :: ncol ! number of columns
integer, intent(in) :: ilev ! vertical level index
integer, intent(in) :: iwav ! wave length index
real(r8),intent(out) :: pabs(ncol) ! parameterized specific absorption (m2/kg)

end subroutine aeropts_lw_props

end interface

end module aerosol_optics_mod
Loading

0 comments on commit c3a1cbe

Please sign in to comment.