Skip to content

Commit

Permalink
Merge branch 'master' into fates_fuel_refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
adrifoster committed Oct 17, 2024
2 parents bafe717 + 26b9aa7 commit b35c684
Show file tree
Hide file tree
Showing 32 changed files with 966 additions and 375 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -3637,6 +3636,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" );
}
}

#-------------------------------------------------------------------------------
Expand Down
288 changes: 83 additions & 205 deletions bld/namelist_files/namelist_defaults_ctsm.xml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,11 @@ Full pathname datafile with fates parameters
Full pathname of surface data file.
</entry>

<entry id="hillslope_file" type="char*256" category="datasets"
input_pathname="abs" group="clm_inparm" valid_values="" >
Full pathname of hillslope data file.
</entry>

<entry id="fsnowoptics" type="char*256" category="datasets"
input_pathname="abs" group="clm_inparm" valid_values="" >
SNICAR (SNow, ICe, and Aerosol Radiative model) optical data file name
Expand Down
27 changes: 25 additions & 2 deletions bld/unit_testers/build-namelist_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,13 @@ sub cat_and_create_namelistinfile {
);
foreach my $key ( keys(%failtest) ) {
print( "$key\n" );
my $var;
foreach $var ( "phys" , "options", "namelst" ) {
if ( not exists $failtest{$key}{$var} ) {
die "ERROR: Subkey $var does not exist for failtest $key\nERROR:Check if you spelled $var correctly\n"
}
}

&make_config_cache($failtest{$key}{"phys"});
my $options = $failtest{$key}{"options"};
my $namelist = $failtest{$key}{"namelst"};
Expand Down Expand Up @@ -1359,13 +1366,21 @@ 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",
},
);
foreach my $key ( keys(%warntest) ) {
print( "$key\n" );

my $var;
foreach $var ( "phys" , "options", "namelst" ) {
if ( not exists $warntest{$key}{$var} ) {
die "ERROR: Subkey $var does not exist for warntest $key\nERROR:Check if you spelled $var correctly\n"
}
}

&make_config_cache($warntest{$key}{"phys"});
my $options = $warntest{$key}{"options"};
my $namelist = $warntest{$key}{"namelst"};
Expand Down Expand Up @@ -1595,6 +1610,14 @@ sub cat_and_create_namelistinfile {

foreach my $key ( keys(%finidat_files) ) {
print( "$key\n" );

my $var;
foreach $var ( "phys" , "atm_forc", "res", "bgc", "crop", "use_case", "start_ymd", "namelist" ) {
if ( not exists $finidat_files{$key}{$var} ) {
die "ERROR: Subkey $var does not exist for finidat_file $key\nERROR:Check if you spelled $var correctly\n"
}
}

my $phys = $finidat_files{$key}{'phys'};
print "physics = $phys\n";
&make_config_cache($phys);
Expand Down
6 changes: 5 additions & 1 deletion cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<desc lnd="CLM45[%SP][%SP-VIC][%BGC][%BGC-CROP][%FATES][%BGCDV][%BGCDV-CROP]" >clm4.5:</desc>
<desc lnd="CLM50[%SP][%SP-VIC][%SP-NOANTHRO][%BGC-NOANTHRO][%BGC][%BGC-CROP][%FATES][%BGCDV][%BGCDV-CROP][%BGC-CROP-CMIP6DECK][%BGC-CROP-CMIP6WACCMDECK][%NWP-SP][%NWP-BGC-CROP]">clm5.0:</desc>
<desc lnd="CLM51[%SP][%SP-NOANTHRO][%BGC-NOANTHRO][%BGC][%BGC-CROP][%FATES][%FATES-SP][%NWP-SP][%NWP-BGC-CROP]">clm5.1:</desc>
<desc lnd="CLM60[%SP][%SP-NOANTHRO][%BGC-NOANTHRO][%BGC][%BGC-CROP][%FATES][%FATES-SP][%NWP-SP][%NWP-BGC-CROP]">clm6.0:</desc>
<desc lnd="CLM60[%SP][%SP-NOANTHRO][%BGC-NOANTHRO][%BGC][%BGC-CROP][%FATES][%FATES-SP][%BGC-CROP-CMIP6DECK][%BGC-CROP-CMIP6WACCMDECK][%NWP-SP][%NWP-BGC-CROP]">clm6.0:</desc>
<desc option="SP" >Satellite phenology:</desc>

<desc option="SP-VIC" >Satellite phenology with VIC hydrology:</desc>
Expand Down Expand Up @@ -371,6 +371,10 @@
<value grid="l%1.9x2.5" compset="_CLM50%[^_]*CMIP6DECK[%_]" >$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_nociso_deck</value>
<value compset="_CLM50%[^_]*CMIP6WACCMDECK[%_]">$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_waccm_deck</value>
<value grid="l%1.9x2.5" compset="_CLM50%[^_]*CMIP6WACCMDECK[%_]">$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_waccm_nociso_deck</value>
<value compset="_CLM60%[^_]*CMIP6DECK[%_]" >$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_deck</value>
<value grid="l%1.9x2.5" compset="_CLM60%[^_]*CMIP6DECK[%_]" >$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_nociso_deck</value>
<value compset="_CLM60%[^_]*CMIP6WACCMDECK[%_]">$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_waccm_deck</value>
<value grid="l%1.9x2.5" compset="_CLM60%[^_]*CMIP6WACCMDECK[%_]">$COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_waccm_nociso_deck</value>
</values>
<group>run_component_ctsm</group>
<file>env_case.xml</file>
Expand Down
8 changes: 8 additions & 0 deletions cime_config/config_compsets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,21 @@
<alias>I1850Clm50BgcCropCmip6</alias>
<lname>1850_DATM%GSWP3v1_CLM50%BGC-CROP-CMIP6DECK_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm60BgcCropCmip6</alias>
<lname>1850_DATM%GSWP3v1_CLM60%BGC-CROP-CMIP6DECK_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>

<!-- Primarily for testing the CMIP6WACCMDECK compset option -->
<!-- Use the CMIP6 version (clm5_0) -->
<compset>
<alias>I1850Clm50BgcCropCmip6waccm</alias>
<lname>1850_DATM%GSWP3v1_CLM50%BGC-CROP-CMIP6WACCMDECK_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>
<compset>
<alias>I1850Clm60BgcCropCmip6waccm</alias>
<lname>1850_DATM%GSWP3v1_CLM60%BGC-CROP-CMIP6WACCMDECK_SICE_SOCN_MOSART_SGLC_SWAV</lname>
</compset>

<!-- clm5_0 (CMIP6) version with BGC-Crop and CRU forcing -->
<compset>
Expand Down
32 changes: 25 additions & 7 deletions cime_config/testdefs/ExpectedTestFails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,17 @@
</phase>
</test>

<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Bgc.izumi_nag.clm-NEON-MOAB--clm-PRISM">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
<phase name="RUN">
<status>FAIL</status>
<issue>#2310</issue>
</phase>
</test>

<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Fates.derecho_gnu.clm-FatesPRISM--clm-NEON-FATES-YELL">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
Expand Down Expand Up @@ -171,6 +182,13 @@
</phase>
</test>

<test name="SMS_Lm3_D_Mmpi-serial.1x1_brazil.I2000Clm50FatesCruRsGs.izumi_intel.clm-FatesColdHydro">
<phase name="CREATE_NEWCASE">
<status>FAIL</status>
<issue>#2454</issue>
</phase>
</test>

<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Fates.izumi_nag.clm-FatesFireLightningPopDens--clm-NEON-FATES-NIWO">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
Expand Down Expand Up @@ -245,13 +263,6 @@
</phase>
</test>

<test name="SMS_D_Ld5.5x5_amazon.I1850Clm51Bgc.derecho_gnu.clm-HillslopeC">
<phase name="RUN">
<status>FAIL</status>
<issue>#2423</issue>
</phase>
</test>

<test name="ERS_D_Ld15.f45_f45_mg37.I2000Clm50FatesRs.derecho_intel.clm-FatesColdTwoStream">
<phase name="COMPARE_base_rest">
<status>FAIL</status>
Expand Down Expand Up @@ -280,6 +291,13 @@
</phase>
</test>

<test name="ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdLandUse">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#2810</issue>
</phase>
</test>

<!-- Other submodule test list failures (MOSART, RTM, etc. -->

<test name="SMS_Lh3.f10_f10_mg37.I2000Clm51Sp.derecho_intel.mosart-clmAccelSpinupIgnoreWarn">
Expand Down
Loading

0 comments on commit b35c684

Please sign in to comment.