Skip to content
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

SNICAR snow albedo scheme updates #1861

Merged
merged 72 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
a625eac
add output for SNICAR related albedo variables
cenlinhe Jan 19, 2022
759ef18
bug fix for adding new albedo output variables
cenlinhe Jan 20, 2022
e3c5459
expand SNICAR from 5-band to 480-band with namelist control option
cenlinhe Jan 25, 2022
314c7d3
add adding-doubling solver in SNICAR with namelist option
cenlinhe Jan 26, 2022
3e9299f
add nonspherical snow grains with namelist option
cenlinhe Jan 28, 2022
e006dc5
add BC-snow internal mixing and namelist control
cenlinhe Jan 29, 2022
43e52bf
add dust-snow internal mixing and namelist control
cenlinhe Jan 29, 2022
7dc18ab
bug fix for BC/dust-snow internal mixing
cenlinhe Jan 29, 2022
9d5fee6
update 5-band input optics database & move DO_SNO_OC to namelist control
cenlinhe Feb 1, 2022
a6e168e
add DO_SNO_OC to namelist_definition_ctsm
cenlinhe Feb 1, 2022
7191233
bug fix for albsni_hst2
cenlinhe Apr 11, 2022
83991f7
correcting default values for new SNICAR namelist options
cenlinhe Apr 11, 2023
b4a30d6
Merge remote-tracking branch 'escomp/master' into snicar_allupdate
slevis-lmwg Jul 19, 2023
a6422a2
Merge remote-tracking branch 'escomp/master' into snicar_allupdate
slevis-lmwg Jul 28, 2023
32ca5ec
snicar_snw_optics: keep option 3 only
slevis-lmwg Aug 2, 2023
725f527
snicar_rt_solver: keep option 2 only
slevis-lmwg Aug 3, 2023
5f8d50d
snicar_snw_shape: replace integers with descriptive options
slevis-lmwg Aug 3, 2023
3164bc6
snicar_solarspec & snicar_dust_optics: replace integers with descript…
slevis-lmwg Aug 3, 2023
230e3fc
General clean-up of other snicar switches and comments
slevis-lmwg Aug 3, 2023
4ab6738
Some clean-up associated with snicar_numrad_snw
slevis-lmwg Aug 4, 2023
21b607d
Update namelist defaults and differentiate clm5_1 from 5_0, 4_5
slevis-lmwg Aug 4, 2023
604968e
Minor cleanup of unnecessary things
slevis-lmwg Aug 4, 2023
9cd7a55
Minor cleanup of unused things
slevis-lmwg Aug 7, 2023
a0cd959
Rename use_snicar_frc to snicar_aerforc_diag and make default .false.
slevis-lmwg Aug 7, 2023
0e6f1df
Correction of a typo in /testmods_dirs/.../user_nl_clm
slevis-lmwg Aug 8, 2023
55e91e4
Replace dimension 8 with ngmax for two arrays; wait to hear about others
slevis-lmwg Aug 8, 2023
992ef0f
Minor refactor: replace some / and ** with *, replace some ifs with m…
slevis-lmwg Aug 8, 2023
5ddaa34
Correct comments that label hydrophilic/phobic OC and BC
slevis-lmwg Aug 9, 2023
d47da29
Consolidated fsnowoptics480 with fsnowoptics
slevis-lmwg Aug 9, 2023
afbe2d6
Add quotes to correct namelist_defaults_ctsm.xml
slevis-lmwg Aug 10, 2023
9808d1a
Consolidate some repetitive code pertaining to wvl_ct
slevis-lmwg Aug 10, 2023
5ad655a
Reduce repetitive code in 'Weight output NIR albedo' section
slevis-lmwg Aug 10, 2023
40bcf15
Reduce repetitive code in 'Weight output NIR absorbed' section
slevis-lmwg Aug 10, 2023
98f229a
Replace if-statements with min/max
slevis-lmwg Aug 10, 2023
2ee70af
Replace another if-statmt with max and two ints with floats
slevis-lmwg Aug 10, 2023
2a4159d
Merge remote-tracking branch 'escomp/master' into snicar_allupdate
slevis-lmwg Aug 11, 2023
5709993
Add a clarifying comment to the code
slevis-lmwg Aug 11, 2023
a5e8c7c
Draft of ChangeLog/Sum files
slevis-lmwg Aug 11, 2023
093e54c
Update to the ChangeLog
slevis-lmwg Aug 11, 2023
f0b6d60
Update2 to the ChangeLog
slevis-lmwg Aug 11, 2023
ab5b8f4
Merge remote-tracking branch 'escomp/master' into snicar_allupdate
slevis-lmwg Aug 28, 2023
557e664
Merge remote-tracking branch 'escomp/master' into snicar_allupdate
slevis-lmwg Aug 29, 2023
d4be616
Merge tag 'ctsm5.1.dev139'
slevis-lmwg Sep 10, 2023
1b0f7a2
Rm Defaults from snicar vars in namelist_definition
slevis-lmwg Sep 22, 2023
27f3237
Rm one more Default
slevis-lmwg Sep 22, 2023
0129068
Add licencing info to subr. piecewise_linear_interp1d
slevis-lmwg Sep 25, 2023
05ea928
Add readv argument to call ncd_io in SnowSnicarMod (not tested, yet)
slevis-lmwg Sep 26, 2023
8cf2c70
Updates to last commit for test to PASS
slevis-lmwg Sep 26, 2023
ffc8eae
Replace 3600 with secsphr
slevis-lmwg Sep 27, 2023
55ad199
Replace indices 1, 2 with ivis, inir where appropriate
slevis-lmwg Sep 27, 2023
33c8524
Replace 1e5 with enh_omg_max parameter
slevis-lmwg Sep 27, 2023
eb10335
Replace hardwired numbers with parameters and other clean-up
slevis-lmwg Sep 27, 2023
3f0fe62
Changed many constants to parameters and other minor clean-up
slevis-lmwg Sep 28, 2023
00493ef
Change some arrays to parameters
slevis-lmwg Sep 28, 2023
ed2a177
Change more arrays to parameters
slevis-lmwg Sep 29, 2023
eddb844
Add case default lines and corresponding error messages
slevis-lmwg Sep 29, 2023
d6b92ec
Change two more arrays to parameters
slevis-lmwg Sep 29, 2023
99ee926
Replace suffixes 1 & 2 representing hydrophillic/phobic w hphil/hphob
slevis-lmwg Sep 29, 2023
94846be
Replace pointers with allocatables
slevis-lmwg Sep 29, 2023
b892252
Improve error checks and comments
slevis-lmwg Oct 5, 2023
20ce1ea
Remove option of running this copy of snicar in csim
slevis-lmwg Oct 5, 2023
f952e50
Replace hardwired numbers with parameters
slevis-lmwg Oct 5, 2023
eeba54f
Add comment explaining posNOTonfile=.true.
slevis-lmwg Oct 6, 2023
67bf624
Merge remote-tracking branch 'escomp/master' into snicar_allupdate
slevis-lmwg Oct 6, 2023
3838ceb
Correct syntax error
slevis-lmwg Oct 6, 2023
3a4ffdc
Merge remote-tracking branch 'escomp/master' into snicar_allupdate
slevis-lmwg Oct 17, 2023
6adba3d
Remove a bit of redundant code and change a comment
slevis-lmwg Oct 17, 2023
a2370a0
CLMBuildNamelist.pm: Put most snicar error checks in loop
slevis-lmwg Oct 18, 2023
f0260cf
Revert snicar_aerforc_diag to original use_snicar_frc
slevis-lmwg Oct 18, 2023
1890865
Removing duplicate lines of code #2129 #2107
slevis-lmwg Oct 19, 2023
44d128e
Merge branch 'master' into snicar_allupdate
slevis-lmwg Oct 19, 2023
82a335a
Merge remote-tracking branch 'escomp/master' into snicar_allupdate
slevis-lmwg Oct 19, 2023
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
56 changes: 56 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,56 @@ specify spatially variable soil thickness. If not present, use bottom
of soil column (nlevsoi).
</entry>

