; ============================================================================== ; This code is a simple driver for the new Level 2 code. It reads a Level 1B ; file and calls the level_2_retrieval code to do the CIPS retrieval. ; ============================================================================== @level_1b_compact.pro @arrange_stack.pro @compact_layers.pro restore,'/aim2/user_data/lumpe/V4.20/general_codes/read_cips_file.sav' start_time=systime() ; Define orbit (or orbits) to run season='north_2007' season='south_2008' season='north_2009' season='north_2007' orb=[932,1350,1118] orb=[11757,11784,11794,11801,11830,11843,12318,12330,12322] orb=[1350] norb=n_elements(orb) nskip=1 noplot='y' noplot='n' if(noplot eq 'y') then print,'NO PNG FILES WILL BE MADE !!!!!!' datpath='/aim/data/cips/v4.20/'+season+'/level_1b/ver_04.20/rev_03/' nl=strlen(datpath) str=file_search(datpath,'*_1b_*') nrev=n_elements(str) files=strarr(nrev) for i=0,nrev-1 do files[i]=strmid(str(i),nl,strlen(str(i))-nl) n0=strpos(files(0),'orbit') rev=fix(strmid(files,n0+6,5)) for iorb=0,norb-1,nskip do begin rev0=orb[iorb] x=where(rev eq rev0,nx) if(nx ne 0) then begin file=files(x[0]) endif else begin print,'File not found!!!' goto,keepgoing endelse ; Read in the Level 1B data file l1b=read_cips_file(datpath+file,/by_image) ; Do the retrieval l2_data=level_2_retrieval(l1b) ; Save Level 2 data to a file savefile=shortstring(rev0)+'_l2.sav' save,file=savefile,l2_data ; Generate orbit strip image if(noplot eq 'y') then goto,skipplt png_file=shortstring(rev0)+'.png' cipsct,coastcolor=coastcolor,grid=grid draw_petal_str,l2_data,filename=png_file,min_lat=30,top=100.,coastcolor=coastcolor,linecolor=grid image_new=read_png(png_file) skipplt: stop_time=systime() print,start_time print,stop_time keepgoing: endfor end