pro matchup,lat_s,lon_s,csite,r0,r1,max_dist,amfg,so2,boz,ref,ai,lat,lon,sza,vza, dist radeg=57.2957795 ; rad to deg conversion print print, csite+ ' spiral location: lat_s=',lat_s,' lon_s=',lon_s print, ' OMI retrievals' print,' dist SO2 Ozone Ref AI lat lon sza vza AMF(SO2) SO2(corr) ' print,' km DU DU % ' dlat= (lat - lat_s)/radeg dlon= (lon - lon_s)/radeg ;-- Compute distance from the center of fov to the site ; dist= 2.*radeg*asin(sqrt( ; & sin(dlat/2.)**2 + ; & sin(dlon/2.)**2 * cos(lat_s/radeg) * cos(lat_s/radeg))) ; idist= NINT(dist*111.2) !Convert to km ;r0=0.63348D+00 & r1=-0.000348D+00 ; China Apr 5 AMF Lia, a=0.05, industrial aerosol Liazoning AOT500~1.1 SSA~0.9 ;r0=0.63348D+00 & r1=-0.000348D+00 ; Lia apr 5 SO2 profile, a=0.05, industrial aerosol AMF correction ;r0=0.61980D+00 & r1=-0.000326D+00 ; 800mb, a=0.05, industrial aerosol AMF correction ;r0=0.60827D+00 & r1=-0.000259D+00 ; 800mb, a=0.05, no aerosol AMF correction amf_corr=r0 + r1*boz(*)*amfg(*) dist=6370.*sqrt(dlat*dlat + dlon*dlon * cos(lat_s/radeg) * cos(lat_s/radeg) ) so2_min=-10.0 ; FILTERING SO2 VALUES ! near=where(so2 ge so2_min $ and dist le max_dist,count_near) & for i=0,count_near-1 do print,dist(near(i)),so2(near(i)),boz(near(i)),ref(near(i)),ai(near(i)),lat(near(i)),lon(near(i)),$ sza(near(i)),vza(near(i)),amf_corr(near(i)),so2(near(i))*0.36/amf_corr(near(i)),$ format='(f8.2,f7.2,f8.1,2f6.2,4f7.2,f7.3,f7.2)' ; dist SO2 Ozone Ref AI lat lon sza vza AMF(SO2) SO2(corr) ; km DU DU % ; 25.689 2.08 365.6 7.53 2.15 42.22 123.67 39.22 2.83 0.3 2.267 ml=moment(so2(near)) & aso2=ml(0) ml1=moment(so2(near)*0.36/amf_corr(near)) & aso2_cor=ml1(0) print print,count_near,' max distance=', max_dist,' =',aso2, '=',aso2_cor return end nbox=26768 & cday='Apr5 ' & openr,1,'apr5_oper' & x='' & readf,1,x & print,x ; Operational PBL SO2 over Lia on apr 5 ;nbox=27201 & cday='Apr7 ' & openr,1,'apr7_oper' & x='' & readf,1,x & print,x ; Operational PBL SO2 over Lia on apr 7 ;nbox=24863 & cday='Apr1 ' & openr,1,'apr1_oper' & x='' & readf,1,x & print,x ; Operational PBL SO2 over Lia on apr 1 ;nbox=25527 & cday='Apr10 ' & openr,1,'apr10_oper' & x='' & readf,1,x & print,x ; Operational PBL SO2 over Lia on apr 10 ;nbox=8465 & openr,1,'Japan_apr6_o03857' & x='' & readf,1,x & print,x ; Operational PBL SO2 over Japan on April 6 (to initialize trajectories ;nbox=8749 & openr,1,'china_apr5_o3843' & x='' & readf,1,x & print,x ; Operational PBL SO2 over China on April 5 a=dblarr(17,nbox) & readf,1,a & close,1 ; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; lat lon so2pbl(lf) so25k(lf) soip1 soip2 soip3 spp sza raa vza cldfrac bstoz ref331 ai UTC so2QF ; 0.00 145.28 -1.268e+30 -1.268e+30 -0.006 -0.090 0.084 60 36.37 -165.25 68.11 1.000 252.5 84.79 -1.03 04:45 1 ; 0.05 144.11 -1.268e+30 -1.268e+30 0.103 -0.114 -0.023 59 35.22 -164.95 64.97 1.000 253.0 83.89 -1.04 04:45 1 print,'Nbox=',nbox lat=reform(a(0,*)) & print,'lat=',min(lat),max(lat) lon=reform(a(1,*)) & print,'lon=',min(lon),max(lon) time=reform(a(16,*)) & mt=moment(time) & print,'GMT=',min(time), max(time), mt(0) so2=reform(a(2,*)) & so2_cor=so2 o3=reform(a(12,*)) & ref=reform(a(13,*)) & ai=reform(a(14,*)) so2_min=-10.0 ; FILTERING SO2 VALUES ! print,'Operational data filtering: so2 > ',so2_min good=where(so2 ge so2_min $ and lat ge 41 and lat le 43 $ and lon ge 122 and lon le 124, count_good) ; Only non-filled values print,'Good pixel number=',count_good ml=moment(so2(good)) & print,'good So2=',count_good,' so2:',min(so2(good)),max(so2(good)),' mean SO2=',ml(0) ,' StDev SO2=',sqrt(ml(1)) ml=moment( o3(good)) & print,'good O3=',count_good,' O3:',min(O3(good)),max(O3(good)),' mean O3=',ml(0) ,' StDev O3=',sqrt(ml(1)) ml=moment( ref(good)) & print,'good ref=',count_good,' ref:',min(ref(good)),max(ref(good)),' mean ref=',ml(0) ,' StDev ref=',sqrt(ml(1)) ml=moment( ai(good)) & print,'good ai=',count_good,' ai:',min(ai(good)),max(ai(good)),' mean ai=',ml(0) ,' StDev ai=',sqrt(ml(1)) spp=reform(a(7,*)) sza=reform(a(8,*)) vza=reform(a(10,*)) radeg=57.2957795 ; rad to deg conversion amfg=1./cos(sza/radeg) + 1./cos(vza/radeg) cldfrac=reform(a(11,*)) time=reform(a(15,*)) so2QF=reform(a(11,*)) ; WRITE corrected and non-fill values close,2 & openw,2,'apr5_corrected' printf,2,'lat lon so2pbl(lf) sample sza vza cldfrac bstoz ref331 ai GMT hour QF' ; regression curves: ~/OMISO2/AMF/DATA/ r0=0.63131D+00 & r1=-0.00037802D+00 ; China Apr 5 AMF Tia, a=0.05, industrial aerosol at Tia AOT500~1.44 SSA~0.9 ;r0=0.63306D+00 & r1=-0.00036132D+00 ; China Apr 5 AMF Lia, a=0.05, industrial aerosol Liazoning AOT500~1.1 SSA~0.9 ; r0=1.42300D+00 & r1=-0.000438D+00 ; 3km, Gaussian (s=1km), alb=0.12, no aerosol AMF correction ;r0=1.17607D+00 & r1=-0.000328D+00 ; 3km, Gaussian (s=1km), a=0.05, no aerosol AMF correction ;r0=0.60827D+00 & r1=-0.000259D+00 ; 800mb, a=0.05, no aerosol AMF correction amf_corr=r0 + r1*o3(*)*amfg(*) so2_cor(*)=so2(*)*0.36/amf_corr(*) ;print,'SO2 corrected, LER=0.12' print,'SO2 corrected, LER=0.05' ml=moment(so2_cor(good)) & print,'good So2=',count_good,' so2:',min(so2_cor(good)),max(so2_cor(good)),' mean SO2=',ml(0) ,' StDev SO2=',sqrt(ml(1)) for i=0L,count_good-1 do begin if (so2(good(i)) le -1000) then begin formatpbl = '(e10.3)' endif else begin formatpbl = '(f7.2)' endelse ; omso2_outso2_new.pro: data = $ string(lat(good(i)),format='(f7.2)')+' '+$ string(lon(good(i)),format='(f7.2)')+' '+$ ; string(so2(good(i)),format=formatpbl)+' '+$ string(so2_cor(good(i)),format=formatpbl)+' '+$ string(spp(good(i)),format='(i3)')+' '+$ string(sza(good(i)),format='(f7.2)')+' '+$ string(vza(good(i)),format='(f7.2)')+' '+$ string(cldfrac(good(i)),format='(f5.3)')+' '+$ string(o3(good(i)),format='(f5.1)')+' '+$ string(ref(good(i)),format='(f6.2)')+' '+$ string(ai(good(i)),format='(f6.2)')+' '+$ string(time(good(i)),format='(f6.2)')+' '+$ string(so2QF(good(i)),format='(i2)') printf,2,data endfor close,2 ; create IDL save file print,'Creating IDL save file for trajectories:' lat_good=lat(good) & lon_good=lon(good) & so2_cor_good=so2_cor(good) save,lat_good,lon_good,so2_cor_good ml=moment(so2_cor_good) & print,count_good,' so2_cor_good:',min(so2_cor_good),max(so2_cor_good),' mean SO2_cor_good=',ml(0) ,' StDev SO2_cor_good=',sqrt(ml(1)) ; Matchup read,'Input max distance [km]:',max_dist_input ;matchup,lat_s,lon_s,csite,max_dist,amfg,so2,boz,ref,ai,lat,lon,sza,vza, dist matchup,42.45,123.700,cday+' Xia ',r0,r1,max_dist_input,amfg,so2,o3,ref,ai,lat,lon,sza,vza,dist ; Xia matchup,41.64,123.488,cday+' Tia ',r0,r1,max_dist_input,amfg,so2,o3,ref,ai,lat,lon,sza,vza,dist ; Tia matchup,41.35,122.648,cday+' Lia ',r0,r1,max_dist_input,amfg,so2,o3,ref,ai,lat,lon,sza,vza,dist ; Lia stop end