<entry id="snicar_numrad_snw" type="integer" category="clm_physics"
group="clm_inparm" valid_values="5,480" >
number of wavelength bands used in SNICAR snow albedo calculation
</entry>

<entry id="snicar_solarspec" type="integer" category="clm_physics"
group="clm_inparm" valid_values="1,2,3,4,5,6" >
type of downward solar radiation spectrum for SNICAR snow albedo calculation
</entry>

<entry id="snicar_snw_optics" type="integer" category="clm_physics"
group="clm_inparm" valid_values="1,2,3" >
snow optics type using different refractive index databases in SNICAR
</entry>

<entry id="snicar_dust_optics" type="integer" category="clm_physics"
group="clm_inparm" valid_values="1,2,3" >
dust optics type for SNICAR snow albedo calculation
</entry>

<entry id="snicar_use_aerosol" type="logical" category="clm_physics"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make an issue to make these logical variables start with the CTSM "use_" prefix convention so you can readily see they are logical's. This is good for usability.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linking new issue #2205

group="clm_inparm" valid_values="" value=".true.">
Toggle to turn on/off aerosol deposition flux in snow in SNICAR
</entry>

<entry id="snicar_rt_solver" type="integer" category="clm_physics"
group="clm_inparm" valid_values="1,2" >
SNICAR radiative transfer solver type
</entry>

