diff --git a/cws2__add_c.pro b/cws2__add_c.pro index 8135c68668c35b8f176a39a27a1f7cfab144ae15..5c3039c842b9794a770e5f489e7807a5b8bab1a6 100644 --- a/cws2__add_c.pro +++ b/cws2__add_c.pro @@ -16,8 +16,7 @@ pro cws2::add_c, overpass = overpass, cth_reference = cth_reference, affi = affi orbit_2_time, overpass, year, month, day, hour, minute print, '... add data to AVAC-S level C file for '+affi+'/'+sensor+'/'+product+' ', year, month, day endif - ;default,day,13 - ;default,month,6 + ; read time from level B data bTime = self->get_data(product='YDT',/data) @@ -241,3 +240,22 @@ pro cws2::add_c, overpass = overpass, cth_reference = cth_reference, affi = affi print, '' end + + +pro _do_it + +o=cws2() + +prd_list = [ $ + 'cmb', 'ctp', 'cth', 'ctt', 'cod', 'ref', 'cph', 'lwp'] + +grp_list = ['CMS','EUM','OCA','MPF','FUB','DLR','MFR','RMB','AWG','UKM','GSF','LAR','COX','OCA2','KNM','TPS','SUI','CLV','LARN'] + + +foreach grp, grp_list do begin + foreach prd, prd_list do begin + o.add_c,affi=grp,ov=11317, product=prd + endforeach +endforeach + +end diff --git a/cws2__define.pro b/cws2__define.pro index 6aadccff3c89fd33cc81bf904aaa1fc4aadb9dd1..be5321e646121a60cb05a92ad90325062dc25222 100644 --- a/cws2__define.pro +++ b/cws2__define.pro @@ -28,7 +28,8 @@ function cws2::_get_data, affi = affi, sensor = sensor, $ product = product, general = general COMMON FEEDBACK, quiet, verbose, debug - if not quiet then print, '... start cws2::_get_data (cws2__define.pro)' + + ; set defaults if n_elements(affi) eq 0 then affi = self.affi @@ -189,43 +190,6 @@ end -;+ -; -; -; -;- -pro cws2::create_c - - self->set_sensor,'_GENERAL' - ; read number of x pixel in Seviri coordinates - xlin = self->get_data(product='XLIN',/data) - ; read number of y pixel in Seviri coordinates - xele = self->get_data(product='XELE',/data) - ; read time - time = self->get_data(product='YDT',/data) - ; get C-file - cFile = self->get_cfile() - - self->h5add,cfile,xele $ - ,Par_Name = 'Column on SEVIRI disk (x) ' $ - ,sensor='_GENERAL' $ - ,prd_code='XELE' $ - ,Par_Info='Column index of grid cell on SEVIRI disk' $ - ,/no_append - - self->h5add,cfile,xlin $ - ,Par_Name = 'Row on SEVIRI disk (y) ' $ - ,sensor='_GENERAL' $ - ,prd_code = 'XLIN' $ - ,par_Info='Row index of grid cell on SEVIRI disk' - - self->h5add,cfile,time $ - ,sensor='_GENERAL' $ - ,prd_code='YDT' $ - ,par_Name = 'Year, day and time' $ - ,par_Info='YDT given in seconds since midnight UT at the beginning of May 24 1968' - -end ;+ ; procedure diff --git a/cws_stats__caliop_profile.pro b/cws_stats__caliop_profile.pro index 355782d31e53ec1c61d233182ec3857d35ada441..51bcdb173acd5357f536d324ef27875c3a381837 100644 --- a/cws_stats__caliop_profile.pro +++ b/cws_stats__caliop_profile.pro @@ -1,36 +1,38 @@ - +; +; +; pro cws_stats::caliop_profile, start , nr $ ,overpass=overpass $ ,cut = cut $ ,noPS = noPS $ , group = group - COMMON FEEDBACK, quiet, verbose, debug - if not quiet then print, '... start caliop_profile' + + if not self.quiet then print, '... start caliop_profile' default, noPs, 0 ;noPs=0 default, group, 'AWG' - if not quiet then print, '... group = ', group + if not self.quiet then print, '... group = ', group default, cut, 5 - if not quiet then print, '... cut = ', cut + if not self.quiet then print, '... cut = ', cut ; convert date to orbit number orbt_nr = time_2_orbit( $ julday(self.month,self.day,self.year,self.hour,self.minute)) default, overpass, orbt_nr - if not quiet then print, '... ATRAIN orbit number = ', orbt_nr + if not self.quiet then print, '... ATRAIN orbit number = ', orbt_nr ; create cws2 object oCwsAtrain = obj_new('cws2', overpass=overpass) - if verbose then print, '... read lon, lat, ydt' + if self.verbose then print, '... read lon, lat, ydt' lon = oCwsAtrain->get_data(prod='LON',/data) lat = oCwsAtrain->get_data(prod='LAT',/data) ydt = oCwsAtrain->get_data(pr='YDT',/data) - if verbose then print, '... convert (lon,lat) to pixel numbers' + if self.verbose then print, '... convert (lon,lat) to pixel numbers' pxl = geo_2_msg(lon,lat) lidar = oCwsAtrain->get_data(sen='CALIOP', pro='TAB_0532', /DATA) @@ -59,7 +61,7 @@ pro cws_stats::caliop_profile, start , nr $ rfl = o->get_data(pro='RFL',sens='CPR',/data) lidar = o->get_data(sen='CALIOP' ,pro='TAB_0532',/DATA) height = o->get_data(sen='CALIOP' ,pro='HGT',/DATA) -; sfcbin = o->get_data(sen='CALIOP' ,pro='SHB',/DATA) + sfcbin = o->get_data(sen='CALIOP' ,pro='SHB',/DATA) time = o->get_data(pro='YDT',/DATA) cth_cal = o->get_data(sen='CALIOP', prod='CTH',/data) @@ -142,68 +144,107 @@ pro cws_stats::caliop_profile, start , nr $ thisP = !p !p.charsize=0.8 - if ~keyword_set(noPS) then startps,outname=outfile,xs=2,ys=2 + ;if ~keyword_set(noPS) then startps,outname=outfile,xs=2,ys=2 + + w = window(dimension=[700,1200]) - loadct,11 - for p=2,160 do tvlct,fsc_color('gray',/triple),p - contour,r,l,h,/FILL,/color,NLEV=10,_EXTRA=_EXTRA,YRANGE=[0,20],$ - YSTY=5,XStyle=5,XRANGE=[MIN(l),MAX(l)] $ - ,title=group,charsize=1., pos =[0.1,0.68,0.9,0.95],/norm - ;stop - xyouts,0.05,0.96,'SEVIRI scene: '+self->get_date(/string),/normal,charsize=0.7 - xyouts, 0.95,0.96,' CUT: '+string(cut,fo='(i2.2)') $ - +' OVP: '+string(overpass,format='(i5.5)'),align=1.,/normal - loadct,39 - - oplot,cth_affi/1000.,color=fsc_color('white'),psym=1,symsize=0.44 - oplot,height[sfcbin,indgen(nr_idx)]/1000. - - axis,yax=0,yrange=[0,20] ,yticks=yticks,YSTY=1,ytitle='km' - axis,yax=1,yticks=yticks,ytickform='(A1)',yminor=1 ; draw right y axis w/o labels. - axis,xax=0,xticks=1,xtickform='(A1)',xminor=1 ; draw lower x axis w/o labels. - axis,xax=1,xticks=1,xtickform='(A1)',xminor=1 ; draw lower x axis w/o labels. - - - cloud_idx = where(cmb gt 1.5,c,compl=compl) - if c gt 0 then plots,cloud_idx,make_array(c,value=-0.5),color=fsc_color('blue'),psym=3 - no_cloud_idx = where(cmb eq 1,cNoCloud) - if cNoCloud gt 0 then plots,compl,make_array(cNoCloud,value=-0.8),color=fsc_color('gold'),psym=1,symsize=0.12 + values = [-0.04,0.004,0.015,0.02,0.03,0.04,0.05,0.1,0.3] + levels = n_elements(values) + ctable = COLORTABLE([[085,026,139],[135,206,255],[0,255,0]], NCOLORS = levels, /TRANSPOSE) + ctable[*,0] = fsc_color('gray',/triple) + + + c= contour(r,l,reverse(h)/1000.,/current,pos =[0.1,0.68,0.9,0.95], yrange=[0,20] $ + , c_value = values $ + ,c_color=ctable,/fill,/xstyle ) + + + c['axis0'].SHOWTEXT = 0 + c.title = group + + t1 = text ( 0.05,0.96 , 'SEVIRI scene: '+self->get_date(/string)) + t2 = text ( 0.95,0.96,' CUT: '+string(cut,fo='(i2.2)') $ + +' OVP: '+string(overpass,format='(i5.5)'),align=1. ) + + + cloud_idx = where(cmb gt 1.5,n_idx,compl=compl) + + + ; if n_idx gt 0 then p00=plot(cloud_idx,make_array(n_idx,value=1.5),'b+',/overplot) + + + p01 = plot(indgen(n_elements(l)),make_array(n_elements(l),value=4),'y+',/current $ + ,pos = [0.1,0.64,0.9,0.68],/xstyle,/nodata , yrange=[0,5]) + for ii = 0, 3 do (p01.axes)[ii].HIDE = 1 + + no_cloud_idx = where(cmb eq 1,cNoCloud) + if cNoCloud gt 0 then begin + p010=plot(compl,make_array(cNoCloud,value=1),'y+',/overplot ) + endif + phase_idx_wat = where(cph eq 1,cWat ) - if cWat gt 1 then plots,phase_idx_wat,make_array(cWat,value=-1.3),color=fsc_color('green'),psym=3 + if cWat gt 1 then begin + p011=plot(phase_idx_wat,make_array(cWat,value=2),'g+',/overplot ) + endif + phase_idx_ice = where(cph eq 2,cIce ) - if cIce gt 1 then plots,phase_idx_ice,make_array(cIce,value=-1.8),color=fsc_color('red'),psym=1,symsize=0.12 - + if cIce gt 1 then begin + p012=plot(phase_idx_ice,make_array(cIce,value=3),'r+',/overplot ) + endif + phase_idx_mix = where(cph eq 3,cMix ) - if cMix gt 1 then plots,phase_idx_mix,make_array(cMix,value=-2.3),color=fsc_color('purple'),psym=1,symsize=0.12 - + if cMix gt 1 then begin + p013=plot(phase_idx_mix,make_array(cMix,value=4),'purple+',/overplot ) + endif + + thisP = !P !p.charsize /= 2.4 - xyouts,nr_idx+10, -0., 'Cl',color=fsc_color('blue') - xyouts,nr_idx+10,-0.8, 'NCl',color=fsc_color('gold') - xyouts,nr_idx+10,-1.6, 'Wat',color=fsc_color('green') - xyouts,nr_idx+10,-2.4, 'Ice',color=fsc_color('red') - xyouts,nr_idx+10,-3.2, 'Mix',color=fsc_color('purple') + + t30 = text ( nr_idx+10, -0. , 'Cl' , color='blue',/data) + t31 = text ( nr_idx+10, -0.8 , 'Cl' , color='gold',/data) + t32 = text ( nr_idx+10, -1.6 , 'Cl' , color='green',/data) + t33 = text ( nr_idx+10, -2.4 , 'Cl' , color='red',/data) + t34 = text ( nr_idx+10, -3.2 , 'Cl' , color='purple',/data) + + !p = thisP cod_wat = cod * (cph eq 1) - 999.*(cph ne 1) - - plot,indgen(n_elements(ind)),cod,pos=[0.1,0.46,0.9,0.62],/noerase $ - , yRange=[0,50],psym=1 $ - ;, xTickformat='NOLABEL'$ ;!!!!!!!!!!!!!!!!! - , yTitle = 'cod []' $ - , symsize=0.3,/nodata,/xstyle, xrange=[0,n_elements(ind)-1] - xyouts,0.5,0.627,'Cloud optical depth',charsize=.6,/normal,align=0.5 - oplot,indgen(n_elements(ind)),cod,psym=1 $ - ,symsize=0.6,col=fsc_color('red') + + + p1 = plot( indgen(n_elements(ind)),cod,/current,symbol ='.',/nodata, yrange=[0,50],/xstyle) + p1.position = [0.1,0.46,0.9,0.62] + + + p1['axis1'].Title ='cod []' + p1['axis1'].Axis_Range =[0,50] + p1['axis0'].SHOWTEXT = 0 + + p10 = plot ( indgen(n_elements(ind)),cod ,'r+' ,/overplot,sym_size=0.5) + p11 = plot ( indgen(n_elements(ind)),cod_wat,'g+',/overplot,sym_size=0.5) + p12 = plot ( indgen(n_elements(ind)),cod_modis, 'b+',/overplot,sym_size=0.5) + + t12 =text ( 0.5,0.627,'Cloud optical depth' , align = 0.5 ) + - oplot,indgen(n_elements(ind)),cod_wat,psym=1 $ - ,symsize=0.6,col=fsc_color('green') - - oplot,indgen(n_elements(ind)),cod_modis,psym=1 $ - ,symsize=0.2,col=fsc_color('blue') - + ; plot,indgen(n_elements(ind)),cod,pos=[0.1,0.46,0.9,0.62],/noerase $ +; , yRange=[0,50],psym=1 $ +; ;, xTickformat='NOLABEL'$ ;!!!!!!!!!!!!!!!!! +; , yTitle = 'cod []' $ +; , symsize=0.3,/nodata,/xstyle, xrange=[0,n_elements(ind)-1] +; xyouts,0.5,0.627,'Cloud optical depth',charsize=.6,/normal,align=0.5 +; oplot,indgen(n_elements(ind)),cod,psym=1 $ +; ,symsize=0.6,col=fsc_color('red') +; +; oplot,indgen(n_elements(ind)),cod_wat,psym=1 $ +; ,symsize=0.6,col=fsc_color('green') +; +; oplot,indgen(n_elements(ind)),cod_modis,psym=1 $ +; ,symsize=0.2,col=fsc_color('blue') +; ; !!!!!!!!!!!!!!!!! ; legend,['Water', ' Ice', ' MODIS'] $ ; , psym = [1,1,1],color=[fsc_color('green')$ @@ -214,72 +255,96 @@ pro cws_stats::caliop_profile, start , nr $ if size(lwp_amsr,/tname) eq 'STRING' then lwp_amsr=make_array(size(lwp_amsr,/dim),val=0) - wat = where(cph eq 1,c) - - plot,lat[ind],(lwp_amsr>0)*1000. $ - , pos=[0.1,0.06,0.9,0.22],/noerase $ - , yRange=[00,300] ,symsize=0.3 $ - , yTitle = 'lwp [g/m!U2!X]',/xstyle,xtitle='Latitude',/nodata - - xyouts,0.5,0.227,'Liquid water path',charsize=.6,/normal,align=0.5 - - axis,xax=1,xrange=[0,n_elements(ind)-1], /xstyle $ - ; , xTickformat='NOLABEL' $ ; !!!!!!!!!!!!!!!!! - , /save - - if c gt 0 then begin - oplot,(indgen(n_elements(ind)))[wat],(lwp[wat]>0) $ - , color=fsc_color('green') $ - , symsize=0.5,psym=1 - - oplot,(indgen(n_elements(ind)))[wat],(lwp_amsr[wat]>0)*1000. $ - , color=fsc_color('blue'),psym=1 , symsize=0.5 + wat = where(cph eq 1,n_wat) + + + + p2 = plot( lat[ind],(lwp_amsr>0)*1000. $ + , pos=[0.1,0.06,0.9,0.22] , /current,/xstyle,/nodata $ + , yrange =[0,300]) + p2['axis0'].TITLE = 'Latitude' + p2['axis1'].TITLE = 'lwp [g/m!U2!N]' + + + t20= text ( 0.5,0.227,'Liquid water path',align=0.5) + + + ; ax0 = Axis('x',axis_range= [0,n_elements(ind)-1],style = 0) + + if n_wat gt 0 then begin + p20 = plot ( (indgen(n_elements(ind)))[wat],(lwp[wat]>0) $ + , 'g+' $ + , sym_size=0.5,/current, pos=[0.1,0.06,0.9,0.22] $ + , axis_style = 0 ) + + p21 = plot((indgen(n_elements(ind)))[wat],(lwp_amsr[wat]>0)*1000. $ + , 'b+', sym_size=0.5, /current , pos=[0.1,0.06,0.9,0.22] $ + , axis_style = 0 ) + endif - - ; !!!!!!!!!!!!!!!!! - ;legend,[group + ' !U+!X', 'AMSR-E' ], linestyle = [0,0], charsize = 0.5 $ - ; , box = 0, spacing = 0.3, color=[fsc_color('green')$ - ; , fsc_color('blue')] ,/clear, pos=[0.1,0.252],/norm - - if add_legend_lwp ne '' then xyouts,0.1,0.01,'+ calculated from COD and REF ',/normal,charsize=0.3 - if add_legend_lwp eq '' then xyouts,0.1,0.01,'+ LWP provided by group ',/normal,charsize=0.3 + + if add_legend_lwp ne '' then t21 = text ( 0.1,0.01,'+ calculated from COD and REF ',font_size=0.3) + if add_legend_lwp eq '' then t22 = text ( 0.1,0.01,'+ LWP provided by group ',font_size=0.3) + + + ref_idx = where(ref le 0,cRef) if cRef gt 0 then ref[ref_idx] = -999. ref_wat = ref * (cph eq 1) - 999.*(cph ne 1) ref_ice = ref * (cph ne 1) - 999.*(cph eq 1) - plot,indgen(n_elements(ind)),ref $ - , pos=[0.1,0.26,0.9,0.42],/noerase $ - , yRange=[00,50],psym=1 ,symsize=0.3 $ - , yTitle = 'ref ['+textoidl('\mu')+'m]',/nodata $ - ;, xTickformat='NOLABEL' $ ; !!!!!!!!!!!!!!!!! - , /xstyle, xrange=[0,n_elements(ind)-1] - - - xyouts,0.5,0.427,'Cloud effective radius',charsize=.6,/normal,align=0.5 - - ; !!!!!!!!!!!!!!!!! - ;legend,['Water', ' Ice',' MODIS'] $ - ; , psym = [1,1,1],color=[fsc_color('green')$ - ; ,fsc_color('red'),fsc_color('blue')] $ - ; , charsize = 0.5 $ - ; , box = 0 $ - ; , spacing = 0.5 ,/Fill , /clear - - ref_modis = float(ref_modis) - - oplot,indgen(n_elements(ind)),ref_modis,psym=1 $ - ,symsize=0.2,col=fsc_color('blue') - oplot,indgen(n_elements(ind)),ref_ice,psym=1 $ - ,symsize=0.6,col=fsc_color('red') - oplot,indgen(n_elements(ind)),ref_wat,psym=1 $ - ,symsize=0.6,col=fsc_color('green') + + + p3 = plot(indgen(n_elements(ind)),ref $ + , pos=[0.1,0.26,0.9,0.42] $ + , /current,/xstyle, yrange=[0,50],/nodata $ + , xrange = [0,n_elements(ind)-1] ) - if ~keyword_set(noPS) then begin - spawn,'convert -density 200 '+outfile+'.eps '+outfile+'.jpg' - spawn, 'rm -f '+outfile+'.eps' - endps - endif + p3['axis1'].TITLE = "ref [$\mu$m]" + p3['axis0'].SHOWTEXT = 0 + t30 = text ( 0.5,0.427,'Cloud effective radius', align = 0.5 ) + + ref_modis = float(ref_modis) + + p30 = plot ( indgen(n_elements(ind)),ref_modis,'b+' $ + ,sym_size=0.5,/overplot ) + p31 = plot ( indgen(n_elements(ind)),ref_ice,'r+' $ + ,sym_size=0.5,/overplot ) + p32 = plot ( indgen(n_elements(ind)),ref_wat, 'g+' $ + ,sym_size=0.5,/overplot ) + + + ; +; plot,indgen(n_elements(ind)),ref $ +; , pos=[0.1,0.26,0.9,0.42],/noerase $ +; , yRange=[00,50],psym=1 ,symsize=0.3 $ +; , yTitle = 'ref ['+textoidl('\mu')+'m]',/nodata $ +; ;, xTickformat='NOLABEL' $ ; !!!!!!!!!!!!!!!!! +; , /xstyle, xrange=[0,n_elements(ind)-1] +; +; +; xyouts,0.5,0.427,'Cloud effective radius',charsize=.6,/normal,align=0.5 +; +; ; !!!!!!!!!!!!!!!!! +; ;legend,['Water', ' Ice',' MODIS'] $ +; ; , psym = [1,1,1],color=[fsc_color('green')$ +; ; ,fsc_color('red'),fsc_color('blue')] $ +; ; , charsize = 0.5 $ +; ; , box = 0 $ +; ; , spacing = 0.5 ,/Fill , /clear +; +; ref_modis = float(ref_modis) +; +; oplot,indgen(n_elements(ind)),ref_modis,psym=1 $ +; ,symsize=0.2,col=fsc_color('blue') +; oplot,indgen(n_elements(ind)),ref_ice,psym=1 $ +; ,symsize=0.6,col=fsc_color('red') +; oplot,indgen(n_elements(ind)),ref_wat,psym=1 $ +; ,symsize=0.6,col=fsc_color('green') +; + + w.save,outFile+'.png' + print,outFile+'.png' end diff --git a/cws_stats_do_it.pro b/cws_stats_do_it.pro index 1534920d4b0dfd31b34d6edeb8052ac65234989b..f5b4c3d2f1816f6f2071e19d0ff0a72b56438d8e 100644 --- a/cws_stats_do_it.pro +++ b/cws_stats_do_it.pro @@ -12,16 +12,16 @@ pro cws_stats_do_it $ error_n=0 -; if n_elements(hour) eq 0 and n_elements(cut) eq 1 then begin -; case cut of -; 2: hour = 1230 -; 3: hour = 1345 -; 4: hour = 1345 -; 5: hour = 1345 -; 6: hour = 1400 -; else: hour=1200 -; endcase -; endif + if n_elements(hour) eq 0 and n_elements(cut) eq 1 then begin + case cut of + 2: hour = 1230 + 3: hour = 1345 + 4: hour = 1345 + 5: hour = 1345 + 6: hour = 1400 + else: hour=1200 + endcase + endif default, cut, 0 default, product, 'cod' @@ -79,7 +79,7 @@ pro cws_stats_do_it $ group =['CMS','EUM','OCA','MPF','FUB','DLR','MFR','AWG','UKM','GSF','LAR'] for tt=0,n_elements(group) -1 do $ o->caliop_profile, group=group[tt], cut=cut, _extra=_extra - endif else o->caliop_profile, cut=cut, _extra=_extra + endif else o->caliop_profile, cut=cut, _extra=_extra,group=group end 13: o->cth_all, cut=cut 14: o->lwp_all, cut=cut