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

Hillslope merge #2390

Merged
merged 192 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 191 commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
52d5058
hillslope_hydrology_n01_clm4_5_14_r223
swensosc Feb 9, 2017
1af8d11
hillslope_hydrology_n02_clm4_5_14_r223
swensosc Feb 10, 2017
ee1fc0e
hillslope_hydrology_n03_clm4_5_14_r223
swensosc Feb 13, 2017
2d07001
hillslope_hydrology_n04_clm4_5_14_r226
swensosc Mar 7, 2017
fa7b4ec
hillslope_hydrology_n05_clm4_5_14_r226
swensosc Mar 14, 2017
73b2833
hillslope_hydrology_n06_clm4_5_14_r226
swensosc Mar 17, 2017
69d35dd
hillslope_hydrology_n07_clm4_5_14_r226
swensosc Apr 4, 2017
de6ce31
hillslope_hydrology_n08_clm4_5_14_r226
swensosc Apr 5, 2017
48f09fc
hillslope_hydrology_n09_clm4_5_14_r226
swensosc Dec 19, 2017
78096d5
hillslope_hydrology_n09_clm4_5_18_r270
billsacks Jan 2, 2018
0faafb1
hillslope_hydrology_n10_clm4_5_18_r270
billsacks Jan 2, 2018
031da7a
Merge tag 'clm4_5_18_r270' into hillslope_hydrology
billsacks Jan 12, 2018
c1b7412
Merge branch 'andre-standalone-dev' into hillslope_hydrology
billsacks Jan 17, 2018
9c3d3ce
Merge branch 'andre-standalone-dev' into hillslope_hydrology
billsacks Jan 17, 2018
dbbe17a
Add capability to read in hillslope geomorphology from surface data
swensosc Mar 12, 2018
7a84847
initial implementation of slope/aspect effects on incident direct sol…
swensosc Mar 14, 2018
be27720
correct col_ndx assignment
swensosc Aug 27, 2018
6487698
read hillslope geomorphological parametes from file
swensosc Aug 30, 2018
c747ee1
merged w/ escomp/master
swensosc Aug 30, 2018
9ee73ba
merge w/ initial isotope refactoring
swensosc Aug 30, 2018
7310baa
add stream depth from routing model; note, requires cime/mosart changes
swensosc Sep 11, 2018
49010fa
add tdepth to lnd
swensosc Sep 11, 2018
4b9ff7b
fix calculattion of col%colu
swensosc Sep 11, 2018
6019ade
add river depth to coupler
swensosc Oct 5, 2018
0c967fb
refactor SoilHydrologyMod for case of subsurface backflow
swensosc Oct 18, 2018
2d352c2
add stream depth
swensosc Oct 19, 2018
6b32610
add ncol minimum in subgridMod
swensosc Oct 23, 2018
3bd204b
merge with hillslope_hydrology
swensosc Oct 23, 2018
51247fa
fix tdepth
swensosc Oct 24, 2018
bac3e39
fix tdepth
swensosc Oct 24, 2018
c6be77e
merge to master
swensosc Mar 21, 2019
77e1cd3
update externals to point to hillslope_hydrology cime and mosart bran…
swensosc Apr 3, 2019
b2e4b74
update CLMBuildNamelist.pm for hillslope_hydrology_inparm
swensosc Apr 3, 2019
8387050
initialize column level direct solar forcing
swensosc Apr 4, 2019
5f54a18
remove analytical hillslope methods
swensosc Apr 21, 2020
6a00ef0
merge to master
swensosc Apr 21, 2020
151a474
minor cleanup
swensosc Apr 22, 2020
22a433b
fix bug in hillslope_area calculation
swensosc Apr 23, 2020
f69d6e0
add downscaling in TopoMod
swensosc Apr 23, 2020
e452966
remove urban from endrun message
swensosc Apr 24, 2020
4ee9ace
fix wtlunit recalculation
swensosc Sep 4, 2020
11a2911
convert arrayl to integer in surfrdMod
swensosc Sep 9, 2020
7fbfe38
fix elevation used in TopoMod
swensosc Oct 9, 2020
3a50c6a
add hillslope bedrock field
swensosc Nov 18, 2020
556dacc
merge to master
swensosc Mar 8, 2021
b5e62e1
merge to master
swensosc Mar 9, 2021
fbbe876
add precipitation downscaling
swensosc Mar 9, 2021
d86736e
add conditional to histFileMod
swensosc Mar 10, 2021
ae6085e
enable fates multi-column restarts
swensosc Mar 18, 2021
9dd871b
add units in ColumnType
swensosc Mar 18, 2021
069c910
add stream channel to ctsm
swensosc Mar 23, 2021
cbd6341
add to gridcell balance check
swensosc Mar 24, 2021
2bf70fd
fix wtlunit
swensosc Mar 31, 2021
03967e0
scale qdischarge
swensosc Mar 31, 2021
5940bd2
minor formatting
swensosc Mar 31, 2021
3dea895
add use_hillslope_routing namelist variable
swensosc Jul 14, 2021
98d1c45
re-add tdepth
swensosc Jul 14, 2021
31585df
initialize stream_water_lun
swensosc Jul 19, 2021
cf9f512
fix solar normalization
swensosc Jul 21, 2021
3e52233
add tdepth to nuopc
swensosc Sep 3, 2021
7df3dde
add downscaling flag
swensosc Sep 7, 2021
ffc3838
add downscaling flag
swensosc Sep 7, 2021
90bfa0c
add stream channel variable
swensosc Sep 7, 2021
3354cfe
add files
swensosc Sep 7, 2021
2ccca4e
update Externals.cfg
swensosc Sep 8, 2021
641b013
add fill value in histFileMod
swensosc Sep 8, 2021
81d4fb2
add downscale_hillslope_meteorology flag to TopoMod
swensosc Sep 20, 2021
6a9f979
correct hillslope routing water balance
swensosc Sep 23, 2021
e8814ec
move streamflow variable
swensosc Sep 23, 2021
e8d9c81
add drain_perched term in lnd2atmMod
swensosc Sep 23, 2021
230b15c
merge lateral subsurface flow subroutines
swensosc Nov 16, 2021
f64b69e
fix typo
swensosc Nov 16, 2021
0f57012
move InitHillslope before SoilStateInitTimeConst
swensosc Dec 3, 2021
7309558
add downscaling flag to SurfaceAlbedoMod
swensosc Dec 8, 2021
7bd8c92
add coszen_grc restart field
swensosc Jan 6, 2022
d655c0c
fix hillslope routing water balance
swensosc Apr 15, 2022
0655e12
merge to main
swensosc Apr 15, 2022
f640751
update hllslope_hydrology to master
swensosc May 5, 2022
edcf043
correct frost table value
swensosc May 5, 2022
7c20b41
fix inequality in perchedlateralflow
swensosc May 6, 2022
e1dc2ef
Minor cleanup
billsacks May 13, 2022
48e3a51
add namelist variables and remove omp directives
swensosc May 24, 2022
54545c0
merge with hillslope_hydrology
swensosc May 24, 2022
84f14ff
remove origflag and fracice
swensosc May 24, 2022
602eda0
clean up SoilHydrologyMod
swensosc May 24, 2022
4095d6c
remove hill_pftndx from column type
swensosc May 24, 2022
286edbe
add endrun for streamflow_method
swensosc May 24, 2022
fc6e667
Merge branch 'hillslope_hydrology' into hillslope_hydrology
swensosc May 24, 2022
c7caac7
Merge pull request #5 from billsacks/hillslope_hydrology
swensosc May 24, 2022
4060495
Merge tag 'ctsm5.1.dev097' into hillslope_hydrology
billsacks May 24, 2022
4593dff
Merge commit 'c3108e8c7' into hillslope_hydrology
billsacks May 24, 2022
6800cc8
Merge branch 'master' into hillslope_hydrology
billsacks May 24, 2022
71083f4
add downscaling identifiers to variables
swensosc May 25, 2022
14ffa23
reorder topo_col calculation
swensosc May 25, 2022
84b7093
change downscaling normalization weights
swensosc May 25, 2022
90bbebd
add set_c2l_scale call to subgridAveMod routines
swensosc May 26, 2022
0017cc5
add check to CLMBuildNamelist.pm
swensosc May 26, 2022
66e6fbc
add namelist variables for pft distribution
swensosc May 26, 2022
cb50d27
create setSoilLayerClass subroutine
swensosc May 26, 2022
c23fee1
modify solar radiation energy balance check
swensosc May 27, 2022
e46c80a
fix circular dependency due to namelist
swensosc Jun 1, 2022
93d2e17
modify subgrid weights
swensosc Jun 3, 2022
8fa6767
change gridcell average runoff calculation
swensosc Jun 3, 2022
36627d8
remove qdischarge from HillslopeUpdateStreamWater
swensosc Jun 7, 2022
014868e
minor cleanup
swensosc Jul 15, 2022
1b029d0
Remove build-namelist tests of origflag
billsacks Jul 16, 2022
9ff7241
Remove origflag=1 setting from oldhyd test
billsacks Jul 16, 2022
c6f4441
Fix build-namelist test count
billsacks Jul 16, 2022
1b5a4b2
Get unit tests passing
billsacks Jul 17, 2022
99cfb53
Temporary workaround for bare land smb flux issue
billsacks Jul 18, 2022
78cbfed
more minor fixes
swensosc Jul 18, 2022
64ba19d
Merge pull request #6 from billsacks/hillslope_hydrology
swensosc Jul 18, 2022
607ee4d
move initHillslope call earlier
swensosc Jul 21, 2022
c4d2037
update patch%mxy
swensosc Jul 22, 2022
e4c79e6
fix circular dependency (use_fun)
swensosc Aug 4, 2022
569cbbd
remove comments
swensosc Aug 4, 2022
5a5ab1d
move allocate statement in HillslopeHydrologyMod
swensosc Aug 9, 2022
96ded97
fix linear soil profile slope
swensosc Aug 26, 2022
d658d57
merge with main
swensosc Sep 14, 2022
61eb82f
minor cleanup
swensosc Sep 15, 2022
3ef6829
add illumination threshold for solar downscaling
swensosc Nov 11, 2022
98636e8
no hillslope columns when lun%wtgcell is zero
swensosc Nov 18, 2022
00e71e1
write global indices
swensosc Feb 3, 2023
806c6f6
add h_slope
swensosc May 15, 2023
dde5250
merge to main
swensosc Jul 20, 2023
2d9cb4d
back out surface water drainage change
swensosc Aug 21, 2023
3f4b9a8
small fixes
swensosc Aug 22, 2023
3034da1
back out two answer changers
swensosc Sep 11, 2023
5924c68
reintroduce if-block
swensosc Sep 11, 2023
595d95d
Merge tag 'ctsm5.1.dev142' into hillslope_hydrology-ssr
samsrabin Oct 4, 2023
4708a4a
use find_k_max_indices in surfrdMod
swensosc Oct 5, 2023
e1ce650
Merge branch 'hillslope_hydrology' into hillslope_hydrology-ssr
samsrabin Oct 6, 2023
d303ccb
Whitespace alignment in CLMBuildNamelist.pm.
samsrabin Oct 6, 2023
bd4a04e
Remove redundant check in CLMBuildNamelist.pm.
samsrabin Oct 6, 2023
5491aae
remove HillslopeDominantPft
swensosc Oct 6, 2023
79141f8
Do not allow use_hillslope with transient land cover change.
samsrabin Oct 6, 2023
fa5161f
Compile fixes from merge of ctsm5.1.dev142.
samsrabin Oct 6, 2023
53b8719
Add Hillslope test.
samsrabin Nov 3, 2023
0e7a9a9
Removed NTASKS=-2 from shell_commands.
samsrabin Nov 3, 2023
dbf6845
set c_dst
swensosc Nov 28, 2023
226f038
move g assignment out of if-block
swensosc Nov 28, 2023
e8af14d
revert last change; instead move forc_solar_col inside if-block
swensosc Nov 28, 2023
d06c3a5
move g
swensosc Nov 28, 2023
89a5671
Merge branch 'hillslope_hydrology' into hillslope_hydrology-ssr
samsrabin Dec 1, 2023
6efd50c
Update externals to work on Derecho.
samsrabin Dec 1, 2023
c477363
Misc. whitespace fixes and reversions.
samsrabin Dec 1, 2023
c7c8130
Remove a commented-out bit.
samsrabin Dec 1, 2023
7b77ae0
Merge tag 'ctsm5.1.dev156' into hillslope_hydrology-ssr
samsrabin Dec 4, 2023
55124be
Use DIN_LOC_ROOT in Hillslope test.
samsrabin Dec 4, 2023
ce9ed80
More whitespace fixes/reversions.
samsrabin Dec 4, 2023
50c0e7a
merge to main
swensosc Dec 29, 2023
989bcd3
Merge remote-tracking branch 'escomp' into merge_hillslope_hydrology
swensosc Dec 29, 2023
c7c6602
merge to main
swensosc Dec 29, 2023
a61b080
Merge branch 'hillslope_hydrology' into hillslope_hydrology-ssr
samsrabin Jan 8, 2024
44d37e7
add check for stream channel
swensosc Jan 19, 2024
efbeef4
Merge remote-tracking branch 'swensosc/hillslope_hydrology' into hill…
samsrabin Jan 19, 2024
54f765a
Hillslope test: Use fixed fsurdat.
samsrabin Jan 19, 2024
55e14eb
Remove EOL whitespace from HillslopeHydrologyMod.
samsrabin Jan 19, 2024
07969f0
Merge tag 'ctsm5.1.dev164' into hillslope_hydrology-ssr
samsrabin Jan 19, 2024
c5be402
Alignment changes in HillslopeHydrologyMod.
samsrabin Jan 22, 2024
51c95e5
Check for unrecognized pft_distribution_method in surfrd_hillslope().
samsrabin Jan 22, 2024
41a7e0d
Error on unhandled soil_profile_method in SetHillslopeSoilThickness().
samsrabin Jan 22, 2024
b1433a0
Fix logic for missing h_bedrock error check.
samsrabin Jan 22, 2024
8abcb55
Remove check_npatches, which was hard-coded true.
samsrabin Jan 22, 2024
00d2b1e
Un-nest "if (masterproc)" in HillslopeHydrologyMod.
samsrabin Jan 22, 2024
8f3d6ab
HillslopeHydrologyMod: Consistent whitespace in if statements.
samsrabin Jan 22, 2024
04bceb0
Check for unrecognized pft_distribution_method in InitHillslope().
samsrabin Jan 22, 2024
12721d4
Point Hillslope test at testdata/ instead of surfdata/.
samsrabin Jan 24, 2024
4d0da3d
Add Hillslope_DominantPftUniform and Hillslope_SoilProfileLinear test…
samsrabin Jan 24, 2024
03cc0f2
Add optional do_not_collapse arg to collapse_to_dominant().
samsrabin Jan 23, 2024
02d2cf7
Use collapse_to_dominant() in surfrd_hillslope().
samsrabin Jan 24, 2024
fd5ed37
Functionize & unit-test HillslopeSoilThicknessProfile_linear().
samsrabin Jan 26, 2024
6513894
Remove a leftover troubleshooting write().
samsrabin Jan 26, 2024
b84720c
Exit early from loop in HillslopeSoilThicknessProfile_linear().
samsrabin Jan 26, 2024
b426ce1
Better unit testing of HillslopeSoilThicknessProfile_linear().
samsrabin Jan 26, 2024
65ac615
Cleanup in HillslopeHydrologyUtils test.
samsrabin Jan 26, 2024
689a550
Rename to test_collapse_to_dom_do_not_collapse.
samsrabin Jan 26, 2024
1c8b468
Add test_collapse_to_dom_do_not_collapse_present_false.
samsrabin Jan 26, 2024
0ce76f0
Fix expected vs. actual in assertEqual() in test_surfrdUtils.
samsrabin Jan 26, 2024
c36280c
Delete 'found on surface data set' msgs from HillslopeHydrologyMod.
samsrabin Jan 27, 2024
0df44c9
Reduce nesting in HillslopeHydrologyMod.
samsrabin Jan 27, 2024
9c0123c
Remove if (masterproc) conditions on error checks outside initializat…
samsrabin Jan 27, 2024
a2b5788
Delete development testmods
samsrabin Jan 29, 2024
83e0bec
Fully specify namelist settings for Hillslope test.
samsrabin Jan 29, 2024
b026e2e
Add 3 new hillslope testmods:
samsrabin Jan 29, 2024
ed5e0ae
Add 4 hillslope tests to testlist_clm.xml:
samsrabin Jan 29, 2024
dbae8b6
Change an intent(out) to inout, satisfying nag test.
samsrabin Jan 29, 2024
220f314
Merge pull request #9 from samsrabin/hillslope_hydrology-ssr4
swensosc Feb 7, 2024
14f86af
make variable names consistent
swensosc Feb 7, 2024
b6280df
Merge pull request #1715 from swensosc/hillslope_hydrology
samsrabin Feb 28, 2024
9f46462
Hillslope tests now use v1.3 surface dataset.
samsrabin Feb 28, 2024
c222737
Update ChangeLog and ChangeSum.
samsrabin Feb 28, 2024
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
2 changes: 1 addition & 1 deletion Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ tag = v1.0.8
required = False

