#!/usr/sbin/perl -w # this gets checked into /CM/scripts $SYNOPDIR = "/synoptic/eof"; #open(LAST, "$SYNOPDIR/fd_M_96m_01d/LAST") or die "Can't open $SYNOPDIR/fd_M_96m_01d/LAST: $!\n"; #chomp($start = ); #close(LAST); $path = $ENV{'PATH'}; $ENV{'PATH'} = "/home/jeneen/STAGING/bin/_sgi4:$path"; $ENV{'IDL_DIR'} = "/usr/local/bin/idl"; umask 0002; $start = $ARGV[0]; $last = $start - 1; #$end = $last + 10; print "$start\n"; #open(PEQ, "/CM/bin/_sgi4/peq -A -w prog:mdi_eof,level:lev1.5,series:fd_M_96m_01d[$start]|") || warn "$!\n"; open(PEQ, "/CM/bin/_sgi4/peq -A -w prog:mdi_eof,level:lev1.8,series:fd_M_96m_01d[$start]|") || warn "$!\n"; while () { print; if (/^in_(\d+)_wd/) { ($foo, $foo, $dir) = split; chomp($dir); $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("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 die "Can't open LAST: $!\n"; #print LAST "$last\n"; #close(LAST);