forked from ESCOMP/CTSM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add system tests of having a second grain pool
These are useful for testing infrastructure that will be needed to incorporate AgSys. They can be dropped once we have tests of AgSys, which will exercise this infrastructure and more.
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
""" | ||
Implementation of the CIME LGRAIN2 (Land 2-grain-pool) test. | ||
This is a CTSM specific test: Verifies that we can allocate and use a second grain pool, | ||
and that answers are identical to a run with a single grain pool. This is useful until we | ||
have tests that include AgSys, which will exercise this capability more completely. | ||
(1) do a run with a second grain pool | ||
(2) do a standard run only a single grain pool | ||
The reason for having the second grain pool in the first case (rather than the other way | ||
around) is that this results in having a few extra fields present in the baselines. | ||
""" | ||
|
||
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo | ||
from CIME.XML.standard_module_setup import * | ||
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
class LGRAIN2(SystemTestsCompareTwo): | ||
|
||
def __init__(self, case): | ||
SystemTestsCompareTwo.__init__(self, case, | ||
separate_builds = False, | ||
run_two_suffix = 'grain1', | ||
run_one_description = 'use a second grain pool', | ||
run_two_description = 'use a single grain pool', | ||
ignore_fieldlist_diffs = True) | ||
|
||
def _case_one_setup(self): | ||
append_to_user_nl_files(caseroot = self._get_caseroot(), | ||
component = "clm", | ||
contents = "for_testing_use_second_grain_pool=.true.") | ||
|
||
def _case_two_setup(self): | ||
append_to_user_nl_files(caseroot = self._get_caseroot(), | ||
component = "clm", | ||
contents = "for_testing_use_second_grain_pool=.false.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters