; wcrncproc script for interactive idl processing of WCR data ;------------------------------------------------------------------------------ ; Define data directory and the AC data file ;------------------------------------------------------------------------------ ; If process the current date compile the flight directory in d (mmmdd) d=strlowcase(delchr(strmid(systime(),4,6),' ')) if strlen(d) eq 4 then d=strmid(d,0,3)+'0'+strmid(d,3,1) ; Define d if you process a day different than the current d = '/apr21a/' ;/W acfile = '/sova4/cifex04/kingair/20040421_1.c25.nc' ; acfile = '' ; '' - do not do Doppler correction acname = 'ka' ;------------------------------------------------------------------------------ ; Antenna(s) configuration; beams elements must match wcr files and AC file ;------------------------------------------------------------------------------ ; Single beams: 1 - side/up, 2 - down, 3 - side-fore, 4 - down-fore ; Two beams: 12, 13, 24 beams = 12 ;[12,12,12,12,12,12,12] ;------------------------------------------------------------------------------ ; Experiment acronim; WCR data disk; WCR nc files disk ;------------------------------------------------------------------------------ expname='cifex04' ;/E hdisk1='/sova4/' ;/E hdisk2='/sova2/' ;/E ;------------------------------------------------------------------------------ ; Raw data and processed data directories; cdlfile ;------------------------------------------------------------------------------ datdir = hdisk1+expname+d ; ncdatdir = hdisk2+expname+'_nc'+d ncdatdir = hdisk1+expname+'_nc'+d cdlfile = hdisk1+expname+'_nc/'+strupcase(expname)+'.cdl' ;------------------------------------------------------------------------------ ; Extract wcr raw data file names ;------------------------------------------------------------------------------ wcrf=dialog_pickfile(/read, filter='?????-??-*',path=datdir,/multi) ;------------------------------------------------------------------------------ ; Activate journaling ;------------------------------------------------------------------------------ journal_file=ncdatdir+'wcrncproc.log' journal,journal_file ;------------------------------------------------------------------------------ ; Processing parameters ;------------------------------------------------------------------------------ acspeed = 90.*(acname eq 'ka')+115.*(acname eq 'c130' or acname eq 'cv580') average = 2 ; gpsc = 0 ; for N2UW: 1; for all others 0 misval =-32767. ; rmcor = 0 ; for CV580 force to 0; N2UW: could be 0; C130 - 1 savecdl = 0 ; 2 saves the modified cdl file; 0 - no save silent = 0 utccorr =-13.d0 ; for N2UW: -13.d0 all other 0.d0 timesync = 0.d0 nswin = [99,99,0] ; profrange ; define if not the whole file (uncomment call to wcrcreatenc) ; profrange= [[0,52999], [53000,122362]] ; W2004-04-05-16-11-15 ; profrange= [[0,52999], [53000,99999], [100000,175460]] ; W2004-04-05-17-38-30 ; profrange= [[0,104999],[105000,126869]] ; W2004-04-07-13-56-43 ; profrange= [[0,75999], [76000,120337]] ; W2004-04-07-13-56-43 ; profrange= [[0,66300], [60000,119400],[118000,220000],[218000,341219]] ; W2004-04-13-17-48-10 ; profrange= [[0,68999], [69000,179972]] ; W2004-04-15-20-48-10 ; profrange= [[0,139999],[140000,218999],[219000,374647]] ; W2004-04-18-19-46-38 ; profrange= [[0,114999],[110000,140566]] ; W2004-04-20-13-07-55 ; profrange= [[0,3612],[3615,96369]] ; W2004-04-20-15-53-37 wcrcreatenc,wcrf,cdlfile,beams, acfile=acfile, $ ; wcrcreatenc,wcrf,cdlfile,beams,profrange, acfile=acfile, $ acnames =acnames, acspeed=acspeed, average =average, $ gpsc =gpsc, misval =misval, ncdir =ncdatdir, $ ncfile =ncfile, nswin =nswin, rmcor =rmcor, $ savecdl =savecdl, silent =silent, timesync=timesync, $ utccorr =utccorr ;------------------------------------------------------------------------------ ; Close the journal file if active ;------------------------------------------------------------------------------ junk=(fstat(!journal)).name if junk eq journal_file then journal print,'End WCRNCPROC' ;------------------------------------------------------------------------------ ; Exit IDL ;------------------------------------------------------------------------------ ; exit ;comment this if you are running it directly from idl and want to ;keep the session open in order to check what it has done