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