;pro read_process_ground_data_new, site, year, newo3,local_time=local_time,$ ;nighttime_only=nighttime_only,nt_hours=nt_hours ;+ ; ;Laura Patrick ;driver for reading and processing BAO and WKT data ;- ;******make sure to modify these lines******* site_code='PCO' ;BAO or WKT string year='2014'; yyyy string local_time=0 current_year='2014' concatenate_raw=1 sam_format=1 months=[8,9] gmt_to_lst=0 lst_to_gmt=0 foy=0 ;if you want to do all put in a zero ;for specific months use real month numbers ; ie months=[1,12] -always use a range ; even if you are only doing one[3,3] ;********************************* ;you shouldn't need to modify anything below ;rawsurface calls the program that rewrites raw downloads ;into monthly raw files (just to get oranized) IF KEYWORD_SET(concatenate_raw) THEN BEGIN IF STRUPCASE(site_code) eq 'PCO' THEN $ rawsurface_AZP, year, current_year, shorto3 ELSE $ rawsurface, site_code,year,current_year,shorto3; ENDIF ground_site_lookup, site_code,info_str stnid=info_str.code loc=info_str.loc hagl=info_str.inlet_hgt datapath=info_str.raw_data_loc dummy= info_str.processed_data_loc yst2=strmid(year,2,2) folder= StrJoin(StrSplit(dummy,'year_str',/extract,/REGEX),yst2) time_adj=info_str.gmt_offset datafiles=file_search(datapath+'*'+year+'*.src') print, datafiles junkfile=folder+'badval_'+year+'_6m.dat' if keyword_set(local_time) then time_zone='lst' else time_zone='gmt' ;groundo3=shorto3 ;save, file='/owv/aircraft/IDLWorkspace/groundo3.sav',groundo3 if keyword_set(just_print) THEN GOTO, skiphere ;just_print, skips from here to skiphere calibration_surface, site_code, year, groundo3 print, 'EDIT file in '+folder +'----- i.e. wkt_calval_2010_6m.dat' print, 'SAVE AS Different file in same folder i.e. wkt_calval_2010_6m_edited.data stop surf_calibrations,site_code, year print, 'EDIT file in '+folder +'----- i.e. wktchd10 -contains calibration factors' print, 'Erase repeated lines then save' stop IF !Version.OS_family EQ 'unix' THEN dir='/owv/aircraft/IDLWorkspace/' IF !Version.OS_family EQ 'Windows' THEN dir='O:\aircraft\IDLWorkspace\' save, file=dir+'groundo3.sav',groundo3 skiphere: Restore, dir+'groundo3.sav' print, 'here!!! ' , year read_in_found_calibrations, groundo3,year ;surf_array_into_gmt_or_lst, groundo3,newo3,local_time=local_time surf_array_into_gmt_or_lst, groundo3,newo3,gmt_to_lst=gmt_to_lst,lst_to_gmt=lst_to_gmt,foy=foy groundo3=newo3 save,groundo3,newo3,file=dir+'groundo3.sav' ;restore, 'groundo3.sav' ;newo3=0 ;remove_2stdev_pts_surface,groundo3,newo3 ;restore, 'newo3.sav' ;newdata=newo3 if keyword_set(local_time) then folder=folder+'lst_' print, folder if keyword_set(months) then months=months-1 print, months surface_rewrite_one_min_ave,newo3,site_code,folder,months=months print, months surface_rewrite_hourly_mean, newo3,site_code,folder,months=months ;updated looks good surface_rewrite_one_hour_ave, newo3,site_code,folder,$ sam_format=sam_format,months=months ;updated looks good ;print in Sam's format surface_rewrite_hourly_mean_sf, newo3,site_code,folder stop end