[externals_description]
schema_version = 1.0.0
schema_version = 1.0.0
42 changes: 33 additions & 9 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,7 @@ sub process_namelist_inline_logic {
setup_logic_glacier($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref);
setup_logic_dynamic_plant_nitrogen_alloc($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_luna($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_hillslope($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_o3_veg_stress_method($opts, $nl_flags, $definition, $defaults, $nl,$physv);
setup_logic_hydrstress($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_dynamic_roots($opts, $nl_flags, $definition, $defaults, $nl, $physv);
Expand Down Expand Up @@ -2706,6 +2707,8 @@ sub setup_logic_do_transient_pfts {
$cannot_be_true = "$var cannot be combined with use_cndv";
} elsif (&value_is_true($nl->get_value('use_fates'))) {
$cannot_be_true = "$var cannot be combined with use_fates";
} elsif (&value_is_true($nl->get_value('use_hillslope'))) {
$cannot_be_true = "$var cannot be combined with use_hillslope";
}

if ($cannot_be_true) {
Expand Down Expand Up @@ -2781,6 +2784,8 @@ sub setup_logic_do_transient_crops {
# do_transient_crops. However, this hasn't been tested, so to be safe,
# we are not allowing this combination for now.
$cannot_be_true = "$var has not been tested with FATES, so for now these two options cannot be combined";
} elsif (&value_is_true($nl->get_value('use_hillslope'))) {
$cannot_be_true = "$var cannot be combined with use_hillslope";
}

if ($cannot_be_true) {
Expand Down Expand Up @@ -2876,6 +2881,8 @@ sub setup_logic_do_transient_lakes {
if (&value_is_true($nl->get_value($var))) {
if (&value_is_true($nl->get_value('collapse_urban'))) {
$log->fatal_error("$var cannot be combined with collapse_urban");
} elsif (&value_is_true($nl->get_value('use_hillslope'))) {
$log->fatal_error("$var cannot be combined with use_hillslope");
}
if ($n_dom_pfts > 0 || $n_dom_landunits > 0 || $toosmall_soil > 0 || $toosmall_crop > 0 || $toosmall_glacier > 0 || $toosmall_lake > 0 || $toosmall_wetland > 0 || $toosmall_urban > 0) {
$log->fatal_error("$var cannot be combined with any of the of the following > 0: n_dom_pfts > 0, n_dom_landunit > 0, toosmall_soil > 0._r8, toosmall_crop > 0._r8, toosmall_glacier > 0._r8, toosmall_lake > 0._r8, toosmall_wetland > 0._r8, toosmall_urban > 0._r8");
Expand Down Expand Up @@ -2939,6 +2946,8 @@ sub setup_logic_do_transient_urban {
if (&value_is_true($nl->get_value($var))) {
if (&value_is_true($nl->get_value('collapse_urban'))) {
$log->fatal_error("$var cannot be combined with collapse_urban");
} elsif (&value_is_true($nl->get_value('use_hillslope'))) {
$log->fatal_error("$var cannot be combined with use_hillslope");
}
if ($n_dom_pfts > 0 || $n_dom_landunits > 0 || $toosmall_soil > 0 || $toosmall_crop > 0 || $toosmall_glacier > 0 || $toosmall_lake > 0 || $toosmall_wetland > 0 || $toosmall_urban > 0) {
$log->fatal_error("$var cannot be combined with any of the of the following > 0: n_dom_pfts > 0, n_dom_landunit > 0, toosmall_soil > 0._r8, toosmall_crop > 0._r8, toosmall_glacier > 0._r8, toosmall_lake > 0._r8, toosmall_wetland > 0._r8, toosmall_urban > 0._r8");
Expand Down Expand Up @@ -3268,12 +3277,8 @@ sub setup_logic_hydrology_switches {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_subgrid_fluxes');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'snow_cover_fraction_method');
my $subgrid = $nl->get_value('use_subgrid_fluxes' );
my $origflag = $nl->get_value('origflag' );
my $h2osfcflag = $nl->get_value('h2osfcflag' );
my $scf_method = $nl->get_value('snow_cover_fraction_method');
if ( $origflag == 1 && &value_is_true($subgrid) ) {
$log->fatal_error("if origflag is ON, use_subgrid_fluxes can NOT also be on!");
}
if ( $h2osfcflag == 1 && ! &value_is_true($subgrid) ) {
$log->fatal_error("if h2osfcflag is ON, use_subgrid_fluxes can NOT be off!");
}
Expand All @@ -3297,9 +3302,6 @@ sub setup_logic_hydrology_switches {
if ( defined($use_vic) && defined($lower) && (&value_is_true($use_vic)) && $lower != 3 && $lower != 4) {
$log->fatal_error( "If use_vichydro is on -- lower_boundary_condition can only be table or aquifer" );
}
if ( defined($origflag) && defined($use_vic) && (&value_is_true($use_vic)) && $origflag == 1 ) {
$log->fatal_error( "If use_vichydro is on -- origflag can NOT be equal to 1" );
}
if ( defined($h2osfcflag) && defined($lower) && $h2osfcflag == 0 && $lower != 4 ) {
$log->fatal_error( "If h2osfcflag is 0 lower_boundary_condition can only be aquifer" );
}
Expand Down Expand Up @@ -3481,6 +3483,28 @@ sub setup_logic_luna {

#-------------------------------------------------------------------------------

sub setup_logic_hillslope {
#
# Hillslope model
#
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_hillslope' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'downscale_hillslope_meteorology' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_head_gradient_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_transmissivity_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_pft_distribution_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_soil_profile_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_hillslope_routing', 'use_hillslope'=>$nl_flags->{'use_hillslope'} );
my $use_hillslope = $nl->get_value('use_hillslope');
my $use_hillslope_routing = $nl->get_value('use_hillslope_routing');
if ( (! &value_is_true($use_hillslope)) && &value_is_true($use_hillslope_routing) ) {
$log->fatal_error("Cannot turn on use_hillslope_routing when use_hillslope is off\n" );
}
}

#-------------------------------------------------------------------------------

sub setup_logic_hydrstress {
#
# Plant hydraulic stress model
Expand Down Expand Up @@ -4209,7 +4233,6 @@ sub setup_logic_soil_resis {

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'soil_resis_method' );
}
#-------------------------------------------------------------------------------

sub setup_logic_canopyfluxes {
#
Expand Down Expand Up @@ -4585,6 +4608,7 @@ sub write_output_files {

# CLM component
my @groups;

@groups = qw(clm_inparm ndepdyn_nml popd_streams urbantv_streams light_streams
soil_moisture_streams lai_streams atm2lnd_inparm lnd2atm_inparm clm_canopyhydrology_inparm cnphenology
cropcal_streams
Expand All @@ -4594,7 +4618,7 @@ sub write_output_files {
soilhydrology_inparm luna friction_velocity mineral_nitrogen_dynamics
soilwater_movement_inparm rooting_profile_inparm
soil_resis_inparm bgc_shared canopyfluxes_inparm aerosol
clmu_inparm clm_soilstate_inparm clm_nitrogen clm_snowhydrology_inparm
clmu_inparm clm_soilstate_inparm clm_nitrogen clm_snowhydrology_inparm hillslope_hydrology_inparm hillslope_properties_inparm
cnprecision_inparm clm_glacier_behavior crop_inparm irrigation_inparm
surfacealbedo_inparm water_tracers_inparm tillage_inparm);

Expand Down
12 changes: 12 additions & 0 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,18 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<cnegcrit phys="clm4_5" use_cn=".true.">-6.d+2</cnegcrit>
<nnegcrit phys="clm4_5" use_cn=".true.">-6.d+1</nnegcrit>


<!-- Hillslope hydrology -->
<use_hillslope >.false.</use_hillslope>
<use_hillslope phys="clm4_5" >.false.</use_hillslope>
<use_hillslope phys="clm5_0" >.false.</use_hillslope>
<use_hillslope_routing >.false.</use_hillslope_routing>
<hillslope_head_gradient_method >Darcy</hillslope_head_gradient_method>
<hillslope_transmissivity_method >LayerSum</hillslope_transmissivity_method>
<hillslope_pft_distribution_method >Standard</hillslope_pft_distribution_method>
<hillslope_soil_profile_method >Uniform</hillslope_soil_profile_method>
<downscale_hillslope_meteorology >.true.</downscale_hillslope_meteorology>

<!-- Plant hydraulic stress -->
<use_hydrstress >.false.</use_hydrstress>
<use_hydrstress phys="clm5_0" use_fates=".false." configuration="clm">.true.</use_hydrstress>
Expand Down
41 changes: 35 additions & 6 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,41 @@ LUNA operates on C3 and non-crop vegetation (see vcmax_opt for how other veg is
LUNA: Leaf Utilization of Nitrogen for Assimilation
</entry>

<entry id="use_hillslope" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Toggle to turn on the hillslope model
</entry>

<entry id="downscale_hillslope_meteorology" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Toggle to turn on meteorological downscaling in hillslope model
</entry>

<entry id="use_hillslope_routing" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Toggle to turn on surface water routing in the hillslope hydrology model
</entry>

<entry id="hillslope_head_gradient_method" type="char*256" category="physics"
group="hillslope_hydrology_inparm" valid_values="Kinematic,Darcy">
Method for calculating hillslope saturated head gradient
</entry>

<entry id="hillslope_transmissivity_method" type="char*256" category="physics"
group="hillslope_hydrology_inparm" valid_values="LayerSum,Uniform">
Method for calculating transmissivity of hillslope columns
</entry>

<entry id="hillslope_pft_distribution_method" type="char*256" category="physics"
group="hillslope_properties_inparm" valid_values="Standard,FromFile,DominantPftUniform,DominantPftLowland,PftLowlandUpland">
Method for distributing pfts across hillslope columns
</entry>

<entry id="hillslope_soil_profile_method" type="char*256" category="physics"
group="hillslope_properties_inparm" valid_values="Uniform,FromFile,SetLowlandUpland,Linear">
Method for distributing soil thickness across hillslope columns
</entry>

<entry id="use_hydrstress" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Toggle to turn on the plant hydraulic stress model
Expand Down Expand Up @@ -2499,12 +2534,6 @@ If surface water is active or not
(deprecated -- will be removed)
</entry>

<entry id="origflag" type="integer" category="clm_physics"
group="clm_soilhydrology_inparm" valid_values="0,1" >
Use original CLM4 soil hydraulic properties
(deprecated -- will be removed)
</entry>

<!-- ======================================================================================== -->
<!-- namelist elements associated with the CH4 Model -->
<!-- ======================================================================================== -->
Expand Down
15 changes: 0 additions & 15 deletions bld/unit_testers/build-namelist_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -811,21 +811,6 @@ sub cat_and_create_namelistinfile {
GLC_TWO_WAY_COUPLING=>"FALSE",
phys=>"clm4_5",
},
"-vic with origflag=1" =>{ options=>"-vichydro -envxml_dir .",
namelst=>"origflag=1",
GLC_TWO_WAY_COUPLING=>"FALSE",
phys=>"clm4_5",
},
"l_bnd=flux with origflag=0"=>{ options=>"-envxml_dir .",
namelst=>"origflag=0, lower_boundary_condition=1",
GLC_TWO_WAY_COUPLING=>"FALSE",
phys=>"clm4_5",
},
"l_bnd=zflux with origflag=0"=>{ options=>"-envxml_dir .",
namelst=>"origflag=0, lower_boundary_condition=2",
GLC_TWO_WAY_COUPLING=>"FALSE",
phys=>"clm4_5",
},
"bedrock with l_bnc=flux" =>{ options=>"-envxml_dir .",
namelst=>"use_bedrock=.true., lower_boundary_condition=1",
GLC_TWO_WAY_COUPLING=>"FALSE",
Expand Down
41 changes: 41 additions & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3451,4 +3451,45 @@
<option name="comment">This test is designed to test the ability to prescribe crop sowing dates and maturity requirements. It first performs a GDD-generating run, then calls Python code to generate the maturity requirement file. This is then used in a sowing+maturity forced run, which finally is tested to ensure correct behavior.</option>
</options>
</test>

<test name="ERP_D_P64x2_Ld10" grid="f10_f10_mg37" compset="I2000Clm51Bgc" testmods="clm/Hillslope">
<machines>
<machine name="derecho" compiler="intel" category="aux_clm"/>
<machine name="derecho" compiler="intel" category="hillslope"/>
</machines>
<options>
<option name="wallclock">00:30:00</option>
</options>
</test>

<test name="SMS_D_Ld3" grid="f10_f10_mg37" compset="I1850Clm51Bgc" testmods="clm/HillslopeFromFile">
<machines>
<machine name="derecho" compiler="intel" category="hillslope"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
</options>
</test>

<test name="SMS_D_Mmpi-serial_Ld5" grid="5x5_amazon" compset="I1850Clm51Bgc" testmods="clm/HillslopeC">
<machines>
<machine name="derecho" compiler="gnu" category="aux_clm"/>
<machine name="derecho" compiler="gnu" category="hillslope"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
</options>
</test>

<test name="SMS_D_Ld3" grid="f10_f10_mg37" compset="I2000Clm51Bgc" testmods="clm/HillslopeD">
<machines>
<machine name="izumi" compiler="nag" category="aux_clm"/>
<machine name="izumi" compiler="nag" category="hillslope"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
</options>
</test>


</testlist>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../default
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
./xmlchange CLM_BLDNML_OPTS="-bgc sp"
DIN_LOC_ROOT=$(./xmlquery --value DIN_LOC_ROOT)
meshfile=$DIN_LOC_ROOT/lnd/clm2/testdata/ESMFmesh_10x15_synthetic_cosphill_1.0.nc
./xmlchange ATM_DOMAIN_MESH=${meshfile},LND_DOMAIN_MESH=${meshfile}
11 changes: 11 additions & 0 deletions cime_config/testdefs/testmods_dirs/clm/Hillslope/user_nl_clm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use_hillslope = .true.
use_hillslope_routing = .true.
downscale_hillslope_meteorology = .false.
hillslope_head_gradient_method = 'Darcy'
hillslope_transmissivity_method = 'LayerSum'
hillslope_pft_distribution_method = 'PftLowlandUpland'
hillslope_soil_profile_method = 'Uniform'

fsurdat = '$DIN_LOC_ROOT/lnd/clm2/testdata/surfdata_10x15_78pfts_simyr2000_synthetic_cosphill_1.3.nc'

use_ssre = .false.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../Hillslope
7 changes: 7 additions & 0 deletions cime_config/testdefs/testmods_dirs/clm/HillslopeC/user_nl_clm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
! Various hillslope options not exercised by other testmods
use_hillslope_routing = .false.
downscale_hillslope_meteorology = .true.
hillslope_head_gradient_method = 'Kinematic'
hillslope_transmissivity_method = 'Uniform'
hillslope_pft_distribution_method = 'DominantPftUniform'
hillslope_soil_profile_method = 'SetLowlandUpland'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../Hillslope
3 changes: 3 additions & 0 deletions cime_config/testdefs/testmods_dirs/clm/HillslopeD/user_nl_clm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
! Various hillslope options not exercised by other testmods
hillslope_pft_distribution_method = 'DominantPftLowland'
hillslope_soil_profile_method = 'Linear'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../Hillslope
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hillslope_pft_distribution_method = 'FromFile'
hillslope_soil_profile_method = 'FromFile'
1 change: 0 additions & 1 deletion cime_config/testdefs/testmods_dirs/clm/oldhyd/user_nl_clm
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
snow_cover_fraction_method = 'NiuYang2007'
h2osfcflag = 0
origflag = 1
use_subgrid_fluxes = .false.
8 changes: 4 additions & 4 deletions src/biogeochem/DryDepVelocity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@ subroutine depvel_compute( bounds, &

if ( n_drydep == 0 ) return

associate( &
forc_solad => atm2lnd_inst%forc_solad_grc , & ! Input: [real(r8) (:,:) ] direct beam radiation (visible only)
associate( &
forc_solai => atm2lnd_inst%forc_solai_grc , & ! Input: [real(r8) (:,:) ] direct beam radiation (visible only)
forc_solad => atm2lnd_inst%forc_solad_downscaled_col, & ! Input: [real(r8) (:,:) ] direct beam radiation (visible only)
forc_t => atm2lnd_inst%forc_t_downscaled_col , & ! Input: [real(r8) (:) ] downscaled atmospheric temperature (Kelvin)
forc_q => wateratm2lndbulk_inst%forc_q_downscaled_col , & ! Input: [real(r8) (:) ] downscaled atmospheric specific humidity (kg/kg)
forc_pbot => atm2lnd_inst%forc_pbot_downscaled_col , & ! Input: [real(r8) (:) ] downscaled surface pressure (Pa)
forc_rain => wateratm2lndbulk_inst%forc_rain_downscaled_col , & ! Input: [real(r8) (:) ] downscaled rain rate [mm/s]

h2osoi_vol => waterstatebulk_inst%h2osoi_vol_col , & ! Input: [real(r8) (:,:) ] volumetric soil water (0<=h2osoi_vol<=watsat)
snow_depth => waterdiagnosticbulk_inst%snow_depth_col , & ! Input: [real(r8) (:) ] snow height (m)

Expand Down Expand Up @@ -324,7 +324,7 @@ subroutine depvel_compute( bounds, &
spec_hum = forc_q(c)
rain = forc_rain(c)
sfc_temp = forc_t(c)
solar_flux = forc_solad(g,1)
solar_flux = forc_solad(c,1)
lat = grc%latdeg(g)
lon = grc%londeg(g)
clmveg = patch%itype(pi)
Expand Down
4 changes: 2 additions & 2 deletions src/biogeochem/VOCEmissionMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ subroutine VOCEmission (bounds, num_soilp, filter_soilp, &
!h2osoi_vol => waterstate_inst%h2osoi_vol_col , & ! Input: [real(r8) (:,:) ] volumetric soil water (m3/m3)
!h2osoi_ice => waterstate_inst%h2osoi_ice_col , & ! Input: [real(r8) (:,:) ] ice soil content (kg/m3)

forc_solad => atm2lnd_inst%forc_solad_grc , & ! Input: [real(r8) (:,:) ] direct beam radiation (visible only)
forc_solad => atm2lnd_inst%forc_solad_downscaled_col, & ! Input: [real(r8) (:,:) ] direct beam radiation (visible only)
forc_solai => atm2lnd_inst%forc_solai_grc , & ! Input: [real(r8) (:,:) ] diffuse radiation (visible only)
forc_pbot => atm2lnd_inst%forc_pbot_downscaled_col , & ! Input: [real(r8) (:) ] downscaled atmospheric pressure (Pa)
forc_pco2 => atm2lnd_inst%forc_pco2_grc , & ! Input: [real(r8) (:) ] partial pressure co2 (Pa)
Expand Down Expand Up @@ -557,7 +557,7 @@ subroutine VOCEmission (bounds, num_soilp, filter_soilp, &
! Calculate PAR: multiply w/m2 by 4.6 to get umol/m2/s for par (added 8/14/02)
!------------------------
! SUN:
par_sun = (forc_solad(g,1) + fsun(p) * forc_solai(g,1)) * 4.6_r8
par_sun = (forc_solad(c,1) + fsun(p) * forc_solai(g,1)) * 4.6_r8
par24_sun = (forc_solad24(p) + fsun24(p) * forc_solai24(p)) * 4.6_r8
par240_sun = (forc_solad240(p) + fsun240(p) * forc_solai240(p)) * 4.6_r8

Expand Down
Loading
Loading