#!/usr/bin/perl5 -w umask 0002; # this gets checked into /CM/scripts $SYNOPDIR = "/synoptic/eof"; open (LAST, "/synoptic/LAST") or die "Can't open /synoptic/LAST: $!\n"; #open(LAST, "$SYNOPDIR/fd_M_96m_01d/LAST") or warn "Can't open $SYNOPDIR/fd_M_96m_01d/LAST: $!\n"; chomp($last = ); close(LAST); $path = $ENV{'PATH'}; $ENV{'PATH'} = "/home/jeneen/STAGING/bin/_sgi4:$path"; $ENV{'IDL_DIR'} = "/usr/local/bin/idl"; $start = $last + 1; $end = $last + 10; print "$start $end\n"; open(PEQ, "/CM/bin/_sgi4/peq -A -w prog:mdi_eof,level:lev1.8,series:fd_M_96m_01d[$start]|") || warn "$!\n"; while () { if (/^in_(\d+)_wd/) { ($foo, $foo, $dir) = split; chomp($dir); print "$dir\n"; $day = $start; print "day = $day\n"; system("mkdir $SYNOPDIR/fd_M_96m_01d/fd_M_96m_01d.00$day"); system("rm -rf $SYNOPDIR/fd_M_96m_01d/fd_M_96m_01d.00$day/*"); system("cp $dir/* $SYNOPDIR/fd_M_96m_01d/fd_M_96m_01d.00$day"); # system("ln -s $SYNOPDIR/fd_M_96m_01d/fd_M_96m_01d.00$day /mag/"); system("mkdir $SYNOPDIR/fd_Mag_remap_01d/fd_Mag_remap_01d.00$day"); system("rm -rf $SYNOPDIR/fd_Mag_remap_01d/fd_Mag_remap_01d.00$day/*"); system("rm $SYNOPDIR/fd_Mag_remap_small_01d/fd_Mag_remap_small_01d.00$day"); system("mkdir $SYNOPDIR/fd_Mag_remap_small_01d/fd_Mag_remap_small_01d.00$day"); system("rm -rf $SYNOPDIR/fd_Mag_remap_small_01d/fd_Mag_remap_small_01d.00$day/*"); system("/CM/bin/_sgi4/v2helio z=1 MOFFSET=1 VCORLEV=0 MAPRMAX=0.994 MAPLGMAX=89.75 MAPLGMIN=-89.75 MAPBMAX=90 LGSHIFT=2 MAPMMAX=1800 SINBDIVS=540 in=$SYNOPDIR/fd_M_96m_01d/fd_M_96m_01d.00$day/ out=$SYNOPDIR/fd_Mag_remap_01d/fd_Mag_remap_01d.00$day/"); system("/home/jeneen/STAGING/bin/_sgi4/rebin_vds nx=359 ny=360 in=$SYNOPDIR/fd_Mag_remap_01d/fd_Mag_remap_01d.00$day/ out=$SYNOPDIR/fd_Mag_remap_small_01d/fd_Mag_remap_small_01d.00$day/"); system("/CM/bin/_sgi4/eofsynop qualmask=xxx in=$SYNOPDIR/fd_Mag_remap_small_01d/fd_Mag_remap_small_01d.00$day/ new=$SYNOPDIR/fits/eofsynop.00$day.fits old=$SYNOPDIR/fits/eofsynop.00$last.fits"); $last = $day; system("rm -rf $SYNOPDIR/fd_Mag_remap_01d/fd_Mag_remap_01d.00$day/*"); system("rmdir $SYNOPDIR/fd_Mag_remap_01d/fd_Mag_remap_01d.00$day/"); system("ingest -pa archive_hold=5 in=$SYNOPDIR/fd_Mag_remap_small_01d/fd_Mag_remap_small_01d.00$day/ out=prog:mdi_eof,level:remap,series:fd_Mag_360_01d\[$day]"); } } close(PEQ); #open(LAST, ">$SYNOPDIR/fd_M_96m_01d/LAST") or warn "Can't open LAST: $!\n"; open (LAST, ">/synoptic/LAST") or warn "Can't open /synoptic/LAST for writing: $!\n"; print LAST "$last\n"; close(LAST);