#====================================================================== # Set lengths of simulations that will be done #====================================================================== #====================================================================== # Clear coupler log files for comparison tests #====================================================================== unsetenv CPLLOG_INIT unsetenv CPLLOG_REST #====================================================================== # do an mct test #====================================================================== cd $CASEROOT echo "doing a ${STOP_N} ${STOP_OPTION} mct test" >>& $TESTSTATUS_LOG ./xmlchange -file env_run.xml -id CONTINUE_RUN -val FALSE ./xmlchange -file env_run.xml -id HIST_OPTION -val ${STOP_OPTION} ./xmlchange -file env_run.xml -id HIST_N -val ${STOP_N} rm $EXEROOT/cesm.exe >& /dev/null cp -f $EXEROOT/cesm.exe.mct $EXEROOT/cesm.exe || exit -9 cp -f env_build.xml.mct env_build.xml cp -f env_build.xml LockedFiles/env_build.xml.locked ./$CASE.run gunzip $RUNDIR/cpl.log*.gz set CplLogFile = `ls -1t $RUNDIR/cpl.log* | head -1` setenv CPLLOG_INIT $CplLogFile setenv BASEGEN_FILE01 $CplLogFile #====================================================================== # do an esmf test #====================================================================== cd $CASEROOT echo "doing a ${STOP_N} ${STOP_OPTION} esmf test" >>& $TESTSTATUS_LOG rm $EXEROOT/cesm.exe >& /dev/null cp -f $EXEROOT/cesm.exe.esmf $EXEROOT/cesm.exe || exit -9 cp -f env_build.xml.esmf env_build.xml cp -f env_build.xml LockedFiles/env_build.xml.locked ./$CASE.run gunzip $RUNDIR/cpl.log*.gz set CplLogFile = `ls -1t $RUNDIR/cpl.log* | head -1` setenv CPLLOG_REST $CplLogFile setenv BASEGEN_FILE02 $CplLogFile #====================================================================== # runs complete, restore original settings #====================================================================== cp -f env_build.xml.mct env_build.xml setenv CPLLOG_GENCMP $CPLLOG_REST echo "Initial Test log is $CPLLOG_INIT" >>& $TESTSTATUS_LOG echo "Restart Test log is $CPLLOG_REST" >>& $TESTSTATUS_LOG #====================================================================== # Check case validation first #====================================================================== set basestatus = "UNDEF" if ( $?CPLLOG_INIT ) then if ( $?CPLLOG_REST ) then echo "Comparing initial log file with second log file" >>& $TESTSTATUS_LOG $CASETOOLS/check_exactrestart.pl $CPLLOG_INIT $CPLLOG_REST >>& $TESTSTATUS_LOG set pass = `tail -1 $TESTSTATUS_LOG | grep PASS | wc -l` if ( $pass != 0 ) then set basestatus = "PASS " else set basestatus = "FAIL " endif else echo "ERROR in ${0}: restart coupler log file NOT set" >>& $TESTSTATUS_LOG set basestatus = "ERROR" endif else echo "ERROR in ${0}: initial coupler log file NOT set" >>& $TESTSTATUS_LOG set basestatus = "ERROR" endif echo "$basestatus ${CASEBASEID} " >&! $TESTSTATUS_OUT