Repository: ESMCI/cime

Issue:
Write NOC test using SystemTestsCompareTwo infrastructure
We want to convert the various system tests that compare two runs to use the SystemTestsCompareTwo infrastructure, where possible. I am opening separate issues for each such system test, so that we can check them off as we do this conversion.

Currently it looks like the NOC test is essentially just an SMS test - it looks like a place-holder waiting to be filled in.


Discussion:
A few questions about what the NOC test is supposed to do.
NINST needs to be set for the ocean component, but what it's supposed to be set to isn't specified. Is there a place I can find what it's supposed to be set to? Or will CIME supply a suitable default value?
The NOC description mentions that mod needs to be set, but doesn't give any information about what mod is. Where could I find this?


Resolving patch:
diff --git a/utils/python/CIME/SystemTests/noc.py b/utils/python/CIME/SystemTests/noc.py
deleted file mode 100644
--- a/utils/python/CIME/SystemTests/noc.py
+++ /dev/null
@@ -1,16 +0,0 @@
-"""
-CIME NOC? test  This class inherits from SystemTestsCommon
-"""
-from CIME.XML.standard_module_setup import *
-from CIME.SystemTests.system_tests_common import SystemTestsCommon
-
-logger = logging.getLogger(__name__)
-
-class NOC(SystemTestsCommon):
-
-    def __init__(self, case):
-        """
-        initialize an object interface to the NOC system test
-        """
-        #expectedrunvars = ["CONTINUE_RUN", "REST_OPTION", "HIST_OPTION", "HIST_N"]
-        SystemTestsCommon.__init__(self, case)


Test patch:
diff --git a/cime_config/config_tests.xml b/cime_config/config_tests.xml
--- a/cime_config/config_tests.xml
+++ b/cime_config/config_tests.xml
@@ -415,12 +415,6 @@ LII    CLM initial condition interpolation test
     <DOUT_S>FALSE</DOUT_S>
   </test>
 
-  <test NAME="NOC">
-    <DESC>multi-instance validation for single instance ocean (default length)</DESC>
-    <INFO_DBUG>1</INFO_DBUG>
-    <DOUT_S>FALSE</DOUT_S>
-  </test>
-
   <test NAME="OCP">
     <DESC>pop performance test</DESC>
     <INFO_DBUG>1</INFO_DBUG>
