Skip to content

Consider changing definition of SCT test so that baseline comparisons are done on the single-column case #1624

Description

@billsacks

Issue Type

Infrastructure Update

Issue Description

My understanding of CAM's SCT test is that it runs two cases: case 1 is a global run that creates an iop file (not sure what that is...); case 2 is a single-column run that uses the iop file generated by case 1. It uses the SystemTestsCompareTwo infrastructure to facilitate doing these two cases in a single test, though if I'm reading things correctly, there is no actual comparison of the two cases (which are probably not directly comparable anyway, since one is a global case and the other a single-column case).

From what I can find (maybe wrong), this appears to be the only testing done of CAM's single-column capabilities. If true, then this seems like an important test.

However, what I found in running this test is that baseline comparisons are just done for the global case, so the single-column case isn't covered by baseline comparisons. This is because of how SystemTestsCompareTwo is set up: the assumption there is that the two cases should give identical results, and so it shouldn't matter which case is used for baseline comparisons - so it (arbitrarily, I think) chooses case1 for the baseline generation / comparison.

If I'm right that this is the main / only way that CAM's single-column mode is tested, then it seems good to have baseline comparisons done of the single-column run. I'm not sure of the best way to accomplish this, but here are a few ideas:

(1) Rewrite the SCT test to not use SystemTestsCompareTwo. Instead follow examples like the ERI test or CTSM's SSP test that similarly do a sequence of tests that depend on each other, where the last one is in the main case directory and so is the one used for baselines. I'm not sure where you'd put the code that's currently in SCT's _component_compare_test, but since that appears not to actually be doing any comparison, I'd probably put that in the run phase and call it a run failure if the test there fails.

(2) If it's acceptable to use the iop files from a different CAM tag, and these don't need to change very often, then I'd suggest splitting this test into two separate tests, each of which does a single run: a test that generates these iop files to make sure that generation works correctly, and a test that uses pre-generated iop files, stored in the inputdata repository, to exercise the single-column functionality. Each of these tests would then be a simple single-case test. I think this is a good way to go if it's safe to point to relatively-stable versions of the iop forcings for the single-column test; I'm not sure whether that's the case or not.

(3) Change SystemTestsCompareTwo so that baseline generation / comparison is done from case2 rather than case1. Looking back at the implementation of SystemTestsCompareTwo, I think this might be tricky... but it actually feels like a better thing to do in general. My initial thought is that this could be done by using the main case directory for case2 and creating an explicit case1 directory. This would require care to make sure this is done correctly and doesn't break any of the tests built on this infrastructure. This may also require naming case2 with "base" if this comment is still true (I'm not sure if it is) (if so, this isn't ideal from an understandability perspective and also because I think it would require changes to many / all tests that are built on SystemTestsCompareTwo):

https://github.com/ESMCI/cime/blob/240989d6ae3d236894cda07993e0f64a20af1623/CIME/SystemTests/system_tests_compare_two.py#L117-L122

(4) There are probably other solutions I'm not thinking of.

All of these solutions feel somewhat involved - though (2) seems easiest if that's acceptable. I'll leave it to the CAM group to determine if this is worth the effort.

Will this change answers?

No

Will you be implementing this yourself?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions