-
Notifications
You must be signed in to change notification settings - Fork 434
output detailed aerosol radiation properties #6317
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
Changes from all commits
79142e0
c67b48a
a50a87a
7cccc66
92b27fe
d78d274
e664783
24f2e06
f65349e
0ba5cc8
7011e6e
c5f4909
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Same as wcprod_F2010 but with SPA-specific outputs |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
./xmlchange --append CAM_CONFIG_OPTS='-cosp' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
cosp_lite = .true. | ||
|
||
empty_htapes = .true. | ||
|
||
avgflag_pertape = 'A','A','A','A','I','I','A' | ||
nhtfrq = -24,-24,-6,-3,-1,-24,-24 | ||
mfilt = 1,30,120,240,720,1,1 | ||
|
||
fincl1 = 'AODALL','AODBC','AODDUST','AODPOM','AODSO4','AODSOA','AODSS','AODVIS', | ||
'CLDLOW','CLDMED','CLDHGH','CLDTOT', | ||
'CLDHGH_CAL','CLDLOW_CAL','CLDMED_CAL','CLD_MISR','CLDTOT_CAL', | ||
'CLMODIS','FISCCP1_COSP','FLDS','FLNS','FLNSC','FLNT','FLUT', | ||
'FLUTC','FSDS','FSDSC','FSNS','FSNSC','FSNT','FSNTOA','FSNTOAC','FSNTC', | ||
'ICEFRAC','LANDFRAC','LWCF','OCNFRAC','OMEGA','PRECC','PRECL','PRECSC','PRECSL','PS','PSL','Q', | ||
'QFLX','QREFHT','RELHUM','SCO','SHFLX','SOLIN','SWCF','T','TAUX','TAUY','TCO', | ||
'TGCLDLWP','TMQ','TREFHT','TREFMNAV','TREFMXAV','TS','U','U10','V','Z3', | ||
'dst_a1DDF','dst_a3DDF','dst_c1DDF','dst_c3DDF','dst_a1SFWET','dst_a3SFWET','dst_c1SFWET','dst_c3SFWET', | ||
'O3','LHFLX', | ||
'O3_2DTDA_trop','O3_2DTDB_trop','O3_2DTDD_trop','O3_2DTDE_trop','O3_2DTDI_trop','O3_2DTDL_trop', | ||
'O3_2DTDN_trop','O3_2DTDO_trop','O3_2DTDS_trop','O3_2DTDU_trop','O3_2DTRE_trop','O3_2DTRI_trop', | ||
'O3_SRF','NO_2DTDS','NO_TDLgt','NO2_2DTDD','NO2_2DTDS','NO2_TDAcf','CO_SRF','TROPE3D_P','TROP_P', | ||
'CDNUMC','SFDMS','so4_a1_sfgaex1','so4_a2_sfgaex1','so4_a3_sfgaex1','so4_a5_sfgaex1','soa_a1_sfgaex1', | ||
'soa_a2_sfgaex1','soa_a3_sfgaex1','GS_soa_a1','GS_soa_a2','GS_soa_a3','AQSO4_H2O2','AQSO4_O3', | ||
'SFSO2','SO2_CLXF','SO2','DF_SO2','AQ_SO2','GS_SO2','WD_SO2','ABURDENSO4_STR','ABURDENSO4_TRO', | ||
'ABURDENSO4','ABURDENBC','ABURDENDUST','ABURDENMOM','ABURDENPOM','ABURDENSEASALT', | ||
'ABURDENSOA','AODSO4_STR','AODSO4_TRO', | ||
'EXTINCT','AODABS','AODABSBC','CLDICE','CLDLIQ','CLD_CAL_TMPLIQ','CLD_CAL_TMPICE','Mass_bc_srf', | ||
'Mass_dst_srf','Mass_mom_srf','Mass_ncl_srf','Mass_pom_srf','Mass_so4_srf','Mass_soa_srf','Mass_bc_850', | ||
'Mass_dst_850','Mass_mom_850','Mass_ncl_850','Mass_pom_850','Mass_so4_850','Mass_soa_850','Mass_bc_500', | ||
'Mass_dst_500','Mass_mom_500','Mass_ncl_500','Mass_pom_500','Mass_so4_500','Mass_soa_500','Mass_bc_330', | ||
'Mass_dst_330','Mass_mom_330','Mass_ncl_330','Mass_pom_330','Mass_so4_330','Mass_soa_330','Mass_bc_200', | ||
'Mass_dst_200','Mass_mom_200','Mass_ncl_200','Mass_pom_200','Mass_so4_200','Mass_soa_200', | ||
'O3_2DTDD','O3_2DCIP','O3_2DCIL','CO_2DTDS','CO_2DTDD','CO_2DCEP','CO_2DCEL','NO_2DTDD', | ||
'FLNTC','SAODVIS', | ||
'H2OLNZ', | ||
'dst_a1SF','dst_a3SF', | ||
'PHIS','CLOUD','TGCLDIWP','TGCLDCWP','AREL', | ||
'CLDTOT_ISCCP','MEANCLDALB_ISCCP','MEANPTOP_ISCCP','CLD_CAL', | ||
'CLDTOT_CAL_LIQ','CLDTOT_CAL_ICE','CLDTOT_CAL_UN', | ||
'CLDHGH_CAL_LIQ','CLDHGH_CAL_ICE','CLDHGH_CAL_UN', | ||
'CLDMED_CAL_LIQ','CLDMED_CAL_ICE','CLDMED_CAL_UN', | ||
'CLDLOW_CAL_LIQ','CLDLOW_CAL_ICE','CLDLOW_CAL_UN', | ||
'CLWMODIS','CLIMODIS' | ||
|
||
fincl2 = 'PS', 'FLUT','PRECT','U200','V200','U850','V850', | ||
'TCO','SCO','TREFHTMN','TREFHTMX','TREFHT','QREFHT' | ||
fincl3 = 'PS', 'PSL','PRECT','TUQ','TVQ','UBOT','VBOT','TREFHT','FLUT','OMEGA500','TBOT','U850','V850','U200','V200','T200','T500','Z700' | ||
fincl4 = 'PRECT' | ||
fincl5 = 'O3_SRF' | ||
fincl6 = 'CO_2DMSD','NO2_2DMSD','NO_2DMSD','O3_2DMSD','O3_2DMSD_trop' | ||
fincl7 = 'PS', 'CCN3MAIR', 'MODAL_AER_TAU_SW', 'MODAL_AER_SSA_SW', 'MODAL_AER_G_SW', 'MODAL_AER_TAU_LW' | ||
|
||
! -- chemUCI settings ------------------ | ||
history_chemdyg_summary = .true. | ||
history_gaschmbudget_2D = .false. | ||
history_gaschmbudget_2D_levels = .false. | ||
history_gaschmbudget_num = 6 !! no impact if history_gaschmbudget_2D = .false. | ||
|
||
! -- MAM5 settings ------------------ | ||
is_output_interactive_volc = .true. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
hist_dov2xy = .true.,.true. | ||
hist_fexcl1 = 'AGWDNPP','ALTMAX_LASTYEAR','AVAIL_RETRANSP','AVAILC','BAF_CROP', | ||
'BAF_PEATF','BIOCHEM_PMIN_TO_PLANT','CH4_SURF_AERE_SAT','CH4_SURF_AERE_UNSAT','CH4_SURF_DIFF_SAT', | ||
'CH4_SURF_DIFF_UNSAT','CH4_SURF_EBUL_SAT','CH4_SURF_EBUL_UNSAT','CMASS_BALANCE_ERROR','cn_scalar', | ||
'COL_PTRUNC','CONC_CH4_SAT','CONC_CH4_UNSAT','CONC_O2_SAT','CONC_O2_UNSAT', | ||
'cp_scalar','CWDC_HR','CWDC_LOSS','CWDC_TO_LITR2C','CWDC_TO_LITR3C', | ||
'CWDC_vr','CWDN_TO_LITR2N','CWDN_TO_LITR3N','CWDN_vr','CWDP_TO_LITR2P', | ||
'CWDP_TO_LITR3P','CWDP_vr','DWT_CONV_CFLUX_DRIBBLED','F_CO2_SOIL','F_CO2_SOIL_vr', | ||
'F_DENIT_vr','F_N2O_DENIT','F_N2O_NIT','F_NIT_vr','FCH4_DFSAT', | ||
'FINUNDATED_LAG','FPI_P_vr','FPI_vr','FROOTC_LOSS','HR_vr', | ||
'LABILEP_TO_SECONDP','LABILEP_vr','LAND_UPTAKE','LEAF_MR','leaf_npimbalance', | ||
'LEAFC_LOSS','LEAFC_TO_LITTER','LFC2','LITR1_HR','LITR1C_TO_SOIL1C', | ||
'LITR1C_vr','LITR1N_TNDNCY_VERT_TRANS','LITR1N_TO_SOIL1N','LITR1N_vr','LITR1P_TNDNCY_VERT_TRANS', | ||
'LITR1P_TO_SOIL1P','LITR1P_vr','LITR2_HR','LITR2C_TO_SOIL2C','LITR2C_vr', | ||
'LITR2N_TNDNCY_VERT_TRANS','LITR2N_TO_SOIL2N','LITR2N_vr','LITR2P_TNDNCY_VERT_TRANS','LITR2P_TO_SOIL2P', | ||
'LITR2P_vr','LITR3_HR','LITR3C_TO_SOIL3C','LITR3C_vr','LITR3N_TNDNCY_VERT_TRANS', | ||
'LITR3N_TO_SOIL3N','LITR3N_vr','LITR3P_TNDNCY_VERT_TRANS','LITR3P_TO_SOIL3P','LITR3P_vr', | ||
'M_LITR1C_TO_LEACHING','M_LITR2C_TO_LEACHING','M_LITR3C_TO_LEACHING','M_SOIL1C_TO_LEACHING','M_SOIL2C_TO_LEACHING', | ||
'M_SOIL3C_TO_LEACHING','M_SOIL4C_TO_LEACHING','NDEPLOY','NEM','nlim_m', | ||
'o2_decomp_depth_unsat','OCCLP_vr','PDEPLOY','PLANT_CALLOC','PLANT_NDEMAND', | ||
'PLANT_NDEMAND_COL','PLANT_PALLOC','PLANT_PDEMAND','PLANT_PDEMAND_COL','plim_m', | ||
'POT_F_DENIT','POT_F_NIT','POTENTIAL_IMMOB','POTENTIAL_IMMOB_P','PRIMP_TO_LABILEP', | ||
'PRIMP_vr','PROD1P_LOSS','QOVER_LAG','RETRANSN_TO_NPOOL','RETRANSP_TO_PPOOL', | ||
'SCALARAVG_vr','SECONDP_TO_LABILEP','SECONDP_TO_OCCLP','SECONDP_vr','SMIN_NH4_vr', | ||
'SMIN_NO3_vr','SMINN_TO_SOIL1N_L1','SMINN_TO_SOIL2N_L2','SMINN_TO_SOIL2N_S1','SMINN_TO_SOIL3N_L3', | ||
'SMINN_TO_SOIL3N_S2','SMINN_TO_SOIL4N_S3','SMINP_TO_SOIL1P_L1','SMINP_TO_SOIL2P_L2','SMINP_TO_SOIL2P_S1', | ||
'SMINP_TO_SOIL3P_L3','SMINP_TO_SOIL3P_S2','SMINP_TO_SOIL4P_S3','SMINP_vr','SOIL1_HR','SOIL1C_TO_SOIL2C','SOIL1C_vr','SOIL1N_TNDNCY_VERT_TRANS','SOIL1N_TO_SOIL2N','SOIL1N_vr', | ||
'SOIL1P_TNDNCY_VERT_TRANS','SOIL1P_TO_SOIL2P','SOIL1P_vr','SOIL2_HR','SOIL2C_TO_SOIL3C', | ||
'SOIL2C_vr','SOIL2N_TNDNCY_VERT_TRANS','SOIL2N_TO_SOIL3N','SOIL2N_vr','SOIL2P_TNDNCY_VERT_TRANS', | ||
'SOIL2P_TO_SOIL3P','SOIL2P_vr','SOIL3_HR','SOIL3C_TO_SOIL4C','SOIL3C_vr', | ||
'SOIL3N_TNDNCY_VERT_TRANS','SOIL3N_TO_SOIL4N','SOIL3N_vr','SOIL3P_TNDNCY_VERT_TRANS','SOIL3P_TO_SOIL4P', | ||
'SOIL3P_vr','SOIL4_HR','SOIL4C_vr','SOIL4N_TNDNCY_VERT_TRANS','SOIL4N_TO_SMINN', | ||
'SOIL4N_vr','SOIL4P_TNDNCY_VERT_TRANS','SOIL4P_TO_SMINP','SOIL4P_vr','SOLUTIONP_vr', | ||
'TCS_MONTH_BEGIN','TCS_MONTH_END','TOTCOLCH4','water_scalar','WF', | ||
'wlim_m','WOODC_LOSS','WTGQ' | ||
hist_fincl1 = 'SNOWDP','COL_FIRE_CLOSS','NPOOL','PPOOL','TOTPRODC' | ||
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA' | ||
hist_mfilt = 1,365 | ||
hist_nhtfrq = -24,-24 | ||
hist_avgflag_pertape = 'A','A' |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ module modal_aer_opt | |
use ref_pres, only: top_lev => clim_modal_aero_top_lev | ||
use physconst, only: rhoh2o, rga, rair | ||
use radconstants, only: nswbands, nlwbands, idx_sw_diag, idx_uv_diag, idx_nir_diag | ||
use radconstants, only: get_sw_spectral_midpoints, get_lw_spectral_midpoints | ||
use rad_constituents, only: n_diag, rad_cnst_get_call_list, rad_cnst_get_info, rad_cnst_get_aer_mmr, & | ||
rad_cnst_get_aer_props, rad_cnst_get_mode_props | ||
use physics_types, only: physics_state | ||
|
@@ -28,6 +29,7 @@ module modal_aer_opt | |
use cam_pio_utils, only: cam_pio_openfile | ||
use cam_history, only: addfld, horiz_only, add_default, outfld | ||
use cam_history_support, only: fillvalue | ||
use cam_history_support, only: add_hist_coord | ||
use cam_logfile, only: iulog | ||
use perf_mod, only: t_startf, t_stopf | ||
use cam_abortutils, only: endrun | ||
|
@@ -41,7 +43,7 @@ module modal_aer_opt | |
private | ||
save | ||
|
||
public :: modal_aer_opt_readnl, modal_aer_opt_init, modal_aero_sw, modal_aero_lw | ||
public :: modal_aer_opt_readnl, modal_aer_opt_init, modal_aero_sw, modal_aero_lw, modal_aer_opt_coords | ||
|
||
|
||
character(len=*), parameter :: unset_str = 'UNSET' | ||
|
@@ -67,6 +69,15 @@ module modal_aer_opt | |
character(len=4) :: diag(0:n_diag) = (/' ','_d1 ','_d2 ','_d3 ','_d4 ','_d5 ', & | ||
'_d6 ','_d7 ','_d8 ','_d9 ','_d10'/) | ||
|
||
integer, dimension(nswbands) :: rrtmg_to_rrtmgp_swbands = (/ & | ||
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. We should make |
||
14, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 & | ||
/) | ||
real(r8), target :: sw_band_midpoints(nswbands), sw_band_midpoints_p(nswbands), lw_band_midpoints(nlwbands) | ||
|
||
! A toggle to switch between rrtmg and rrtmgp | ||
! TODO: move this to the namelist at some point? | ||
integer :: output_aer_props_rrtmgp = 1 ! 1=rrtmgp, 0=rrtmg | ||
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. Since it can carry only two values, can we make it a boolean rather than an integer? If we assign 1 to this variable by default, would it change the answers? I think it will at least change the netcdf files to add or change a dimension. The output files can be NBFB. 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. Just diagnostic outputs (and I think it will DIFF even if the fields are not requested, because the coords will DIFF) 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. In the next edit, I will set this to FALSE (i.e., have it go with the default radiation scheme, unless the user requests it otherwise in the namelist --- so, I will add this to the namelist too) 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. We should label it NBFB if it is going to cause DIFFs in the nightlies. |
||
|
||
!Declare the following threadprivate variables to be used for calcsize and water uptake | ||
!These are defined as module level variables to aviod allocation-deallocation in a loop | ||
real(r8), allocatable :: dgnumdry_m(:,:,:) ! number mode dry diameter for all modes | ||
|
@@ -119,6 +130,23 @@ end subroutine modal_aer_opt_readnl | |
|
||
!=============================================================================== | ||
|
||
subroutine modal_aer_opt_coords | ||
integer :: i_nswband | ||
call get_sw_spectral_midpoints(sw_band_midpoints, 'nm') | ||
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. Unless I am missing something, |
||
call get_lw_spectral_midpoints(lw_band_midpoints, 'nm') | ||
do i_nswband = 1, nswbands | ||
sw_band_midpoints_p(i_nswband) = sw_band_midpoints(rrtmg_to_rrtmgp_swbands(i_nswband)) | ||
end do | ||
if (output_aer_props_rrtmgp == 1) then | ||
call add_hist_coord('swband', nswbands, 'Shortwave wavelength', 'nm', sw_band_midpoints_p) | ||
else | ||
call add_hist_coord('swband', nswbands, 'Shortwave wavelength', 'nm', sw_band_midpoints) | ||
end if | ||
call add_hist_coord('lwband', nlwbands, 'Longwave wavelength', 'nm', lw_band_midpoints) | ||
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. We only use
|
||
end subroutine modal_aer_opt_coords | ||
|
||
!=============================================================================== | ||
|
||
subroutine modal_aer_opt_init() | ||
|
||
use ioFileMod, only: getfil | ||
|
@@ -210,7 +238,17 @@ subroutine modal_aer_opt_init() | |
|
||
! Add diagnostic fields to history output. | ||
|
||
call addfld ('MODAL_AER_TAU_SW', (/'lev ','swband'/), 'A', '1', & | ||
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. Can you see if there's a CF standard name for any of these new variables and add it to the addfld call? 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 did some searching and looks like aerosol-radiative properties broken down by short/longwave are not there. 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 think this applies (if we choose to):
emphasis:
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. And technically, we can merge the SW and LW, but that may be a bit of a messy work... 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. Here's the others:
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.
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. Could you point me to how I could add the CF names to these 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. Use the standard_name optional argument at the end of the call.
|
||
'Aerosol shortwave extinction optical depth', flag_xyfill=.true.) | ||
call addfld ('MODAL_AER_SSA_SW', (/'lev ','swband'/), 'A', '1', & | ||
'Aerosol shortwave single scattering albedo', flag_xyfill=.true.) | ||
call addfld ('MODAL_AER_G_SW', (/'lev ','swband'/), 'A', '1', & | ||
'Aerosol shortwave assymmetry parameter', flag_xyfill=.true.) | ||
call addfld ('MODAL_AER_TAU_LW', (/'lev ','lwband'/), 'A', '1', & | ||
'Aerosol longwave absorption optical depth', flag_xyfill=.true.) | ||
call addfld ('EXTINCT',(/ 'lev' /), 'A','/m','Aerosol extinction', flag_xyfill=.true.) | ||
call addfld ('AER_TAU_SW_VIS', (/ 'lev' /), 'A', '1', & | ||
'Aerosol shortwave extinction optical depth at 550 nm', flag_xyfill=.true.) | ||
call addfld ('tropopause_m',horiz_only, 'A',' m ','tropopause level in meters', flag_xyfill=.true.) | ||
call addfld ('ABSORB',(/ 'lev' /), 'A','/m','Aerosol absorption', flag_xyfill=.true.) | ||
call addfld ('AODVIS',horiz_only, 'A',' ','Aerosol optical depth 550 nm', flag_xyfill=.true., & | ||
|
@@ -434,8 +472,18 @@ subroutine modal_aer_opt_init() | |
do ilist = 1, n_diag | ||
if (call_list(ilist)) then | ||
|
||
call addfld ('MODAL_AER_TAU_SW'//diag(ilist), (/'lev ','swband'/), 'A', '1', & | ||
'Aerosol shortwave extinction optical depth', flag_xyfill=.true.) | ||
call addfld ('MODAL_AER_SSA_SW'//diag(ilist), (/'lev ','swband'/), 'A', '1', & | ||
'Aerosol shortwave single scattering albedo', flag_xyfill=.true.) | ||
call addfld ('MODAL_AER_G_SW'//diag(ilist), (/'lev ','swband'/), 'A', '1', & | ||
'Aerosol shortwave assymmetry parameter', flag_xyfill=.true.) | ||
call addfld ('MODAL_AER_TAU_LW'//diag(ilist), (/'lev ','lwband'/), 'A', '1', & | ||
'Aerosol longwave absorption optical depth', flag_xyfill=.true.) | ||
call addfld ('EXTINCT'//diag(ilist), (/ 'lev' /), 'A','1/m', & | ||
'Aerosol extinction', flag_xyfill=.true.) | ||
call addfld ('AER_TAU_SW_VIS'//diag(ilist), (/ 'lev' /), 'A', '1', & | ||
'Aerosol shortwave extinction optical depth at 550 nm', flag_xyfill=.true.) | ||
call addfld ('ABSORB'//diag(ilist), (/ 'lev' /), 'A','1/m', & | ||
'Aerosol absorption', flag_xyfill=.true.) | ||
call addfld ('AODVIS'//diag(ilist), horiz_only, 'A',' ', & | ||
|
@@ -490,6 +538,7 @@ subroutine modal_aero_sw(list_idx, dt, state, pbuf, nnite, idxnite, is_cmip6_vol | |
|
||
! Local variables | ||
integer :: i, ifld, isw, k, l, m, nc, ns, ilev_tropp | ||
integer :: isw_p | ||
integer :: lchnk ! chunk id | ||
integer :: ncol ! number of active columns in the chunk | ||
integer :: nmodes | ||
|
@@ -540,6 +589,10 @@ subroutine modal_aero_sw(list_idx, dt, state, pbuf, nnite, idxnite, is_cmip6_vol | |
|
||
! Diagnostics | ||
real(r8) :: extinct(pcols,pver), tropopause_m(pcols) | ||
real(r8) :: aertauswvis(pcols, pver) | ||
real(r8) :: aertaubndsw(pcols,pver,nswbands) | ||
real(r8) :: aerssabndsw(pcols,pver,nswbands) | ||
real(r8) :: aerasmbndsw(pcols,pver,nswbands) | ||
real(r8) :: absorb(pcols,pver) | ||
real(r8) :: aodvis(pcols) ! extinction optical depth | ||
real(r8) :: aodall(pcols) ! extinction optical depth | ||
|
@@ -654,8 +707,13 @@ subroutine modal_aero_sw(list_idx, dt, state, pbuf, nnite, idxnite, is_cmip6_vol | |
mass(:ncol,:) = state%pdeldry(:ncol,:)*rga | ||
air_density(:ncol,:) = state%pmid(:ncol,:)/(rair*state%t(:ncol,:)) | ||
|
||
aertaubndsw(1:ncol,:pver,:) = 0.0_r8 | ||
aerssabndsw(1:ncol,:pver,:) = 0.0_r8 | ||
aerasmbndsw(1:ncol,:pver,:) = 0.0_r8 | ||
|
||
! diagnostics for visible band summed over modes | ||
extinct(1:ncol,:) = 0.0_r8 | ||
aertauswvis(1:ncol,:) = 0.0_r8 | ||
absorb(1:ncol,:) = 0.0_r8 | ||
aodvis(1:ncol) = 0.0_r8 | ||
if (is_output_interactive_volc) then | ||
|
@@ -1013,6 +1071,7 @@ subroutine modal_aero_sw(list_idx, dt, state, pbuf, nnite, idxnite, is_cmip6_vol | |
! aerosol extinction (/m) | ||
do i = 1, ncol | ||
extinct(i,k) = extinct(i,k) + dopaer(i)*air_density(i,k)/mass(i,k) | ||
aertauswvis(i,k) = aertauswvis(i,k) + dopaer(i) | ||
absorb(i,k) = absorb(i,k) + pabs(i)*air_density(i,k) | ||
aodvis(i) = aodvis(i) + dopaer(i) | ||
if ((k .le. trop_level(i)) .and. (is_output_interactive_volc)) then ! in stratosphere | ||
|
@@ -1190,6 +1249,32 @@ subroutine modal_aero_sw(list_idx, dt, state, pbuf, nnite, idxnite, is_cmip6_vol | |
|
||
end do ! sw bands | ||
|
||
do isw = 1, nswbands | ||
! For RRTMGP-specific output, reorder the RRTMG bands, such that | ||
! isw becomes RRTMGP and isw_p becomes RRTMG argument --- | ||
! an example, for isw=1 (RRTMGP), use isw_p=14 (RRTMG). | ||
if (output_aer_props_rrtmgp == 1) then | ||
isw_p = rrtmg_to_rrtmgp_swbands(isw) | ||
else | ||
isw_p = isw | ||
end if | ||
do k = top_lev, pver | ||
do i = 1, ncol | ||
aertaubndsw(i,k,isw) = tauxar(i,k,isw_p) | ||
if (tauxar(i,k,isw_p) > 0._r8) then | ||
aerssabndsw(i,k,isw) = wa(i,k,isw_p)/tauxar(i,k,isw_p) | ||
else | ||
aerssabndsw(i,k,isw) = 1._r8 | ||
end if | ||
if (wa(i,k,isw_p) > 0._r8) then | ||
aerasmbndsw(i,k,isw) = ga(i,k,isw_p)/wa(i,k,isw_p) | ||
else | ||
aerasmbndsw(i,k,isw) = 0._r8 | ||
end if | ||
end do ! 1, ncol | ||
end do ! top_lev, pver | ||
end do ! 1, nswbands | ||
|
||
! mode diagnostics | ||
! The diagnostics are currently only output for the climate list. Code mods will | ||
! be necessary to provide output for the rad_diag lists. | ||
|
@@ -1222,13 +1307,15 @@ subroutine modal_aero_sw(list_idx, dt, state, pbuf, nnite, idxnite, is_cmip6_vol | |
ilev_tropp = trop_level(i) | ||
tropopause_m(i) = state%zm(i,ilev_tropp)!in meters | ||
extinct(i,ilev_tropp) = 0.5_r8*( extinct(i,ilev_tropp) + ext_cmip6_sw(i,ilev_tropp) ) | ||
aertauswvis(i,ilev_tropp) = 0.5_r8*( aertauswvis(i,ilev_tropp) + ext_cmip6_sw(i,ilev_tropp) ) | ||
enddo | ||
do k = 1, pver | ||
do i = 1, ncol | ||
ilev_tropp = trop_level(i) | ||
if (k < ilev_tropp) then | ||
!extinction is assigned read in values only for visible band above tropopause | ||
extinct(i,k) = ext_cmip6_sw(i,k) | ||
aertauswvis(i,k) = ext_cmip6_sw(i,k) | ||
endif | ||
enddo | ||
enddo | ||
|
@@ -1246,7 +1333,11 @@ subroutine modal_aero_sw(list_idx, dt, state, pbuf, nnite, idxnite, is_cmip6_vol | |
aodabs(idxnite(i)) = fillvalue | ||
end do | ||
|
||
call outfld('MODAL_AER_TAU_SW'//diag(list_idx), aertaubndsw, pcols, lchnk) | ||
call outfld('MODAL_AER_SSA_SW'//diag(list_idx), aerssabndsw, pcols, lchnk) | ||
call outfld('MODAL_AER_G_SW'//diag(list_idx), aerasmbndsw, pcols, lchnk) | ||
call outfld('EXTINCT'//diag(list_idx), extinct, pcols, lchnk) | ||
call outfld('AER_TAU_SW_VIS'//diag(list_idx), aertauswvis, pcols, lchnk) | ||
call outfld('tropopause_m', tropopause_m, pcols, lchnk) | ||
call outfld('ABSORB'//diag(list_idx), absorb, pcols, lchnk) | ||
call outfld('AODVIS'//diag(list_idx), aodvis, pcols, lchnk) | ||
|
@@ -1376,6 +1467,7 @@ subroutine modal_aero_lw(list_idx, dt, state, pbuf, tauxar, clear_rh) | |
type(physics_buffer_desc), pointer :: pbuf(:) | ||
|
||
real(r8), intent(out) :: tauxar(pcols,pver,nlwbands) ! layer absorption optical depth | ||
real(r8) :: aertaubndlw(pcols,pver,nlwbands) | ||
real(r8), optional, intent(in) :: clear_rh(pcols,pver) ! optional clear air relative humidity | ||
! that gets passed to modal_aero_wateruptake_dr | ||
|
||
|
@@ -1430,6 +1522,7 @@ subroutine modal_aero_lw(list_idx, dt, state, pbuf, tauxar, clear_rh) | |
|
||
! initialize output variables | ||
tauxar(:ncol,:,:) = 0._r8 | ||
aertaubndlw(1:ncol,:pver,:) = 0.0_r8 | ||
|
||
! dry mass in each cell | ||
mass(:ncol,:) = state%pdeldry(:ncol,:)*rga | ||
|
@@ -1587,6 +1680,7 @@ subroutine modal_aero_lw(list_idx, dt, state, pbuf, tauxar, clear_rh) | |
|
||
do i = 1, ncol | ||
tauxar(i,k,ilw) = tauxar(i,k,ilw) + dopaer(i) | ||
aertaubndlw(i,k,ilw) = tauxar(i,k,ilw) | ||
end do | ||
|
||
end do ! k = top_lev, pver | ||
|
@@ -1595,6 +1689,8 @@ subroutine modal_aero_lw(list_idx, dt, state, pbuf, tauxar, clear_rh) | |
|
||
end do ! m = 1, nmodes | ||
|
||
call outfld('MODAL_AER_TAU_LW'//diag(list_idx), aertaubndlw, pcols, lchnk) | ||
|
||
end subroutine modal_aero_lw | ||
|
||
!=============================================================================== | ||
|
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.
@singhbalwinder I added the testmod here. I wasn't planning to add it to tests.py (our test suites) but I could do that. Any recommendation for which test suite to add this to? Paging @rljacob for advice as well :)
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.
Sorry, I missed this file. This looks fine to me unless we would like to compare against the baselines. If we want to add it to the nightlies, we can add it to one of the integration suites.
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 it to e3sm_atm_integration