#!/bin/tcsh -f
setenv D /Net/water/abhardwaj/GSM1/p2sig
setenv S /Net/elninost4/amishra/RSM/rsm_runs/runscr
setenv T /Net/elninost4/abhardwaj/RCM-FL/RSM/libs/etc

setenv O1 /Net/elninoshare/abhardwaj/PR/R_GSM/RSM_sstn/p2sig/Ren2grib


set yd1 = `cat $O1/lp2Ren  |cut -c9-18`
set md1 = `cat $O1/lp2Ren  |cut -c13-18`
set yr = `cat $O1/lp2Ren  |cut -c9-12`
set d1 = `cat $O1/lp2Ren  |cut -c13-14`
set dd = `cat $O1/lp2Ren  |cut -c15-16`
set hh = `cat $O1/lp2Ren  |cut -c17-18`
set t1 = 960

set cnt = 1
while ($cnt <= $t1)
echo $yd1[$cnt] $d1[$cnt] $md1[$cnt]
echo $dd[$cnt]
echo $hh[$cnt]
${T}/force_grib_date_mon ${O1}/pgb.anl.$yd1[$cnt].grib $yd1[$cnt]

${S}/p2sig ${O1}/pgb.anl.$yd1[$cnt].grib ${O1}/rsm$yd1[$cnt].p2sig ${yr[$cnt]}:${d1[$cnt]}:${dd[$cnt]}:${hh[$cnt]}:00
##############################
wait
#rm -rf fort.11 fort.51 p2sig.x p2sig.parm p2sig.out

@ cnt = $cnt + 1
end
