Sepember 21, 2007
Rsm2Roms_nobulk in NP1 and Rsm2Roms_builk in NP1
Rsm2Roms_nobulk in indian25_east and indian25

When restarting, if r_pgb.ft* files were deleted already after generating avgfile and ftped to ocal machine,
restart fails at Rsm2Roms becuase it cannot grmean 3hrly individual files..
This is not fixed.
#avgfile=$Couple_Data_tempo_files_Dir/average.Day$NDay
avgfile=$RSM_TARGET_DIR/r_pgb.$YYYYgr$MMgr$DDgr.avrg.grib
#rm $avgfile 2>/dev/null
 
if [ ! -s $avgfile ]; then
echo "$avgfile is now created....."
echo "fthour to be read : $ft8 $ft7 $ft6 $ft5 $ft4 $ft3 $ft2 $ft1 "
rm $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay 2>/dev/null
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft8 > $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft7 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft6 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft5 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft4 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft3 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft2 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft1 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
 
$RSM_Etc_Dir/grmean -o $avgfile -s $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay > $Couple_Data_tempo_files_Dir/grmean$$ || exit 8
 


  1. RSM Archive to corvette
#cp $avgfile $RSM_TARGET_DIR/r_pgb.$YYYYgr$MMgr$DDgr.avrg.grib || exit 8
if [ $archive = yes ]; then
echo "sftping $avgfile to corvette at $archive_dir_rsm/$YYYYgr"
#$Couple_Run_Dir/putfile.sh $RSM_TARGET_DIR/r_pgb.$YYYYgr$MMgr$DDgr.avrg.grib $archive_dir_rsm/$YYYYgr/r_pgb.$YYYYgr$MMgr$DDgr.avrg.grib || exit 8
$Couple_Run_Dir/putfile.sh $avgfile $archive_dir_rsm/$YYYYgr/r_pgb.$YYYYgr$MMgr$DDgr.avrg.grib || exit 8
fi
rm $Couple_Data_ROMS_Dir/grmean.out 2>/dev/null
rm $Couple_Data_tempo_files_Dir/grmean$$ 2>/dev/null
else
echo "read from $avgfile"
fi
fiSepember 21, 2007
Rsm2Roms_nobulk in NP1 and Rsm2Roms_builk in NP1
Rsm2Roms_nobulk in indian25_east and indian25
 
When restarting, if r_pgb.ft* files were deleted already after generating avgfile and ftped to ocal machine,
restart fails at Rsm2Roms becuase it cannot grmean 3hrly individual files..
This is not fixed.
 
 
#avgfile=$Couple_Data_tempo_files_Dir/average.Day$NDay
avgfile=$RSM_TARGET_DIR/r_pgb.$YYYYgr$MMgr$DDgr.avrg.grib
#rm $avgfile 2>/dev/null
 
if [ ! -s $avgfile ]; then
echo "$avgfile is now created....."
echo "fthour to be read : $ft8 $ft7 $ft6 $ft5 $ft4 $ft3 $ft2 $ft1 "
rm $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay 2>/dev/null
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft8 > $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft7 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft6 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft5 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft4 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft3 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft2 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
ls -1 $RSM_TARGET_DIR/r_pgb.ft$ft1 >> $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay
 
$RSM_Etc_Dir/grmean -o $avgfile -s $Couple_Data_tempo_files_Dir/pgbindx.Day$NDay > $Couple_Data_tempo_files_Dir/grmean$$ || exit 8