diff --git a/.gitmodules b/.gitmodules
index 7274b9acd2..1f6da08484 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -28,7 +28,7 @@
[submodule "fates"]
path = src/fates
url = https://github.com/NGEET/fates
-fxtag = sci.1.78.2_api.36.0.0
+fxtag = sci.1.78.3_api.36.1.0
fxrequired = AlwaysRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/NCAR/fates-release
diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm
index 4d8ad454ba..dd5d8be545 100755
--- a/bld/CLMBuildNamelist.pm
+++ b/bld/CLMBuildNamelist.pm
@@ -2759,8 +2759,7 @@ SIMYR: foreach my $sim_yr ( @sim_years ) {
# this check has to be here and not earlier since use_init_interp is set here and hillslope is already set above in setup_logic_hillslope
if ( &value_is_true($nl->get_value($useinitvar)) && value_is_true($nl->get_value("use_hillslope")) ) {
- $log->warning("WARNING: You have set use_hillslope while $useinitvar is TRUE.\n This means all hillslope columns in a gridcell will read identical values" .
- " from initial conditions. If you are sure you want this behaviour:")
+ $log->warning("WARNING: You have set use_hillslope while $useinitvar is TRUE.\n This means all hillslope columns in a gridcell will read identical values from initial conditions, even if the initial conditions (finidat) file has hillslope information. If you are sure you want this behaviour, add -ignore_warnings to CLM_BLDNML_OPTS.")
}
} # end initial conditions
@@ -3626,6 +3625,10 @@ sub setup_logic_hillslope {
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" );
}
+ my $hillslope_file = $nl->get_value('hillslope_file');
+ if ( &value_is_true($use_hillslope) && ( ! defined($hillslope_file) ) ) {
+ $log->fatal_error("You must provide hillslope_file if use_hillslope is .true.\n" );
+ }
}
#-------------------------------------------------------------------------------
diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml
index 8eb8e2cccb..c93c4f5696 100644
--- a/bld/namelist_files/namelist_defaults_ctsm.xml
+++ b/bld/namelist_files/namelist_defaults_ctsm.xml
@@ -553,7 +553,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
-lnd/clm2/paramdata/fates_params_api.36.0.0_12pft_c240517.nc
+lnd/clm2/paramdata/fates_params_api.36.1.0_14pft_c241003.nc
+
@@ -745,18 +746,11 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
-
-.true.
-.true.
+
.true..true.
-
-.true.
-
-.true.
-.true.
+
+.true.
+.true.
+
.true..true.
-
-.true.
-
-.true.
-.true.
+
.true..true.
-
-.true.
-
-.true.
-.true.
+
.true..true.
-
-.true.hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm6_0_GSWP3v1 use_excess_ice=.true.
+mask=gx1v7 use_cn=.true. do_transient_pfts=.false. use_excess_ice=.true. use_crop=.false. irrigate=.false.
+
+mask=tx2_3v2 use_cn=.true. do_transient_pfts=.false. use_excess_ice=.true. use_crop=.true. irrigate=.false.
+hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false.
+
hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm5_1_GSWP3v1 use_excess_ice=.true.
+>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nex=10 do_transient_pfts=.false. use_excess_ice=.true.
+
+hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nex=10 do_transient_pfts=.false. use_excess_ice=.true.
hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm6_0_GSWP3v1 use_excess_ice=.true.
+ hgrid="ne30np4.pg3"
+>hgrid=ne30np4.pg3 maxpft=79 mask=tx2_3v2 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.true.
-hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false.
+maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 use_excess_ice=.true.
-hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false.
+hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 use_excess_ice=.true.
hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false.
-hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false.
-
-
-hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false.
+maxpft=79 mask=tx2_3v2 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 use_excess_ice=.true.
hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false.
-
-hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false.
-
-
-
lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc
+ phys="clm5_1"
+>lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_f09_g17_BgcCrop_exice_pSASU.clm60.r.0161-01-01.nc
lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc
+ phys="clm6_0"
+>lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_f09_g17_BgcCrop_exice_pSASU.clm60.r.0161-01-01.nc
+
+
+lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_ne30pg3t232_BgcCrop_exice_pSASU.clm60.r.0121-01-01.nc
+
+
+lnd/clm2/initdata_esmf/ctsm5.3/ctsm530_f19_g17_Bgc_exice_pSASU.clm60.r.0161-01-01.nc
-lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc
-
@@ -1482,21 +1468,27 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
-
lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc
+>lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_f09_g17_BgcCrop_exice_hist.clm60.r.2000-01-01.nc
-
+
lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_f09_g17_BgcCrop_exice_hist.clm60.r.2000-01-01.nc
+
+lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc
+>lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_ne30pg3t232_BgcCrop_exice_hist.clm60.r.2000-01-01.nc
@@ -1516,19 +1508,12 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
lnd_tuning_mode="clm5_0_cam7.0" use_init_interp=".true."
>lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc
-
-lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc
-
-
-lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc
+
+lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_f09_g17_BgcCrop_exice_hist.clm60.r.1979-01-01.nc
@@ -1556,22 +1541,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
-
-lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc
-
-
-
-lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc
-
-
lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc
-lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc
+
+lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_f09_g17_BgcCrop_exice_hist.clm60.r.1979-01-01.nc
-
-lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc
+lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_ne30pg3t232_BgcCrop_exice_hist.clm60.r.1979-01-01.nc
@@ -1620,22 +1590,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
-
-lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc
-
-
-
-lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc
-
-
lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc
-
-lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc
-
-
-
-lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc
-
-
lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc
-
-lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc
-
-
-lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc
-
-
-
-lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc
-
-
-
-lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc
-
-
-lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc
-
-
-lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc
-
-
-lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc
-
-
-
-lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc
-
-
+
+Full pathname of hillslope data file.
+
+
SNICAR (SNow, ICe, and Aerosol Radiative model) optical data file name
diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl
index 64126ab347..4120ed869d 100755
--- a/bld/unit_testers/build-namelist_test.pl
+++ b/bld/unit_testers/build-namelist_test.pl
@@ -1362,8 +1362,8 @@ sub cat_and_create_namelistinfile {
namelst=>"fsurdat='build-namelist_test.pl'",
phys=>"clm6_0",
},
- "hillslope with init_interp"=>{ options=>"-bgc bgc -envxml_dir .",
- namelst=>"use_init_interp=.true.,use_hillslope=.true.",
+ "hillslope with init_interp"=>{ options=>"--res 10x15 --bgc bgc --envxml_dir .",
+ namelst=>"use_init_interp=.true.,use_hillslope=.true.,hillslope_file='/dev/null'",
phys=>"clm6_0",
},
);
diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml
index 30b19ce862..7049e9672b 100644
--- a/cime_config/testdefs/ExpectedTestFails.xml
+++ b/cime_config/testdefs/ExpectedTestFails.xml
@@ -135,6 +135,17 @@
+
+
+ FAIL
+ #2310
+
+
+ FAIL
+ #2310
+
+
+
FAIL
@@ -171,6 +182,13 @@
+
+
+ FAIL
+ #2454
+
+
+
FAIL
@@ -245,13 +263,6 @@
-
-
- FAIL
- #2423
-
-
-
FAIL
@@ -280,6 +291,13 @@
+
+
+ FAIL
+ #2810
+
+
+
diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml
index b178570add..d5a8f3077b 100644
--- a/cime_config/testdefs/testlist_clm.xml
+++ b/cime_config/testdefs/testlist_clm.xml
@@ -11,6 +11,7 @@
aux_cime_baselines: CESM cime baselines (subset of aux_clm tests)
hillslope: Experimental test list used for the hillslope option of the model
rxcropmaturity: Short tests to be run during development related to prescribed crop calendars
+ matrixcn: Tests exercising the matrix-CN capability
-->
@@ -25,6 +26,7 @@
+
@@ -47,6 +49,7 @@
+
@@ -276,6 +279,7 @@
+
@@ -482,6 +486,7 @@
+
@@ -517,6 +522,7 @@
+
@@ -544,6 +550,7 @@
+
@@ -802,6 +809,7 @@
+
@@ -820,6 +828,7 @@
+
@@ -837,6 +846,7 @@
+
@@ -846,7 +856,9 @@
+
+
@@ -875,6 +887,7 @@
+
@@ -884,6 +897,7 @@
+
@@ -893,6 +907,7 @@
+
@@ -902,6 +917,7 @@
+
@@ -994,6 +1010,7 @@
+
@@ -1012,6 +1029,7 @@
+
@@ -1031,6 +1049,7 @@
+
@@ -1049,6 +1068,7 @@
+
@@ -1086,6 +1106,7 @@
+
@@ -1103,6 +1124,7 @@
+
@@ -1112,6 +1134,7 @@
+
@@ -1156,6 +1179,7 @@
+
@@ -1173,6 +1197,7 @@
+
@@ -1246,6 +1271,7 @@
+
@@ -1306,6 +1332,7 @@
+
@@ -1323,6 +1350,7 @@
+
@@ -1349,6 +1377,7 @@
+
@@ -1385,6 +1414,7 @@
+
@@ -1430,6 +1460,7 @@
+
@@ -1440,6 +1471,7 @@
+
@@ -1450,6 +1482,7 @@
+
@@ -1562,6 +1595,7 @@
+
@@ -1697,6 +1731,7 @@
+
@@ -1734,6 +1769,7 @@
+
@@ -1780,6 +1816,7 @@
+
@@ -1836,6 +1873,7 @@
+
@@ -1866,6 +1904,7 @@
+
@@ -1884,6 +1923,7 @@
+
@@ -1913,6 +1953,7 @@
+
@@ -1950,6 +1991,7 @@
+
@@ -1969,6 +2011,7 @@
+
@@ -2009,6 +2052,7 @@
+
@@ -2214,6 +2258,7 @@
+
@@ -2282,7 +2327,9 @@
+
+
@@ -2363,6 +2410,7 @@
+
@@ -2524,6 +2572,7 @@
+
@@ -2571,6 +2620,7 @@
+
@@ -3341,9 +3391,10 @@
-
+
+
@@ -3520,23 +3571,24 @@
-
+
+
-
+
-
+
-
+
diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/shell_commands
new file mode 100644
index 0000000000..e629e7ca34
--- /dev/null
+++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/shell_commands
@@ -0,0 +1,8 @@
+SRCDIR=`./xmlquery SRCROOT --value`
+CASEDIR=`./xmlquery CASEROOT --value`
+FATESDIR=$SRCDIR/src/fates
+FATESPARAMFILE=$CASEDIR/fates_params_hydrograsstempfix.nc
+
+ncgen -o $FATESPARAMFILE $FATESDIR/parameter_files/fates_params_default.cdl
+
+$FATESDIR/tools/modify_fates_paramfile.py --O --fin $FATESPARAMFILE --fout $FATESPARAMFILE --var fates_allom_smode --val 1 --allpfts
diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/user_nl_clm
index f0bdb388eb..318a34dfec 100644
--- a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/user_nl_clm
+++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/user_nl_clm
@@ -2,6 +2,7 @@ hist_mfilt = 365
hist_nhtfrq = -24
hist_empty_htapes = .true.
use_fates_planthydro= .true.
+fates_paramfile = '$CASEROOT/fates_params_hydrograsstempfix.nc'
hist_fincl1 = 'FATES_ERRH2O_SZPF', 'FATES_TRAN_SZPF',
'FATES_SAPFLOW_SZPF', 'FATES_ITERH1_SZPF','FATES_ABSROOT_H2O_SZPF',
'FATES_TRANSROOT_H2O_SZPF','FATES_STEM_H2O_SZPF','FATES_LEAF_H2O_SZPF',
diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands
index c97c0dfea7..6152f0bd0c 100644
--- a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands
+++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands
@@ -1,3 +1,3 @@
#!/bin/bash
-./xmlchange CLM_BLDNML_OPTS="-i-clm_demand -flanduse_timeseries" --append
+./xmlchange CLM_BLDNML_OPTS="-clm_demand flanduse_timeseries" --append
diff --git a/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands b/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands
index a2759b51b4..9cef7eb66f 100644
--- a/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands
+++ b/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands
@@ -1,7 +1,19 @@
./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}
+
+# Set hillslope_file. Needed for any grids without default hillslope_file already set by CTSM.
+lnd_grid=$(./xmlquery --value LND_GRID)
+if [[ ${lnd_grid} == "10x15" ]]; then
+ # Synthetic data
+ hillslope_file='$DIN_LOC_ROOT/lnd/clm2/testdata/surfdata_10x15_hist_1850_78pfts_c240216.synth_hillslopes_241001.nc'
+elif [[ ${lnd_grid} == "5x5_amazon" ]]; then
+ # Real data
+ hillslope_file='/glade/derecho/scratch/samrabin/hillslopes_5x5_amazon/hand_analysis_global/combined/hilldata_5x5_amazon_hist_2000_78pfts_c240216.nc'
+else
+ echo "ERROR: Hillslope file not found for LND_GRID=${lnd_grid}" >&2
+ exit 1
+fi
+echo -e "hillslope_file = '${hillslope_file}'\n" >> user_nl_clm
# -ignore_warnings is needed as long as we don't allow use_hillslope and use_init_interp together
./xmlchange --append CLM_BLDNML_OPTS=-ignore_warnings
diff --git a/cime_config/testdefs/testmods_dirs/clm/Hillslope/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/Hillslope/user_nl_clm
index d27565d98f..e108e93d91 100644
--- a/cime_config/testdefs/testmods_dirs/clm/Hillslope/user_nl_clm
+++ b/cime_config/testdefs/testmods_dirs/clm/Hillslope/user_nl_clm
@@ -6,6 +6,4 @@ hillslope_transmissivity_method = 'LayerSum'
hillslope_pft_distribution_method = 'PftLowlandUpland'
hillslope_soil_profile_method = 'Uniform'
-fsurdat = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/surfdata_10x15_hist_2000_78pfts_c240905.synthetic_hillslopes3.nc'
-
use_ssre = .false.
diff --git a/cime_config/testdefs/testmods_dirs/clm/matrixcnOn/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/matrixcnOn/include_user_mods
deleted file mode 100644
index fe0e18cf88..0000000000
--- a/cime_config/testdefs/testmods_dirs/clm/matrixcnOn/include_user_mods
+++ /dev/null
@@ -1 +0,0 @@
-../default
diff --git a/doc/ChangeLog b/doc/ChangeLog
index ded12c54f8..3620cd8c15 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,4 +1,532 @@
===============================================================
+Tag name: ctsm5.3.009
+Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu)
+Date: Tue Oct 15 17:35:40 MDT 2024
+One-line Summary: Reduce outputs from matrixcnOn tests
+
+Purpose and description of changes
+----------------------------------
+
+Reduces size and runtime of our tests of the CN Matrix capability. See "Notes of particular relevance for developers" for more details.
+
+
+Significant changes to scientifically-supported configurations
+--------------------------------------------------------------
+
+Does this tag change answers significantly for any of the following physics configurations?
+(Details of any changes will be given in the "Answer changes" section below.)
+
+[ ] clm6_0
+
+[ ] clm5_1
+
+[ ] clm5_0
+
+[ ] ctsm5_0-nwp
+
+[ ] clm4_5
+
+
+Bugs fixed
+----------
+
+List of CTSM issues fixed (include CTSM Issue # and description):
+- Resolves ESCOMP/CTSM#2814: Remove include_user_mods from matrixcnOn testmod (https://github.com/ESCOMP/CTSM/pull/2815)
+
+
+Notes of particular relevance for developers:
+---------------------------------------------
+
+Changes to tests or testing:
+- Removing the include_user_mods file from the matrixcnOn test (and thus also matrixcnOn_ignore_warnings) means that the default outputs no longer overwrite outputs specified by earlier test mods. For example, in LCISO_Lm13.f10_f10_mg37.IHistClm60BgcCrop.derecho_intel.clm-ciso_monthly--clm-matrixcnOn_ignore_warnings, it should have been saving monthly (the ciso_monthly test mod) but was actually being saved at much higher frequency (because matrixcnOn_ignore_warnings was after ciso_monthly in the test name). That test goes from 30 to 3 GB after this change.
+- Adds matrixcn test suite, which can be used during Matrix CN development. All tests in this suite are also still run in aux_clm.
+
+
+Testing summary:
+----------------
+
+ regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):
+
+ derecho ----- DIFF
+ izumi ------- DIFF
+
+
+Answer changes
+--------------
+
+Changes answers relative to baseline:
+
+ Summarize any changes to answers, i.e.,
+ - what code configurations: aux_clm tests only
+ - what platforms/compilers: all
+ - nature of change: larger than roundoff
+
+ Changes are due to changed history field lists (and some other settings) due to the removal of include_user_mods from the matrixcnOn test mod. No answer changes occurred in any test other than those using matrixcnOn(_ignore_warnings); no answer changes will occur for any non-test run.
+
+Other details
+-------------
+
+Pull Requests that document the changes (include PR ids):
+- PR ESCOMP/CTSM#2815: Remove include_user_mods from matrixcnOn testmod (https://github.com/ESCOMP/CTSM/pull/2815)
+
+===============================================================
+===============================================================
+Tag name: ctsm5.3.008
+Originator(s): olyson (Keith Oleson,UCAR/TSS)
+Date: Mon 14 Oct 2024 04:03:26 PM MDT
+One-line Summary: PPE change to sa_leaf in CanopyFluxesMod.F90
+
+Purpose and description of changes
+----------------------------------
+
+ Add change to sa_leaf that was in PPE branch but did not get on master.
+
+
+Significant changes to scientifically-supported configurations
+--------------------------------------------------------------
+
+Does this tag change answers significantly for any of the following physics configurations?
+(Details of any changes will be given in the "Answer changes" section below.)
+
+ [Put an [X] in the box for any configuration with significant answer changes.]
+
+[ ] clm6_0
+
+[ ] clm5_1
+
+[ ] clm5_0
+
+[ ] ctsm5_0-nwp
+
+[ ] clm4_5
+
+
+Bugs fixed
+----------
+List of CTSM issues fixed (include CTSM Issue # and description) [one per line]:
+ Fixes #2777
+
+
+Testing summary:
+----------------
+
+ [PASS means all tests PASS; OK means tests PASS other than expected fails.]
+
+ regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):
+
+ derecho ----- OK
+ izumi ------- OK
+
+
+Answer changes
+--------------
+
+Changes answers relative to baseline: Yes
+
+ Summarize any changes to answers, i.e.,
+ - what code configurations: All
+ - what platforms/compilers: All
+ - nature of change: larger than roundoff/same climate)
+
+ The changes in answers are explained in this post
+ https://github.com/ESCOMP/CTSM/issues/2777#issuecomment-2371697380
+ and the diagnostics are here
+ https://webext.cgd.ucar.edu/I2000/ctsm53n04ctsm52028_f09_saleaf/lnd/ctsm53n04ctsm52028_f09_saleaf_2000_2001_2004-ctsm53n04ctsm52028_f09_2000_2001_2004/setsIndex.html
+
+
+Other details
+-------------
+Pull Requests that document the changes (include PR ids):
+ https://github.com/ESCOMP/ctsm/pull/2788
+
+===============================================================
+===============================================================
+Tag name: ctsm5.3.007
+Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310)
+Date: Mon 13 Oct 2024 11:04:18 AM MDT
+One-line Summary: Clm60 finidat updates for ne30, f09, f19 grids
+
+Purpose and description of changes
+----------------------------------
+ Updates appear in namelist_defaults_ctsm.xml.
+ For the most part I updated clm51 to match clm60, though clm51 will go away soon.
+ I had significant help from Erik Kluzek in disentangling the .xml settings
+ so that cases would pick up the correct finidat and other namelist settings.
+
+Significant changes to scientifically-supported configurations
+--------------------------------------------------------------
+
+Does this tag change answers significantly for any of the following physics configurations?
+(Details of any changes will be given in the "Answer changes" section below.)
+
+ [Put an [X] in the box for any configuration with significant answer changes.]
+
+[X] clm6_0
+
+[ ] clm5_1
+
+[ ] clm5_0
+
+[ ] ctsm5_0-nwp
+
+[ ] clm4_5
+
+
+Bugs fixed
+----------
+List of CTSM issues fixed (include CTSM Issue # and description) [one per line]:
+ Relates to #2403 but may need more work to close the issue
+
+Notes of particular relevance for users
+---------------------------------------
+Changes made to namelist defaults (e.g., changed parameter values):
+ Clm60 and clm51 finidat updates for ne30, f09, f19 grids.
+
+Changes to the datasets (e.g., parameter, surface or initial files):
+ Clm60 and clm51 finidat updates for ne30, f09, f19 grids.
+
+Testing summary:
+----------------
+
+ [PASS means all tests PASS; OK means tests PASS other than expected fails.]
+
+ build-namelist tests (if CLMBuildNamelist.pm has changed):
+
+ derecho - PASS
+
+ python testing (if python code has changed; see instructions in python/README.md; document testing done):
+
+ derecho - PASS
+
+ regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):
+
+ derecho ----- OK
+ izumi ------- OK
+
+
+Answer changes
+--------------
+
+Changes answers relative to baseline: Yes.
+
+ Summarize any changes to answers, i.e.,
+ - what code configurations: clm60 and clm51; the latter goes away soon
+ - what platforms/compilers: all
+ - nature of change: larger than roundoff/same climate
+
+Other details
+-------------
+Pull Requests that document the changes (include PR ids):
+ https://github.com/ESCOMP/ctsm/pull/2821
+
+===============================================================
+===============================================================
+Tag name: ctsm5.3.006
+Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu)
+Date: Fri Oct 11 07:01:09 MDT 2024
+One-line Summary: Merge b4b-dev
+
+Purpose and description of changes
+----------------------------------
+
+- Fix clm-basic tests (resolves ESCOMP/CTSM#2787)
+- Change testlist_clm ne30pg3_t061 tests to ne30pg3_t232 (resolves ESCOMP/CTSM#2702)
+- Remove unused variable elevclass_o in mkglcmecMod.F90 (resolves ESCOMP/CTSM#2802)
+- Add a check in failtest, warntest, finidat_files, so when a new test or finidat file are added and one of the subkeys is misspelled you will get an error and tester will die (resolves ESCOMP/CTSM#2673)
+- Move from deprecated shr_file to shr_log
+- Set eflx_building_lun to spval properly (resolves ESCOMP/CTSM#2793)
+
+
+Significant changes to scientifically-supported configurations
+--------------------------------------------------------------
+
+Does this tag change answers significantly for any of the following physics configurations?
+(Details of any changes will be given in the "Answer changes" section below.)
+
+ [Put an [X] in the box for any configuration with significant answer changes.]
+
+[ ] clm6_0
+
+[ ] clm5_1
+
+[ ] clm5_0
+
+[ ] ctsm5_0-nwp
+
+[ ] clm4_5
+
+
+Bugs fixed
+----------
+
+List of CTSM issues fixed:
+- ESCOMP/CTSM#2787 (aux_clm "clm-basic" tests fail as of ctsm5.3.0 because they need c13 in finidat; https://github.com/ESCOMP/CTSM/issues/2787)
+- ESCOMP/CTSM#2702 (Tests failing in ctsm5.2.019 for CESM alpha testing; https://github.com/ESCOMP/CTSM/issues/2702)
+- ESCOMP/CTSM#2802 (Array elevclass_o in mksurfdata_esmf/src/mkglcmecMod.F90 is not allocated before use; https://github.com/ESCOMP/CTSM/issues/2802)
+- ESCOMP/CTSM#2673 (Catch use of namelist attribute in failure testing in perl build-namelist tester; https://github.com/ESCOMP/CTSM/issues/2673)
+- ESCOMP/CTSM#2793 (Potential typo/bug in EnergyFluxType.F90; https://github.com/ESCOMP/CTSM/issues/2793)
+
+
+Testing summary:
+----------------
+
+ regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):
+
+ derecho ----- OK
+ izumi ------- OK
+
+
+Other details
+-------------
+
+Pull Requests that document the changes:
+- ESCOMP/CTSM#2798: Fix clm-basic tests (https://github.com/ESCOMP/CTSM/pull/2798)
+- ESCOMP/CTSM#2799: Change testlist_clm ne30pg3_t061 tests to ne30pg3_t232 (https://github.com/ESCOMP/CTSM/pull/2799)
+- ESCOMP/CTSM#2804: Remove unused variable elevclass_o in mkglcmecMod.F90 (https://github.com/ESCOMP/CTSM/pull/2804)
+- ESCOMP/CTSM#2678: Add check in build-namelist_test.pl (https://github.com/ESCOMP/CTSM/pull/2678)
+- ESCOMP/CTSM#2627: move from depricated shr_file to shr_log (https://github.com/ESCOMP/CTSM/pull/2627)
+- ESCOMP/CTSM#2806: Set eflx_building_lun to spval properly (https://github.com/ESCOMP/CTSM/pull/2806)
+
+===============================================================
+===============================================================
+Tag name: ctsm5.3.005
+Originator(s): dmleung (Danny Leung)
+Date: Thu 10 Oct 2024 03:15:52 AM MDT
+One-line Summary: Hardcoded tuning adjustments for Leung_2024 dust emissions
+
+Purpose and description of changes
+----------------------------------
+
+Changes to dust emissions when Leung_2024 method is being used.
+
+Tuning was needed since we saw some high biases in dust over semiarid regions given all the updates in CTSM and CAM. The biggest
+changes in CTSM that affects dust is an increase in friction velocity (ustar; fv in CTSM) over vegetated, semiarid regions, mainly
+due to a switch in the roughness scheme from 'ZengWang2007' to 'Meier2022'. Since dust emission is very sensitive to ustar, the dust
+emission scheme magnifies this increase and caused strong high biases over semiarid regions, including Australia and Patagonia (see
+plots in issue #2732). To enhance the robustness of Leung_2023 and reduce the likelihood to see huge changes in answers in the
+future, we tried to limit the sensitivity of dust emissions to ustar. We also tried different methods (see specific notes below) to
+reduce dust emissions from semiarid regions given the high biases over there.
+
+
+Significant changes to scientifically-supported configurations
+--------------------------------------------------------------
+
+Does this tag change answers significantly for any of the following physics configurations?
+(Details of any changes will be given in the "Answer changes" section below.)
+
+ [Put an [X] in the box for any configuration with significant answer changes.]
+
+[x] clm6_0
+
+[ ] clm5_1
+
+[ ] clm5_0
+
+[ ] ctsm5_0-nwp
+
+[ ] clm4_5
+
+
+Bugs fixed
+----------
+List of CTSM issues fixed (include CTSM Issue # and description) [one per line]:
+
+ Start of work on tuning for #2732
+ Fixes #2826 -- Fix failing warning test
+
+Notes of particular relevance for developers:
+---------------------------------------------
+
+Caveats for developers (e.g., code that is duplicated that requires double maintenance):
+ Dust tuning parameters are hardcoded in FORTRAN and need to be moved to namelists
+
+Testing summary: Regular
+----------------
+ [PASS means all tests PASS; OK means tests PASS other than expected fails.]
+
+ build-namelist tests (if CLMBuildNamelist.pm has changed):
+
+ derecho - PASS
+
+ python testing (if python code has changed; see instructions in python/README.md; document testing done):
+
+ derecho - PASS
+
+ regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):
+
+ derecho ----- OK
+ izumi ------- OK
+
+Answer changes
+--------------
+
+Changes answers relative to baseline: Yes for clm6_0
+
+ Summarize any changes to answers, i.e.,
+ - what code configurations: clm6_0
+ - what platforms/compilers: all
+ - nature of change (roundoff; larger than roundoff/same climate; new climate):
+ Just updates dust emissions when Leung_2024 method is used
+
+ Only the dust emission fields are changed all other fields are untouched
+
+Other details
+-------------
+
+Pull Requests that document the changes (include PR ids):
+(https://github.com/ESCOMP/ctsm/pull)
+
+ https://github.com/ESCOMP/CTSM/pull/2803 -- Tuning Leung_2023 dust emissions for clm6_0_cam7.0
+
+===============================================================
+===============================================================
+Tag name: ctsm5.3.004
+Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu)
+Date: Mon Oct 7 21:25:20 MDT 2024
+One-line Summary: Move hillslope data off surface datasets
+
+Purpose and description of changes
+----------------------------------
+
+Moves hillslope data off surface datasets onto its own separate hillslope_file. This makes it so we don't need to generate new surface datasets specifically for hillslope testing whenever the surface datasets are updated.
+
+
+Significant changes to scientifically-supported configurations
+--------------------------------------------------------------
+
+Does this tag change answers significantly for any of the following physics configurations?
+(Details of any changes will be given in the "Answer changes" section below.)
+
+ [Put an [X] in the box for any configuration with significant answer changes.]
+
+[ ] clm6_0
+
+[ ] clm5_1
+
+[ ] clm5_0
+
+[ ] ctsm5_0-nwp
+
+[ ] clm4_5
+
+
+Testing summary:
+----------------
+
+ regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):
+
+ derecho ----- OK
+ izumi ------- OK
+
+
+Answer changes
+--------------
+
+Changes answers relative to baseline: Yes
+
+ Summarize any changes to answers, i.e.,
+ - what code configurations: Hillslope (tests only)
+ - what platforms/compilers: Tests on Izumi and Derecho
+ - nature of change: Larger than roundoff
+
+ Only our tests are affected because I had to make changes to the test setup for compatibility; this included changing mesh file and hillslope data for some tests/testmods.
+
+
+Other details
+-------------
+
+Pull Requests that document the changes (include PR ids):
+- ESCOMP/CTSM#2434 (https://github.com/ESCOMP/CTSM/pull/2434)
+
+===============================================================
+===============================================================
+Tag name: ctsm5.3.003
+Originator(s): rgknox (Ryan Knox, LBNL, rgknox@lbl.gov)
+ glemieux (Gregory Lemieux, LBNL, glemieux@lbl.gov)
+Date: Mon Oct 07 10:33:14 AM MDT 2024
+One-line Summary: FATES default parameter file update
+
+Purpose and description of changes
+----------------------------------
+
+This tag updates the default parameter file for FATES bringing in a number of updates:
+ - adds two new arctic shrub pfts
+ - updates the default sapwood allometry mode for grass pfts
+ - updates understory leaf turnover specifications for longer turnover rates
+ - changes the default behavior of nutrient uptake
+
+Significant changes to scientifically-supported configurations
+--------------------------------------------------------------
+
+Does this tag change answers significantly for any of the following physics configurations?
+(Details of any changes will be given in the "Answer changes" section below.)
+
+ [Put an [X] in the box for any configuration with significant answer changes.]
+
+[ ] clm6_0
+
+[ ] clm5_1
+
+[ ] clm5_0
+
+[ ] ctsm5_0-nwp
+
+[ ] clm4_5
+
+
+Bugs fixed
+----------
+List of CTSM issues fixed (include CTSM Issue # and description) [one per line]:
+ Fixes #2783 -- Error in FatescoldLandUse testmod
+ Fixes FATES#1211 -- Switching the default fates_cnp_prescribed_* parameters from 1 to 0
+
+Notes of particular relevance for developers:
+---------------------------------------------
+Changes to tests or testing:
+ FatesColdLandUse build has been added to the list of expected failures due to #2810
+
+Testing summary:
+----------------
+
+ [PASS means all tests PASS; OK means tests PASS other than expected fails.]
+
+ regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):
+
+ derecho ----- OK
+ izumi ------- OK
+
+ fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates--)
+ derecho ----- OK
+ izumi ------- OK
+
+Answer changes
+--------------
+
+Changes answers relative to baseline:
+
+ Summarize any changes to answers, i.e.,
+ - what code configurations: FATES mode
+ - what platforms/compilers: ALL
+ - nature of change (roundoff; larger than roundoff/same climate; new climate): larger than roundoff
+
+Other details
+-------------
+List any git submodules updated (cime, rtm, mosart, cism, fates, etc.):
+ fates: sci.1.78.2_api.36.0.0 -> sci.1.78.3_api.36.1.0
+
+Pull Requests that document the changes (include PR ids):
+ https://github.com/ESCOMP/CTSM/pull/2700
+ https://github.com/NGEET/fates/pull/1255
+
+===============================================================
+===============================================================
+Tag name: ctsm5.3.002
+Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310)
+Date: Thu 26 Sep 2024 03:10:40 PM MDT
+One-line Summary: Duplicate tag of ctsm5.3.001
+
+===============================================================
+===============================================================
Tag name: ctsm5.3.001
Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310)
Date: Thu 26 Sep 2024 03:10:40 PM MDT
diff --git a/doc/ChangeSum b/doc/ChangeSum
index 1014612b40..af6e1675b4 100644
--- a/doc/ChangeSum
+++ b/doc/ChangeSum
@@ -1,5 +1,13 @@
Tag Who Date Summary
============================================================================================================================
+ ctsm5.3.009 samrabin 10/15/2024 Reduce outputs from matrixcnOn tests
+ ctsm5.3.008 olyson 10/14/2024 PPE change to sa_leaf in CanopyFluxesMod.F90
+ ctsm5.3.007 slevis 10/14/2024 Clm60 finidat updates for ne30, f09, f19 grids
+ ctsm5.3.006 samrabin 10/11/2024 Merge b4b-dev
+ ctsm5.3.005 erik 10/10/2024 Hardcoded tuning adjustments for Leung_2024 dust emissions
+ ctsm5.3.004 samrabin 10/07/2024 Move hillslope data off surface datasets
+ ctsm5.3.003 multiple 10/07/2024 FATES default parameter file update
+ ctsm5.3.002 multiple 09/26/2024 Duplicate tag (same as 5.3.001)
ctsm5.3.001 multiple 09/26/2024 Merge b4b-dev
ctsm5.3.0 multiple 09/24/2024 Update surface datasets, CN Matrix, CLM60: excess ice on, explicit A/C on, crop calendars, Sturm snow, Leung dust emissions, prigent roughness data
ctsm5.2.029 multiple 09/24/2024 New surface datasets: double tag of ctsm5.3.0
diff --git a/src/biogeochem/DustEmisLeung2023.F90 b/src/biogeochem/DustEmisLeung2023.F90
index 869c18c0dc..e9306029be 100644
--- a/src/biogeochem/DustEmisLeung2023.F90
+++ b/src/biogeochem/DustEmisLeung2023.F90
@@ -358,10 +358,6 @@ subroutine DustEmission (this, bounds, &
! !LOCAL VARIABLES
integer :: fp,p,c,l,g,m,n ! indices
real(r8) :: liqfrac ! fraction of total water that is liquid
- real(r8) :: wnd_frc_rat ! [frc] Wind friction threshold over wind friction
- real(r8) :: wnd_frc_slt_dlt ! [m s-1] Friction velocity increase from saltatn
- real(r8) :: wnd_rfr_dlt ! [m s-1] Reference windspeed excess over threshld
- real(r8) :: dst_slt_flx_rat_ttl
real(r8) :: flx_mss_hrz_slt_ttl
real(r8) :: flx_mss_vrt_dst_ttl(bounds%begp:bounds%endp)
real(r8) :: frc_thr_wet_fct
@@ -384,14 +380,14 @@ subroutine DustEmission (this, bounds, &
real(r8) :: wnd_frc_thr_slt_it ! [m/s] created for impact threshold friction velocity
real(r8) :: wnd_frc_thr_slt ! [m/s] used for wet fluid threshold friction velocity
real(r8) :: K_length ! [dimless] normalized mean interobstacle distance, or called gap length (Okin, 2008)
+ ! dmleung has these variables and will change them into pointers and prepare for their history outputs. 30 Sep 2024
real(r8) :: bare_frc ! LUH2 bare soil land cover fraction
- real(r8) :: veg_frc ! LUH2 natural vegetation + crop land cover fraction
+ real(r8) :: natveg_frc ! LUH2 natural vegetation cover fraction
+ real(r8) :: crop_frc ! LUH2 crop cover fraction.
!
! constants
!
- real(r8), parameter :: cst_slt = 2.61_r8 ! [frc] Saltation constant
- real(r8), parameter :: flx_mss_fdg_fct = 5.0e-4_r8 ! [frc] Empir. mass flx tuning eflx_lh_vegt
- real(r8), parameter :: vai_mbl_thr = 1.0_r8 ! [m2 m-2] new VAI threshold; Danny M. Leung suggests 1, and Zender's scheme uses 0.3
+ real(r8), parameter :: vai_mbl_thr = 0.6_r8 ! [m2 m-2] new VAI threshold; Danny M. Leung suggests something between 0.6 and 1 for tuning. Zender's scheme uses 0.3. Simone Tilmes might want this as a namelist variable for easier CESM tuning. dmleung 30 Sep 2024.
real(r8), parameter :: Cd0 = 4.4e-5_r8 ! [dimless] proportionality constant in calculation of dust emission coefficient
real(r8), parameter :: Ca = 2.7_r8 ! [dimless] proportionality constant in scaling of dust emission exponent
@@ -407,11 +403,12 @@ subroutine DustEmission (this, bounds, &
real(r8), parameter :: D_p = 130e-6_r8 ! [m] Medium soil particle diameter, assuming a global constant of ~130 um following Leung et al. (2023). dmleung 16 Feb 2024
real(r8), parameter :: gamma_Shao = 1.65e-4_r8 ! [kg s-2] interparticle cohesion: fitting parameter in Shao and Lu (2000) (S&L00). dmleung 16 Feb 2024
real(r8), parameter :: A_Shao = 0.0123_r8 ! [dimless] coefficient for aerodynamic force: fitting parameter in Shao and Lu (2000). dmleung 16 Feb 2024
- real(r8), parameter :: frag_expt_thr = 5.0_r8 ! [dimless] threshold for fragmentation exponent defined in Leung et al. (2023), somewhere within 3 to 5. It is used to prevent a local AOD blowup (over Patagonia, Argentina), but one can test larger values and relax the threshold if wanted. dmleung 16 Feb 2024
+ real(r8), parameter :: frag_expt_thr = 2.5_r8 ! [dimless] Maximum value or threshold for fragmentation exponent defined in Leung et al. (2023). Danny M. Leung suggested it to be somewhere between 3 and 5 for tuning. It is used to prevent a local AOD blowup (over Patagonia, Argentina), but one can test larger values and relax the threshold if wanted. dmleung 16 Feb 2024. Update: Simone Tilmes might want this as a namelist variable for easier CESM tuning. 30 Sep 2024.
real(r8), parameter :: z0a_glob = 1e-4_r8 ! [m] assumed globally constant aeolian roughness length value in Leung et al. (2023), for the log law of the wall for Comola et al. (2019) intermittency scheme. dmleung 20 Feb 2024
real(r8), parameter :: hgt_sal = 0.1_r8 ! [m] saltation height used by Comola et al. (2019) intermittency scheme for the log law of the wall. dmleung 20 Feb 2024
real(r8), parameter :: vai0_Okin = 0.1_r8 ! [m2/m2] minimum VAI needed for Okin-Pierre's vegetation drag partition equation. lai=0 in the equation will lead to infinity, so a small value is added into this lai dmleung defined.
real(r8), parameter :: zii = 1000.0_r8 ! [m] convective boundary layer height added by dmleung 20 Feb 2024, following other CTSM modules (e.g., CanopyFluxesMod). Should we transfer PBL height (PBLH) from CAM?
+ real(r8), parameter :: dust_veg_drag_fact = 0.7_r8 ! [dimless] dmleung added a tuning factor for Greg Okin's vegetation drag partition effect. dmleung suggested a smaller vegetation drag partition effect given an increase in vegetation roughness after CTSM switched from using ZengWang2007 to Meier2022. This is simply because the drag partition effect should decrease with increasing roughness, but Okin's scheme is only a function of LAI. One might want to change this factor to 1_r8 when using ZengWang2007. dmleung 30 Sep 2024
real(r8) :: numer ! Numerator term for threshold crossing rate
real(r8) :: denom ! Denominator term for threshold crossing rate
!------------------------------------------------------------------------
@@ -650,8 +647,8 @@ subroutine DustEmission (this, bounds, &
! calculate Okin's shear stress ratio (SSR, which is vegetation drag partition factor) using Pierre's equation
- K_length = 2.0_r8 * (1.0_r8/vai_Okin(p) - 1.0_r8) ! Here LAI has to be non-zero to avoid blowup, and < 1 to avoid -ve K_length. See this equation in Leung et al. (2023). This line is Okin's formulation
- ssr(p) = (K_length+f_0*c_e)/(K_length+c_e) ! see this equation in Caroline Pierre et al. (2014) or Leung et al. (2023). This line is Pierre's formulation.
+ K_length = 2.0_r8 * (1.0_r8/vai_Okin(p) - 1.0_r8) ! Here VAI has to be non-zero to avoid blowup, and < 1 to avoid -ve K_length. See this equation in Leung et al. (2023). This line is Okin's formulation
+ ssr(p) = dust_veg_drag_fact * (K_length+f_0*c_e)/(K_length+c_e) ! see this equation in Caroline Pierre et al. (2014) or Leung et al. (2023). This line is Pierre's formulation. dmleung added a tuning factor for Okin's vegetation drag partition effect (SSR) on 30 Sep 2024.
! calculation of the hybrid/total drag partition effect considering both rock and vegetation drag partitioning using LUH2 bare and veg fractions within a grid
if (lun%itype(l) == istsoil .or. lun%itype(l) == istcrop) then
@@ -886,4 +883,4 @@ end subroutine SetDragPartition
!==============================================================================
-end module DustEmisLeung2023
\ No newline at end of file
+end module DustEmisLeung2023
diff --git a/src/biogeophys/CanopyFluxesMod.F90 b/src/biogeophys/CanopyFluxesMod.F90
index a969dc0583..0c5431728d 100644
--- a/src/biogeophys/CanopyFluxesMod.F90
+++ b/src/biogeophys/CanopyFluxesMod.F90
@@ -753,6 +753,7 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp,
.or. dbh(p) < min_stem_diameter) then
frac_rad_abs_by_stem(p) = 0.0_r8
sa_stem(p) = 0.0_r8
+ sa_leaf(p) = sa_leaf(p) + esai(p)
endif
! if using Satellite Phenology mode, calculate leaf and stem biomass
diff --git a/src/biogeophys/HillslopeHydrologyMod.F90 b/src/biogeophys/HillslopeHydrologyMod.F90
index b2866df679..8fccd762f0 100644
--- a/src/biogeophys/HillslopeHydrologyMod.F90
+++ b/src/biogeophys/HillslopeHydrologyMod.F90
@@ -168,7 +168,7 @@ end subroutine check_aquifer_layer
!-----------------------------------------------------------------------
- subroutine InitHillslope(bounds,fsurdat)
+ subroutine InitHillslope(bounds, hillslope_file)
!
! !DESCRIPTION:
! Initialize hillslope geomorphology from input dataset
@@ -187,7 +187,7 @@ subroutine InitHillslope(bounds,fsurdat)
!
! !ARGUMENTS:
type(bounds_type), intent(in) :: bounds
- character(len=*) , intent(in) :: fsurdat ! surface data file name
+ character(len=*) , intent(in) :: hillslope_file ! hillslope data file name
integer, pointer :: ihillslope_in(:,:) ! read in - integer
integer, pointer :: ncolumns_hillslope_in(:) ! read in number of columns
integer, allocatable :: ncolumns_hillslope(:) ! number of hillslope columns
@@ -224,9 +224,9 @@ subroutine InitHillslope(bounds,fsurdat)
! consistency check
call check_aquifer_layer()
- ! Open surface dataset to read in data below
+ ! Open hillslope dataset to read in data below
- call getfil (fsurdat, locfn, 0)
+ call getfil (hillslope_file, locfn, 0)
call ncd_pio_openfile (ncid, locfn, 0)
allocate( &
@@ -248,7 +248,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='nhillcolumns', flag='read', data=ncolumns_hillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: nhillcolumns not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: nhillcolumns not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -266,7 +266,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='pct_hillslope', flag='read', data=fhillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: pct_hillslope not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: pct_hillslope not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -278,7 +278,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='hillslope_index', flag='read', data=ihillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: hillslope_index not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: hillslope_index not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -287,7 +287,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='column_index', flag='read', data=ihillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: column_index not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: column_index not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -296,7 +296,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='downhill_column_index', flag='read', data=ihillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: downhill_column_index not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: downhill_column_index not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -307,7 +307,7 @@ subroutine InitHillslope(bounds,fsurdat)
allocate(fhillslope_in(bounds%begg:bounds%endg,max_columns_hillslope))
call ncd_io(ncid=ncid, varname='hillslope_slope', flag='read', data=fhillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: hillslope_slope not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: hillslope_slope not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
@@ -317,7 +317,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='hillslope_aspect', flag='read', data=fhillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: hillslope_aspect not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: hillslope_aspect not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
@@ -327,7 +327,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='hillslope_area', flag='read', data=fhillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: hillslope_area not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: hillslope_area not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -335,7 +335,7 @@ subroutine InitHillslope(bounds,fsurdat)
enddo
call ncd_io(ncid=ncid, varname='hillslope_distance', flag='read', data=fhillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: hillslope_length not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: hillslope_distance not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
@@ -345,7 +345,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='hillslope_width', flag='read', data=fhillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: hillslope_width not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: hillslope_width not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -354,7 +354,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='hillslope_elevation', flag='read', data=fhillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: hillslope_height not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: hillslope_elevation not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -380,7 +380,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='hillslope_stream_depth', flag='read', data=fstream_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: hillslope_stream_depth not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: hillslope_stream_depth not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -389,7 +389,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='hillslope_stream_width', flag='read', data=fstream_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: hillslope_stream_width not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: hillslope_stream_width not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -398,7 +398,7 @@ subroutine InitHillslope(bounds,fsurdat)
call ncd_io(ncid=ncid, varname='hillslope_stream_slope', flag='read', data=fstream_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: hillslope_stream_slope not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: hillslope_stream_slope not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -504,11 +504,11 @@ subroutine InitHillslope(bounds,fsurdat)
enddo
end if
- ! if missing hillslope information on surface dataset,
+ ! if missing hillslope information on dataset,
! call endrun
if (ncolumns_hillslope(l) > 0 .and. sum(hillslope_area) == 0._r8 .and. masterproc) then
write(iulog,*) 'Problem with input data: nhillcolumns is non-zero, but hillslope area is zero'
- write(iulog,*) 'Check surface data for gridcell at (lon/lat): ', grc%londeg(g),grc%latdeg(g)
+ write(iulog,*) 'Check hillslope data for gridcell at (lon/lat): ', grc%londeg(g),grc%latdeg(g)
call endrun( 'ERROR:: sum of hillslope areas is zero.'//errmsg(sourcefile, __LINE__) )
end if
@@ -559,7 +559,7 @@ end subroutine InitHillslope
!-----------------------------------------------------------------------
- subroutine SetHillslopeSoilThickness(bounds,fsurdat,soil_depth_lowland_in,soil_depth_upland_in)
+ subroutine SetHillslopeSoilThickness(bounds, hillslope_file, soil_depth_lowland_in, soil_depth_upland_in)
!
! !DESCRIPTION:
! Set hillslope column nbedrock values
@@ -578,7 +578,7 @@ subroutine SetHillslopeSoilThickness(bounds,fsurdat,soil_depth_lowland_in,soil_d
!
! !ARGUMENTS:
type(bounds_type), intent(in) :: bounds
- character(len=*) , intent(in) :: fsurdat ! surface data file name
+ character(len=*) , intent(in) :: hillslope_file ! hillslope data file name
real(r8), intent(in), optional :: soil_depth_lowland_in
real(r8), intent(in), optional :: soil_depth_upland_in
real(r8), pointer :: fhillslope_in(:,:) ! read in - float
@@ -599,14 +599,14 @@ subroutine SetHillslopeSoilThickness(bounds,fsurdat,soil_depth_lowland_in,soil_d
if (soil_profile_method==soil_profile_from_file) then
- ! Open surface dataset to read in data below
- call getfil (fsurdat, locfn, 0)
+ ! Open hillslope dataset to read in data below
+ call getfil (hillslope_file, locfn, 0)
call ncd_pio_openfile (ncid, locfn, 0)
allocate(fhillslope_in(bounds%begg:bounds%endg,max_columns_hillslope))
call ncd_io(ncid=ncid, varname='hillslope_bedrock_depth', flag='read', data=fhillslope_in, dim1name=grlnd, readvar=readvar)
if (masterproc .and. .not. readvar) then
- call endrun( 'ERROR:: soil_profile_method = "FromFile", but hillslope_bedrock not found on surface data set.'//errmsg(sourcefile, __LINE__) )
+ call endrun( 'ERROR:: soil_profile_method = "FromFile", but hillslope_bedrock not found on hillslope data set.'//errmsg(sourcefile, __LINE__) )
end if
do l = bounds%begl,bounds%endl
g = lun%gridcell(l)
@@ -896,7 +896,7 @@ end subroutine HillslopeDominantLowlandPft
subroutine HillslopePftFromFile(bounds,col_pftndx)
!
! !DESCRIPTION:
- ! Reassign patch type using indices from surface data file
+ ! Reassign patch type using indices from data file
! Assumes one patch per hillslope column
! In preparation for this reassignment of patch type, only the
! first patch was given a non-zero weight in surfrd_hillslope.
diff --git a/src/biogeophys/SoilStateInitTimeConstMod.F90 b/src/biogeophys/SoilStateInitTimeConstMod.F90
index e6fcca0f27..a730417315 100644
--- a/src/biogeophys/SoilStateInitTimeConstMod.F90
+++ b/src/biogeophys/SoilStateInitTimeConstMod.F90
@@ -220,6 +220,7 @@ subroutine SoilStateInitTimeConst(bounds, soilstate_inst, nlfilename)
real(r8) :: perturbed_sand ! temporary for paramfile implementation of +/- sand percentage
real(r8) :: residual_clay_frac ! temporary for paramfile implementation of +/- residual clay percentage
real(r8) :: perturbed_residual_clay_frac ! temporary for paramfile implementation of +/- residual clay percentage
+ real(r8) :: dust_moist_fact ! tuning factor for soil moisture effect on limiting dust emissions, used by Charlie Zender. Simone Tilmes suggested to change this parameter into a namelist variable for easier CESM tuning. dmleung added 30 Sep 2024
integer :: dimid ! dimension id
logical :: readvar
type(file_desc_t) :: ncid ! netcdf id
@@ -708,17 +709,24 @@ subroutine SoilStateInitTimeConst(bounds, soilstate_inst, nlfilename)
! Initialize threshold soil moisture, and mass fraction of clay as
! scaling coefficient of dust emission flux (kg/m2/s) in each DustEmisType
! module. See the comments in each function.
+ ! Zender suggested that threshold soil moisture is tunable (see comment
+ ! inside ThresholdSoilMoistZender2003). dmleung further add dust_moist_fact
+ ! ofr modelers to tune the threshold soil moisture. The resulting tuning
+ ! factor is thus a = dust_moist_fact / (clay3d). dmleung 30 Sep 2024
! --------------------------------------------------------------------
do c = begc,endc
g = col%gridcell(c)
- soilstate_inst%gwc_thr_col(c) = ThresholdSoilMoistZender2003( clay3d(g,1) )
+ !soilstate_inst%gwc_thr_col(c) = ThresholdSoilMoistZender2003( clay3d(g,1) )
if ( is_dust_emis_leung() )then
soilstate_inst%mss_frc_cly_vld_col(c) = MassFracClayLeung2023( clay3d(g,1) )
+ dust_moist_fact = 1.0_r8 ! change this into a namelist variable later., currrently not used but could be in the future
else
soilstate_inst%mss_frc_cly_vld_col(c) = MassFracClay( clay3d(g,1) )
+ dust_moist_fact = 1.0_r8
end if
+ soilstate_inst%gwc_thr_col(c) = dust_moist_fact * ThresholdSoilMoistZender2003( clay3d(g,1) )
end do
@@ -739,9 +747,11 @@ real(r8) function ThresholdSoilMoistZender2003( clay )
! Calculate the threshold gravimetric water content needed for dust emission, based on clay content
! This was the original equation with a = 1 / (%clay) being the tuning factor for soil
! moisture effect in Zender's 2003 dust emission scheme (only for top layer).
+ ! dmleung further added dust_moist_fact for more flexibility in tuning, so the tuning factor here
+ ! is a = dust_moist_fact / (%clay). dmleung added dust_moist_fact on 30 Sep 2024.
!
! 0.17 and 0.14 are fitting coefficients in Fecan et al. (1999), and 0.01 is used to
- ! convert surface clay fraction from percentage to fraction.
+ ! convert surface clay from percentage to fraction.
! The equation comes from Eq. 14 of Fecan et al. (1999; https://doi.org/10.1007/s00585-999-0149-7).
!
! NOTE: dmleung 19 Feb 2024.
diff --git a/src/fates b/src/fates
index e06e0dfcaf..825579d0b4 160000
--- a/src/fates
+++ b/src/fates
@@ -1 +1 @@
-Subproject commit e06e0dfcaf6347993d47dc29944e952d3e4412f7
+Subproject commit 825579d0b406fe99344591b5ed8356e5c7aeebec
diff --git a/src/main/clm_initializeMod.F90 b/src/main/clm_initializeMod.F90
index bf9a97ae58..e3d9eeda06 100644
--- a/src/main/clm_initializeMod.F90
+++ b/src/main/clm_initializeMod.F90
@@ -136,8 +136,8 @@ subroutine initialize2(ni,nj)
use clm_varpar , only : surfpft_lb, surfpft_ub
use clm_varpar , only : nlevsno
use clm_varpar , only : natpft_size,cft_size
- use clm_varctl , only : fsurdat
- use clm_varctl , only : finidat, finidat_interp_source, finidat_interp_dest, fsurdat
+ use clm_varctl , only : fsurdat, hillslope_file
+ use clm_varctl , only : finidat, finidat_interp_source, finidat_interp_dest
use clm_varctl , only : use_cn, use_fates, use_fates_luh
use clm_varctl , only : use_crop, ndep_from_cpl, fates_spitfire_mode
use clm_varctl , only : use_hillslope
@@ -254,7 +254,7 @@ subroutine initialize2(ni,nj)
call pftcon%Init()
! Read surface dataset and set up subgrid weight arrays
- call surfrd_get_data(begg, endg, ldomain, fsurdat, actual_numcft)
+ call surfrd_get_data(begg, endg, ldomain, fsurdat, hillslope_file, actual_numcft)
if(use_fates) then
@@ -305,7 +305,7 @@ subroutine initialize2(ni,nj)
if (use_hillslope) then
! Initialize hillslope properties
- call InitHillslope(bounds_proc, fsurdat)
+ call InitHillslope(bounds_proc, hillslope_file)
endif
! Set filters
diff --git a/src/main/clm_instMod.F90 b/src/main/clm_instMod.F90
index ae83a1b31f..210cff2c2e 100644
--- a/src/main/clm_instMod.F90
+++ b/src/main/clm_instMod.F90
@@ -188,7 +188,7 @@ subroutine clm_instInit(bounds)
!
! !USES:
use clm_varpar , only : nlevsno
- use controlMod , only : nlfilename, fsurdat
+ use controlMod , only : nlfilename, fsurdat, hillslope_file
use domainMod , only : ldomain
use SoilBiogeochemDecompCascadeMIMICSMod, only : init_decompcascade_mimics
use SoilBiogeochemDecompCascadeBGCMod , only : init_decompcascade_bgc
@@ -280,7 +280,7 @@ subroutine clm_instInit(bounds)
! Set hillslope column bedrock values
if (use_hillslope) then
- call SetHillslopeSoilThickness(bounds,fsurdat, &
+ call SetHillslopeSoilThickness(bounds, hillslope_file, &
soil_depth_lowland_in=8.5_r8,&
soil_depth_upland_in =2.0_r8)
call setSoilLayerClass(bounds)
diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90
index cb7e2e3931..5fa2602e5a 100644
--- a/src/main/clm_varctl.F90
+++ b/src/main/clm_varctl.F90
@@ -109,6 +109,7 @@ module clm_varctl
character(len=fname_len), public :: finidat = ' ' ! initial conditions file name
character(len=fname_len), public :: fsurdat = ' ' ! surface data file name
+ character(len=fname_len), public :: hillslope_file = ' ' ! hillslope data file name
character(len=fname_len), public :: paramfile = ' ' ! ASCII data file with PFT physiological constants
character(len=fname_len), public :: nrevsn = ' ' ! restart data file name for branch run
character(len=fname_len), public :: fsnowoptics = ' ' ! snow optical properties file name
diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90
index 3b2409344d..3f5c58ac0e 100644
--- a/src/main/controlMod.F90
+++ b/src/main/controlMod.F90
@@ -147,7 +147,7 @@ subroutine control_init(dtime)
! Input datasets
namelist /clm_inparm/ &
- fsurdat, &
+ fsurdat, hillslope_file, &
paramfile, fsnowoptics, fsnowaging
! History, restart options
@@ -734,6 +734,7 @@ subroutine control_spmd()
call mpi_bcast (finidat_interp_source, len(finidat_interp_source), MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (finidat_interp_dest, len(finidat_interp_dest), MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fsurdat, len(fsurdat), MPI_CHARACTER, 0, mpicom, ier)
+ call mpi_bcast (hillslope_file, len(hillslope_file), MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fatmlndfrc,len(fatmlndfrc),MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (paramfile, len(paramfile) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fsnowoptics, len(fsnowoptics), MPI_CHARACTER, 0, mpicom, ier)
@@ -1019,6 +1020,11 @@ subroutine control_print ()
else
write(iulog,*) ' surface data = ',trim(fsurdat)
end if
+ if (hillslope_file == ' ') then
+ write(iulog,*) ' hillslope_file, hillslope dataset not set'
+ else
+ write(iulog,*) ' hillslope data = ',trim(hillslope_file)
+ end if
if (fatmlndfrc == ' ') then
write(iulog,*) ' fatmlndfrc not set, setting frac/mask to 1'
else
diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90
index 8ae4ace7e3..b2df9abfab 100644
--- a/src/main/histFileMod.F90
+++ b/src/main/histFileMod.F90
@@ -2328,6 +2328,7 @@ subroutine htape_create (t, histrest)
use clm_varpar , only : natpft_size, cft_size, maxpatch_glc, nlevdecomp_full, mxsowings, mxharvests
use landunit_varcon , only : max_lunit
use clm_varctl , only : caseid, ctitle, fsurdat, finidat, paramfile
+ use clm_varctl , only : hillslope_file
use clm_varctl , only : version, hostname, username, conventions, source
use clm_varctl , only : use_hillslope,nhillslope,max_columns_hillslope
use domainMod , only : ldomain
@@ -2428,6 +2429,8 @@ subroutine htape_create (t, histrest)
call ncd_putatt(lnfid, ncd_global, 'case_id', trim(caseid))
str = get_filename(fsurdat)
call ncd_putatt(lnfid, ncd_global, 'Surface_dataset', trim(str))
+ str = get_filename(hillslope_file)
+ call ncd_putatt(lnfid, ncd_global, 'Hillslope_dataset', trim(str))
if (finidat == ' ') then
str = 'arbitrary initialization'
else
diff --git a/src/main/restFileMod.F90 b/src/main/restFileMod.F90
index 6a574406fd..c7dbf0da72 100644
--- a/src/main/restFileMod.F90
+++ b/src/main/restFileMod.F90
@@ -503,6 +503,7 @@ subroutine restFile_dimset( ncid )
! !USES:
use clm_time_manager , only : get_nstep
use clm_varctl , only : caseid, ctitle, version, username, hostname, fsurdat
+ use clm_varctl , only : hillslope_file
use clm_varctl , only : conventions, source
use dynSubgridControlMod , only : get_flanduse_timeseries
use clm_varpar , only : numrad, nlevlak, nlevsno, nlevgrnd, nlevmaxurbgrnd, nlevcan
@@ -569,6 +570,7 @@ subroutine restFile_dimset( ncid )
call ncd_putatt(ncid, NCD_GLOBAL, 'case_title' , trim(ctitle))
call ncd_putatt(ncid, NCD_GLOBAL, 'case_id' , trim(caseid))
call ncd_putatt(ncid, NCD_GLOBAL, 'surface_dataset', trim(fsurdat))
+ call ncd_putatt(ncid, NCD_GLOBAL, 'hillslope_dataset', trim(hillslope_file))
call ncd_putatt(ncid, NCD_GLOBAL, 'flanduse_timeseries', trim(get_flanduse_timeseries()))
call ncd_putatt(ncid, NCD_GLOBAL, 'title', 'CLM Restart information')
diff --git a/src/main/surfrdMod.F90 b/src/main/surfrdMod.F90
index 88d43a09cc..4005ec7845 100644
--- a/src/main/surfrdMod.F90
+++ b/src/main/surfrdMod.F90
@@ -46,6 +46,83 @@ module surfrdMod
contains
+ subroutine check_domain_attributes(ncid, begg, endg, ldomain, info)
+ ! !DESCRIPTION:
+ ! Checks for mismatches between the land domain and a surface or similar dataset's domain.
+ !
+ ! !USES:
+ use domainMod, only : domain_type, domain_init, domain_clean
+ !
+ ! !ARGUMENTS
+ type(file_desc_t), intent(inout) :: ncid ! netcdf id for input file
+ integer, intent(in) :: begg, endg
+ type(domain_type), intent(in) :: ldomain ! land domain
+ character(len=*), intent(in) :: info ! information to include in messages
+ !
+ ! !LOCAL VARIABLES
+ type(domain_type) :: inputdata_domain ! local domain associated with input dataset
+ logical :: readvar ! true => variable is on dataset
+ logical :: istype_domain ! true => input file is of type domain
+ character(len=16) :: lon_var, lat_var ! names of lat/lon on dataset
+ logical :: isgrid2d ! true => input grid is 2d
+ integer :: ni, nj, ns ! domain sizes
+ integer :: n
+ real(r8) :: rmaxlon, rmaxlat ! local min/max vars
+
+ character(len=32) :: subname = 'check_domain_attributes' ! subroutine name
+
+ call check_var(ncid=ncid, varname='xc', readvar=readvar)
+ if (readvar) then
+ istype_domain = .true.
+ else
+ call check_var(ncid=ncid, varname='LONGXY', readvar=readvar)
+ if (readvar) then
+ istype_domain = .false.
+ else
+ call endrun( msg=' ERROR: unknown '//info//' domain type---'//errMsg(sourcefile, __LINE__))
+ end if
+ end if
+ if (istype_domain) then
+ lon_var = 'xc'
+ lat_var = 'yc'
+ else
+ lon_var = 'LONGXY'
+ lat_var = 'LATIXY'
+ end if
+ if ( masterproc )then
+ write(iulog,*) trim(subname),' ',info,' lon_var = ',trim(lon_var),' lat_var =',trim(lat_var)
+ end if
+
+ call ncd_inqfdims(ncid, isgrid2d, ni, nj, ns)
+ call domain_init(inputdata_domain, isgrid2d, ni, nj, begg, endg, subgrid_level=grlnd)
+
+ call ncd_io(ncid=ncid, varname=lon_var, flag='read', data=inputdata_domain%lonc, &
+ dim1name=grlnd, readvar=readvar)
+ if (.not. readvar) call endrun( msg=' ERROR: lon var NOT on '//info//' dataset---'//errMsg(sourcefile, __LINE__))
+
+ call ncd_io(ncid=ncid, varname=lat_var, flag='read', data=inputdata_domain%latc, &
+ dim1name=grlnd, readvar=readvar)
+ if (.not. readvar) call endrun( msg=' ERROR: lat var NOT on '//info//' dataset---'//errMsg(sourcefile, __LINE__))
+
+ rmaxlon = 0.0_r8
+ rmaxlat = 0.0_r8
+ do n = begg,endg
+ if (ldomain%lonc(n)-inputdata_domain%lonc(n) > 300.) then
+ rmaxlon = max(rmaxlon,abs(ldomain%lonc(n)-inputdata_domain%lonc(n)-360._r8))
+ elseif (ldomain%lonc(n)-inputdata_domain%lonc(n) < -300.) then
+ rmaxlon = max(rmaxlon,abs(ldomain%lonc(n)-inputdata_domain%lonc(n)+360._r8))
+ else
+ rmaxlon = max(rmaxlon,abs(ldomain%lonc(n)-inputdata_domain%lonc(n)))
+ endif
+ rmaxlat = max(rmaxlat,abs(ldomain%latc(n)-inputdata_domain%latc(n)))
+ enddo
+ if (rmaxlon > 0.001_r8 .or. rmaxlat > 0.001_r8) then
+ write(iulog,*)' ERROR: '//info//' dataset vs. land domain lon/lat mismatch error', rmaxlon,rmaxlat
+ call endrun(msg=errMsg(sourcefile, __LINE__))
+ end if
+ call domain_clean(inputdata_domain)
+ end subroutine check_domain_attributes
+
!-----------------------------------------------------------------------
subroutine surfrd_compat_check ( lfsurdat )
!
@@ -111,7 +188,7 @@ subroutine surfrd_compat_check ( lfsurdat )
end subroutine surfrd_compat_check
!-----------------------------------------------------------------------
- subroutine surfrd_get_data (begg, endg, ldomain, lfsurdat, actual_numcft)
+ subroutine surfrd_get_data (begg, endg, ldomain, lfsurdat, lhillslope_file, actual_numcft)
!
! !DESCRIPTION:
! Read the surface dataset and create subgrid weights.
@@ -138,9 +215,10 @@ subroutine surfrd_get_data (begg, endg, ldomain, lfsurdat, actual_numcft)
use clm_varctl , only : create_crop_landunit, convert_ocean_to_land, collapse_urban, &
toosmall_soil, toosmall_crop, toosmall_glacier, &
toosmall_lake, toosmall_wetland, toosmall_urban, &
- n_dom_landunits
+ n_dom_landunits, &
+ use_hillslope
use fileutils , only : getfil
- use domainMod , only : domain_type, domain_init, domain_clean
+ use domainMod , only : domain_type
use clm_instur , only : wt_lunit, topo_glc_mec, pct_urban_max
use landunit_varcon , only : max_lunit, istsoil, isturb_MIN, isturb_MAX
use dynSubgridControlMod, only : get_flanduse_timeseries
@@ -152,19 +230,13 @@ subroutine surfrd_get_data (begg, endg, ldomain, lfsurdat, actual_numcft)
integer, intent(in) :: begg, endg, actual_numcft
type(domain_type),intent(in) :: ldomain ! land domain
character(len=*), intent(in) :: lfsurdat ! surface dataset filename
+ character(len=*), intent(in) :: lhillslope_file ! hillslope dataset filename
!
! !LOCAL VARIABLES:
- type(domain_type) :: surfdata_domain ! local domain associated with surface dataset
character(len=256):: locfn ! local file name
integer, parameter :: n_dom_urban = 1 ! # of dominant urban landunits
- integer :: n ! loop indices
- integer :: ni,nj,ns ! domain sizes
- character(len=16) :: lon_var, lat_var ! names of lat/lon on dataset
- logical :: readvar ! true => variable is on dataset
- real(r8) :: rmaxlon,rmaxlat ! local min/max vars
- type(file_desc_t) :: ncid ! netcdf id
- logical :: istype_domain ! true => input file is of type domain
- logical :: isgrid2d ! true => intut grid is 2d
+ type(file_desc_t) :: ncid ! netcdf id for lfsurdat
+ type(file_desc_t) :: ncid_hillslope ! netcdf id for lhillslope_file
character(len=32) :: subname = 'surfrd_get_data' ! subroutine name
!-----------------------------------------------------------------------
@@ -175,6 +247,10 @@ subroutine surfrd_get_data (begg, endg, ldomain, lfsurdat, actual_numcft)
write(iulog,*)'lfsurdat must be specified'
call endrun(msg=errMsg(sourcefile, __LINE__))
endif
+ if (use_hillslope .and. lhillslope_file == ' ') then
+ write(iulog,*)'lhillslope_file must be specified'
+ call endrun(msg=errMsg(sourcefile, __LINE__))
+ endif
endif
wt_lunit(:,:) = 0._r8
@@ -184,71 +260,24 @@ subroutine surfrd_get_data (begg, endg, ldomain, lfsurdat, actual_numcft)
call getfil( lfsurdat, locfn, 0 )
call ncd_pio_openfile (ncid, trim(locfn), 0)
-
- ! Cmopare surfdat_domain attributes to ldomain attributes
-
- call check_var(ncid=ncid, varname='xc', readvar=readvar)
- if (readvar) then
- istype_domain = .true.
- else
- call check_var(ncid=ncid, varname='LONGXY', readvar=readvar)
- if (readvar) then
- istype_domain = .false.
- else
- call endrun( msg=' ERROR: unknown domain type'//errMsg(sourcefile, __LINE__))
- end if
- end if
- if (istype_domain) then
- lon_var = 'xc'
- lat_var = 'yc'
- else
- lon_var = 'LONGXY'
- lat_var = 'LATIXY'
- end if
- if ( masterproc )then
- write(iulog,*) trim(subname),' lon_var = ',trim(lon_var),' lat_var =',trim(lat_var)
+ if (use_hillslope) then
+ call getfil( lhillslope_file, locfn, 0 )
+ call ncd_pio_openfile (ncid_hillslope, trim(locfn), 0)
end if
- call ncd_inqfdims(ncid, isgrid2d, ni, nj, ns)
- call domain_init(surfdata_domain, isgrid2d, ni, nj, begg, endg, subgrid_level=grlnd)
-
- call ncd_io(ncid=ncid, varname=lon_var, flag='read', data=surfdata_domain%lonc, &
- dim1name=grlnd, readvar=readvar)
- if (.not. readvar) call endrun( msg=' ERROR: lon var NOT on surface dataset'//errMsg(sourcefile, __LINE__))
-
- call ncd_io(ncid=ncid, varname=lat_var, flag='read', data=surfdata_domain%latc, &
- dim1name=grlnd, readvar=readvar)
- if (.not. readvar) call endrun( msg=' ERROR: lat var NOT on surface dataset'//errMsg(sourcefile, __LINE__))
-
- rmaxlon = 0.0_r8
- rmaxlat = 0.0_r8
- do n = begg,endg
- if (ldomain%lonc(n)-surfdata_domain%lonc(n) > 300.) then
- rmaxlon = max(rmaxlon,abs(ldomain%lonc(n)-surfdata_domain%lonc(n)-360._r8))
- elseif (ldomain%lonc(n)-surfdata_domain%lonc(n) < -300.) then
- rmaxlon = max(rmaxlon,abs(ldomain%lonc(n)-surfdata_domain%lonc(n)+360._r8))
- else
- rmaxlon = max(rmaxlon,abs(ldomain%lonc(n)-surfdata_domain%lonc(n)))
- endif
- rmaxlat = max(rmaxlat,abs(ldomain%latc(n)-surfdata_domain%latc(n)))
- enddo
- if (rmaxlon > 0.001_r8 .or. rmaxlat > 0.001_r8) then
- write(iulog,*)' ERROR: surfdata_domain/ldomain lon/lat mismatch error', rmaxlon,rmaxlat
- call endrun(msg=errMsg(sourcefile, __LINE__))
+ ! Compare dataset domain attributes to ldomain attributes
+ call check_domain_attributes(ncid, begg, endg, ldomain, 'surface')
+ if (use_hillslope) then
+ call check_domain_attributes(ncid_hillslope, begg, endg, ldomain, 'hillslope')
end if
- !~! TODO(SPM, 022015) - if we deallocate and clean ldomain here, then you
- !~! get errors in htape_timeconst where the information is needed to write
- !~! the *.h0* file
- !~!call domain_clean(surfdata_domain)
-
! Obtain special landunit info
call surfrd_special(begg, endg, ncid, ldomain%ns)
! Obtain vegetated landunit info
- call surfrd_veg_all(begg, endg, ncid, ldomain%ns, actual_numcft)
+ call surfrd_veg_all(begg, endg, ncid, ncid_hillslope, ldomain%ns, actual_numcft)
if (use_cndv) then
call surfrd_veg_dgvm(begg, endg)
@@ -831,7 +860,7 @@ subroutine surfrd_pftformat( begg, endg, ncid )
end subroutine surfrd_pftformat
!-----------------------------------------------------------------------
- subroutine surfrd_veg_all(begg, endg, ncid, ns, actual_numcft)
+ subroutine surfrd_veg_all(begg, endg, ncid, ncid_hillslope, ns, actual_numcft)
!
! !DESCRIPTION:
! Determine weight arrays for non-dynamic landuse mode
@@ -848,7 +877,8 @@ subroutine surfrd_veg_all(begg, endg, ncid, ns, actual_numcft)
! !ARGUMENTS:
implicit none
integer, intent(in) :: begg, endg, actual_numcft
- type(file_desc_t),intent(inout) :: ncid ! netcdf id
+ type(file_desc_t),intent(inout) :: ncid ! netcdf id for fsurdat
+ type(file_desc_t),intent(inout) :: ncid_hillslope ! netcdf id for hillslope_file
integer ,intent(in) :: ns ! domain size
!
! !LOCAL VARIABLES:
@@ -934,7 +964,7 @@ subroutine surfrd_veg_all(begg, endg, ncid, ns, actual_numcft)
! Obtain hillslope hydrology information and modify pft weights
if (use_hillslope) then
- call surfrd_hillslope(begg, endg, ncid, ns)
+ call surfrd_hillslope(begg, endg, ncid_hillslope, ns)
endif
! Convert from percent to fraction