diff --git a/scripts/Testing/Testcases/NOC_script b/scripts/Testing/Testcases/NOC_script
deleted file mode 100755
--- a/scripts/Testing/Testcases/NOC_script
+++ /dev/null
@@ -1,136 +0,0 @@
-
-#======================================================================
-# Create instance modification
-#======================================================================
-
-cd $CASEROOT
-
-set STOP_N      = `./xmlquery STOP_N      --value`
-set STOP_OPTION = `./xmlquery STOP_OPTION --value`
-
-# Reset user_nl_files from previous runs
-if (-e user_nl_cice_0001.base) then
-  cp -f user_nl_cice_0001.base user_nl_cice_0001
-endif
-if (-e user_nl_cice_0002.base) then
-  cp -f user_nl_cice_0002.base user_nl_cice_0002
-endif
-
-cp -f user_nl_cice_0001 user_nl_cice_0001.base
-cp -f user_nl_cice_0002 user_nl_cice_0002.base
-
-cp -f user_nl_cice_0001 user_nl_cice_0001.mod
-cp -f user_nl_cice_0002 user_nl_cice_0002.mod
-
-# make user_nl_cice_0001.mod and user_nl_cice_0002.mod different from
-# user_nl_cice_0001.base and user_nl_cice_0002.base
-
-#cat >> user_nl_cice_0001.mod <<EOF
-#ndte = 121
-#EOF
-#cat >> user_nl_cice_0002.mod <<EOF
-#ndte = 121
-#EOF
-
-#======================================================================
-# do an initial run test with NINST 2, with the
-# user_nl_cice_0001 and user_nl_cice_0002 different - and the mod to
-# instance 1
-#======================================================================
-
-cd $CASEROOT
-echo "doing an initial test with mod to instance 1, with length taken from compset default" >>& $TESTSTATUS_LOG
-
-./xmlchange --file env_run.xml --id CONTINUE_RUN --val FALSE
-./xmlchange --file env_run.xml --id REST_OPTION  --val none
-./xmlchange --file env_run.xml --id HIST_OPTION  --val ${STOP_OPTION}
-./xmlchange --file env_run.xml --id HIST_N       --val ${STOP_N}
-
-# Note that user_nl_cice_0001 and user_nl_cice_0002 are different below
-rm user_nl_cice_0001
-rm user_nl_cice_0002
-cp -f user_nl_cice_0001.mod  user_nl_cice_0001
-cp -f user_nl_cice_0002.base user_nl_cice_0002
-
-./case.run
-if ($status != 0) then
-    echo " ERROR: case.run failed" >>& $TESTSTATUS_LOG
-    exit -1
-endif
-
-set CplLogFile = `ls -1t $RUNDIR/cpl.log* | head -1`
-if ( $?CplLogFile ) then
-    if (-e $CplLogFile) then
-       set pass = `zgrep "SUCCESSFUL TERMINATION" $CplLogFile | wc -l`
-       if ($pass != 1) then
-           echo "ERROR: coupler log $CplLogFile indicates model run failed" >>& $TESTSTATUS_LOG
- 	   exit -1
-       else
-           echo "Success: test log is $CplLogFile" >>& $TESTSTATUS_LOG
-       endif
-    endif
-else
-    echo "ERROR: no coupler log created, model run failed" >>& $TESTSTATUS_LOG
-    exit -1
-endif
-
-echo "moving relevant history files to suffix with command " >>& $TESTSTATUS_LOG
-echo "$SCRIPTSROOT/Tools/component_compare_copy base" >>& $TESTSTATUS_LOG
-echo "" >>& $TESTSTATUS_LOG
-
-$SCRIPTSROOT/Tools/component_compare_copy base
-
-#======================================================================
-# do an initial run test with NINST 2, with the
-# user_nl_cice_0001 and user_nl_cice_0002 different - and the mod to
-# instance 2
-#======================================================================
-
-cd $CASEROOT
-echo "doing a second test with mod to instance 2" >>& $TESTSTATUS_LOG
-
-rm user_nl_cice_0001
-rm user_nl_cice_0002
-cp -f user_nl_cice_0001.base user_nl_cice_0001
-cp -f user_nl_cice_0002.mod  user_nl_cice_0002
-
-./case.run
-if ($status != 0) then
-    echo " ERROR: case.run failed" >>& $TESTSTATUS_LOG
-    exit -1
-endif
-
-set CplLogFile = `ls -1t $RUNDIR/cpl.log* | head -1`
-if ( $?CplLogFile ) then
-    if (-e $CplLogFile) then
-       set pass = `zgrep "SUCCESSFUL TERMINATION" $CplLogFile | wc -l`
-       if ($pass != 1) then
-           echo "ERROR: coupler log $CplLogFile indicates model run failed" >>& $TESTSTATUS_LOG
- 	   exit -1
-       else
-           echo "Success: test log is $CplLogFile" >>& $TESTSTATUS_LOG
-       endif
-    endif
-else
-    echo "ERROR: no coupler log created, model run failed" >>& $TESTSTATUS_LOG
-    exit -1
-endif
-
-echo "moving relevant history files to suffix with commands " >>& $TESTSTATUS_LOG
-echo "$SCRIPTSROOT/Tools/component_compare_copy inst2mod"  >>& $TESTSTATUS_LOG
-echo "" >>& $TESTSTATUS_LOG
-
-$SCRIPTSROOT/Tools/component_compare_copy inst2mod
-
-#======================================================================
-# Check test status for all relevant component history files
-#======================================================================
-
-echo "DONE ${CASEBASEID} : (test finished, successful coupler log) " >>& $TESTSTATUS_LOG
-echo "" >>& $TESTSTATUS_LOG
-
-echo "obtaining test functionality from history files with commands " >>& $TESTSTATUS_LOG
-echo "$SCRIPTSROOT/Tools/component_compare_test base multiinst" >>& $TESTSTATUS_LOG
-echo "" >>& $TESTSTATUS_LOG
-
-$SCRIPTSROOT/Tools/component_compare_test base multiinst >>& $TESTSTATUS_OUT