<entry id="snicar_snw_shape" type="integer" category="clm_physics"
group="clm_inparm" valid_values="1,2,3,4" >
snow grain shape used in SNICAR snow albedo calculation
</entry>

<entry id="snicar_snobc_intmix" type="logical" category="clm_physics"
group="clm_inparm" valid_values="" value=".true." >
option to activate BC-snow internal mixing in SNICAR snow albedo calculation
</entry>

<entry id="snicar_snodst_intmix" type="logical" category="clm_physics"
group="clm_inparm" valid_values="" value=".true." >
option to activate dust-snow internal mixing in SNICAR snow albedo calculation
</entry>

<entry id="DO_SNO_OC" type="logical" category="clm_physics"
group="clm_inparm" valid_values="" value=".false." >
option to activate organic carbon (OC) in SNICAR snow albedo calculation
</entry>

<entry id="rooting_profile_method_water" type="integer" category="clm_physics"
group="rooting_profile_inparm" valid_values="0,1,2" >
Index of rooting profile for water
Expand Down Expand Up @@ -759,6 +809,12 @@ Full pathname of surface data file.
SNICAR (SNow, ICe, and Aerosol Radiative model) optical data file name
</entry>

<entry id="fsnowoptics480" type="char*256" category="datasets"
input_pathname="abs" group="clm_inparm" valid_values="" >
SNICAR (SNow, ICe, and Aerosol Radiative model) 480-band optical data file name
</entry>


<entry id="fsnowaging" type="char*256" category="datasets"
input_pathname="abs" group="clm_inparm" valid_values="" >
SNICAR (SNow, ICe, and Aerosol Radiative model) snow aging data file name
Expand Down
28 changes: 28 additions & 0 deletions src/biogeophys/AerosolMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module AerosolMod
use WaterDiagnosticBulkType , only : waterdiagnosticbulk_type
use ColumnType , only : col
use abortutils , only : endrun
use CLM_varctl , only : snicar_use_aerosol ! cenlin
!
! !PUBLIC TYPES:
implicit none
Expand Down Expand Up @@ -806,6 +807,33 @@ subroutine AerosolFluxes(bounds, num_snowc, filter_snowc, &
forc_aer(g,13) + forc_aer(g,14)
end do

! if turn off aerosol effect in snow, zero out deposition flux
if (.not. snicar_use_aerosol) then
do c = bounds%begc,bounds%endc
g = col%gridcell(c)

flx_bc_dep_dry(c) = 0._r8
flx_bc_dep_wet(c) = 0._r8
flx_bc_dep_phi(c) = 0._r8
flx_bc_dep_pho(c) = 0._r8
flx_bc_dep(c) = 0._r8
flx_oc_dep_dry(c) = 0._r8
flx_oc_dep_wet(c) = 0._r8
flx_oc_dep_phi(c) = 0._r8
flx_oc_dep_pho(c) = 0._r8
flx_oc_dep(c) = 0._r8
flx_dst_dep_wet1(c) = 0._r8
flx_dst_dep_dry1(c) = 0._r8
flx_dst_dep_wet2(c) = 0._r8
flx_dst_dep_dry2(c) = 0._r8
flx_dst_dep_wet3(c) = 0._r8
flx_dst_dep_dry3(c) = 0._r8
flx_dst_dep_wet4(c) = 0._r8
flx_dst_dep_dry4(c) = 0._r8
flx_dst_dep(c) = 0._r8
end do
end if

! aerosol deposition fluxes into top layer
! This is done after the inter-layer fluxes so that some aerosol
! is in the top layer after deposition, and is not immediately
Expand Down
Loading
Loading