#====================================================================== # Clear coupler log files for validation test #====================================================================== unsetenv CPLLOG_INIT #====================================================================== # do an initial run test #====================================================================== cd $CASEROOT touch cice_perf.out ./xmlchange -file env_run.xml -id CONTINUE_RUN -val FALSE ./xmlchange -file env_run.xml -id REST_OPTION -val none ./xmlchange -file env_build.xml -id CICE_AUTO_DECOMP -val false cat >! user_nl_cice.mhT <! user_nl_cice.mhF <> cice_perf.out while ($cnt < $cntmax && $found == 1) @ cnt = $cnt + 1 set acnt = $cnt if ($cnt < 1000) set acnt = "0${cnt}" if ($cnt < 100 ) set acnt = "00${cnt}" if ($cnt < 10 ) set acnt = "000${cnt}" if (-e env_build.xml.${acnt}) then cp -f env_build.xml.${acnt} env_build.xml cp -f env_build.xml LockedFiles/env_build.xml.locked cp -f $EXEROOT/cesm.exe.${acnt} $EXEROOT/cesm.exe foreach maskhalo (T F) cd $CASEROOT cp -f user_nl_cice.mh${maskhalo} user_nl_cice ./$CASE.run source ./Tools/ccsm_getenv || exit -2 set LID = `ls -1t $RUNDIR/cpl.log* | head -1 | sed 's/.*cpl.log.//' | sed 's/.gz//' ` @ ice_pes = ${NTASKS_ICE} * ${NTHRDS_ICE} if ($LID != "") then set ice_time = `grep -i "ice run time" timing/*$LID | cut -c 40-70` echo "$LID $ICE_GRID ${ice_pes} $NTASKS_ICE $NTHRDS_ICE $CICE_BLCKX $CICE_BLCKY $CICE_MXBLCKS $CICE_DECOMPTYPE $CICE_DECOMPSETTING $maskhalo ${ice_time}" >> cice_perf.out mv ${RUNDIR} ${RUNDIR}.${LID} else echo " error..... $ICE_GRID ${ice_pes} $NTASKS_ICE $NTHRDS_ICE $CICE_BLCKX $CICE_BLCKY $CICE_MXBLCKS $CICE_DECOMPTYPE $CICE_DECOMPSETTING $maskhalo " >> cice_perf.out mv ${RUNDIR} ${RUNDIR}.error endif end # maskhalo else set found = 0 endif end # while echo " done..... " >> cice_perf.out gunzip $RUNDIR/cpl.log*.gz set CplLogFile = `ls -1t $RUNDIR/cpl.log* | head -1` setenv CPLLOG_INIT $CplLogFile setenv BASEGEN_FILE01 $CplLogFile #====================================================================== # runs complete #====================================================================== setenv CPLLOG_GENCMP $CPLLOG_INIT echo "Initial Test log is $CPLLOG_INIT" >>& $TESTSTATUS_LOG #====================================================================== # Check case validation first #====================================================================== set basestatus = "UNDEF" if ( $?CPLLOG_INIT ) then echo "Checking successful completion in cpl log file" >>& $TESTSTATUS_LOG set pass = `grep "SUCCESSFUL TERM" $CPLLOG_INIT | wc -l` if ( $pass != 0 ) then set basestatus = "PASS " else set basestatus = "FAIL " endif else echo "ERROR in ${0}: initial coupler log file NOT set" >>& $TESTSTATUS_LOG set basestatus = "ERROR" endif echo "$basestatus ${CASEBASEID} " >&! $TESTSTATUS_OUT