@@ -669,7 +669,13 @@ endif
669669if ( (-e $SCRDIR /openwater_internal_rst) && (-e $SCRDIR /seaicethermo_internal_rst)) then
670670 echo " Saltwater internal state is already split, good to go!"
671671else
672- if ( ( -e $SCRDIR /saltwater_internal_rst ) && ( $counter == 1 ) ) then
672+ if ( ( ( -e $SCRDIR /saltwater_internal_rst ) || ( -e $EXPDIR /saltwater_internal_rst) ) && ( $counter == 1 ) ) then
673+
674+ echo " Found Saltwater internal state. Splitting..."
675+
676+ # If saltwater_internal_rst is in EXPDIR move to SCRDIR
677+ # -----------------------------------------------------
678+ if ( -e $EXPDIR /saltwater_internal_rst ) /bin/mv $EXPDIR /saltwater_internal_rst $SCRDIR
673679
674680 # The splitter script requires an OutData directory
675681 # -------------------------------------------------
@@ -709,16 +715,16 @@ else
709715 endif
710716endif
711717
712- # Test Saltwater Restart for Number of tiles correctness
718+ # Test Openwater Restart for Number of tiles correctness
713719# ------------------------------------------------------
714720
715721if ( -x $GEOSBIN /rs_numtiles.x ) then
716722
717- set N_SALT_TILES_EXPECTED = ` grep ' ^ *0' tile.data | wc -l`
718- set N_SALT_TILES_FOUND = ` $RUN_CMD 1 $GEOSBIN /rs_numtiles.x openwater_internal_rst | grep Total | awk ' {print $NF}' `
723+ set N_OPENW_TILES_EXPECTED = ` grep ' ^ *0' tile.data | wc -l`
724+ set N_OPENW_TILES_FOUND = ` $RUN_CMD 1 $GEOSBIN /rs_numtiles.x openwater_internal_rst | grep Total | awk ' {print $NF}' `
719725
720- if ( $N_SALT_TILES_EXPECTED ! = $N_SALT_TILES_FOUND ) then
721- echo " Error! Found $N_SALT_TILES_FOUND tiles in openwater. Expect to find $N_SALT_TILES_EXPECTED tiles."
726+ if ( $N_OPENW_TILES_EXPECTED ! = $N_OPENW_TILES_FOUND ) then
727+ echo " Error! Found $N_OPENW_TILES_FOUND tiles in openwater. Expect to find $N_OPENW_TILES_EXPECTED tiles."
722728 echo " Your restarts are probably for a different ocean."
723729 exit 7
724730 endif
0 commit comments