PRO ducall,yr,mo,day,script=script,quiet=quiet,norun=norun IF N_PARAMS() LT 3 THEN BEGIN MESSAGE,'Usage: ducall,yr,mo,day',/INFORMATIONAL RETURN ENDIF ds=STRING(day,FORMAT='(I2.2)') IF KEYWORD_SET(script) THEN BEGIN OPENW,jscrunit,'/jasper/cnsr3_data1/scripts/uc'+ds+'j',/GET_LUN PRINTF,jscrunit,'#! /bin/csh -f' OPENW,sscrunit,'/jasper/cnsr3_data1/scripts/uc'+ds+'s',/GET_LUN PRINTF,sscrunit,'#! /bin/csh -f' OPENW,wscrunit,'/jasper/cnsr3_data1/scripts/uc'+ds+'w',/GET_LUN PRINTF,wscrunit,'#! /bin/csh -f' ENDIF jtncf=0 stncf=0 wtncf=0 start=SYSTIME(1) cf=finkfile('/jasper/cnsr3_data1/air/c0/f0/t'+ds+'00060.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,sscrunit,script ENDFOR stncf=stncf+ncf cf=finkfile('/jasper/cnsr3_data1/air/c0/f1/t'+ds+'01060.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,sscrunit,script ENDFOR stncf=stncf+ncf cf=finkfile('/jasper/cnsr3_data1/air/c0/f2/t'+ds+'02060.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,sscrunit,script ENDFOR stncf=stncf+ncf cf=finkfile('/jasper/cnsr3_data1/air/c0/f3/t'+ds+'03060.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,sscrunit,script ENDFOR stncf=stncf+ncf cf=finkfile('/jasper/cnsr3_data1/air/c1/f0/t'+ds+'10060.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,wscrunit,script ENDFOR wtncf=wtncf+ncf cf=finkfile('/jasper/cnsr3_data1/air/c1/f1/t'+ds+'11060.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,wscrunit,script ENDFOR wtncf=wtncf+ncf cf=finkfile('/jasper/cnsr3_data1/air/c1/f3/t'+ds+'13060.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,wscrunit,script ENDFOR wtncf=wtncf+ncf cf=finkfile('/jasper/cnsr3_data1/air/c1/f4/t'+ds+'14060.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,wscrunit,script ENDFOR wtncf=wtncf+ncf cf=finkfile('/jasper/cnsr3_data1/aur/c0/f2/n'+ds+'020??.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/aur/c1/f2/n'+ds+'120??.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/dk/c0/q'+ds+'0????.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/dk/c1/q'+ds+'1????.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/cal/c0/f0/p'+ds+'00???.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/cal/c0/f1/p'+ds+'01???.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/cal/c0/f2/p'+ds+'02???.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/cal/c0/f3/p'+ds+'03???.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/cal/c0/f4/p'+ds+'04???.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/cal/c1/f0/p'+ds+'10???.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/cal/c1/f1/p'+ds+'11???.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/cal/c1/f2/p'+ds+'12???.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/cal/c1/f3/p'+ds+'13???.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf cf=finkfile('/jasper/cnsr3_data1/cal/c1/f4/p'+ds+'14???.???',COUNT=ncf) IF ncf GE 1 THEN $ FOR k=0,ncf-1 DO BEGIN uncompress,cf(k),/rm,script=script IF KEYWORD_SET(script) THEN PRINTF,jscrunit,script ENDFOR jtncf=jtncf+ncf IF KEYWORD_SET(script) THEN BEGIN CLOSE,jscrunit CLOSE,sscrunit CLOSE,wscrunit FREE_LUN,jscrunit FREE_LUN,sscrunit FREE_LUN,wscrunit PRINT,stncf,'smith',wtncf,'wesson',jtncf,'jasper' $ ,FORMAT='(3(I4," files to be uncompressed by ",A/))' IF NOT KEYWORD_SET(norun) THEN SPAWN,'/jasper/cnsr3_data1/scripts/farmout '+ds ENDIF finish=SYSTIME(1) IF NOT KEYWORD_SET(norun) THEN wrilist,yr,mo,day,quiet=quiet IF NOT KEYWORD_SET(norun) THEN weedout,yr,mo,day,quiet=quiet alldone=SYSTIME(1) IF NOT KEYWORD_SET(quiet) THEN BEGIN tncf=stncf+wtncf+jtncf PRINT,finish-start,tncf $ ,FORMAT='(F6.1," s elapsed in expanding ",I0," files:")' IF tncf GT 0 THEN PRINT,(finish-start)/tncf $ ,FORMAT='(F5.2," s per file")' IF NOT KEYWORD_SET(norun) THEN PRINT,alldone-finish $ ,FORMAT='(F6.1," s elapsed in writing image lists and weeding out bad files")' PRINT,STRING(7B),FORMAT='(A)' ENDIF RETURN END