Skip to content
Snippets Groups Projects
Commit 6a95ab7b authored by Andi Walther's avatar Andi Walther :speech_balloon:
Browse files

add one tool for cod

parent fb5bd686
No related branches found
No related tags found
No related merge requests found
; review aw 11 /11 2018
pro cws_stats::cod_all $
, start $
, nr $
......@@ -50,99 +51,89 @@ lat = o->get_data( pro='lat',/DATA)
cod_mod = cod_mod[ind]
loadct,39
outFile = !PROJECTS.cws_path+'/results/atrain/cloudsat/C'+string(cut,fo='(i2.2)')+'_cod_' $
+'all_' +string(overpass,format='(i5.5)')
file_mkdir,file_dirname(outFile)
grpList = ['CMS','EUM','OCA','MPF','FUB','DLR','MFR','AWG','UKM','GSF','LAR'] ; groups
colors=['red','yellow','blue','khaki','green','brown','orange','olive' $
,'purple','pink','gray']
if ~keyword_set(noPS) then startps,outname=outfile,xs=3,ys=1.2
grpList = self.create_group_list()
idx=where(cod_mod le 0,c)
if c gt 0 then cod_mod[idx] = !VALUES.F_NAN
w = WINDOW(WINDOW_TITLE="My Window", $
DIMENSIONS=[1200,500])
p = plot ( lat[ind],cod_mod, Yrange = [0.1,200],/xstyle,/current)
p.xtitle = 'Latitude'
p.yTitle = '[]'
p.yLog =1
p.ystyle =1
p.xstyle = 1
p.title='Optical Depth'
plot,lat[ind],cod_mod,/xstyle,xtitle='Latitude',charsize=0.8,/nodata $
, yTitle = '[]',yRange=[0.1,200],title='Optical Depth',/YLog,/YSTy
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,charsize=0.7
t1 = text(0.05,0.96,'SEVIRI scene: '+self.get_date(/string),/normal)
t2 = text(0.95,0.96,'CUT: '+string(cut,fo='(i2.2)') $
+' OVP: '+string(overpass,format='(i5.5)'),/normal,align = 1.)
erg = fltarr(n_elements(grpList),n_elements(cod_mod))
erg = fltarr(n_elements(grpList),n_elements(cod_mod))
n_valid = fltarr(n_elements(cod_mod))
n_valid = fltarr(n_elements(cod_mod))
for ii=0, n_elements(grpList) -1 do begin
for ii=0, n_elements(grpList) -1 do begin
group = grpList[ii]
;cph = round(o->_get_data(sensor='MSG',affi=group,product='CPH'))
cod = o->_get_data(sensor='MSG',affi=group,product='COD')
;ref = o->_get_data(sensor='MSG',affi=group,product='REF')
;lwp = o->_get_data(sensor='MSG',affi=group,product='LWP')
;lwp = lwp[ind]
;ref = ref[ind]
cod = cod[ind]
;cph = cph[ind]
idx_valid = where(cod gt 0,c_valid)
if c_valid gt 0 then n_valid[idx_valid] ++
group = grpList[ii]
cod = o->_get_data(sensor='MSG',affi=group,product='COD')
cod = cod[ind]
idx_valid = where(cod gt 0,c_valid)
if c_valid gt 0 then n_valid[idx_valid] ++
erg[ii,*] = cod
;oplot,lat[ind],cth_affi,psym=1,color=fsc_color(colors[ii]),symsize=0.5
endfor
erg[ii,*] = cod
endfor
; win,1
;plot,cth_cpr
meani = make_array(n_elements(cod_mod),value=!values.f_nan)
for uu=1,n_elements(cod_mod)-2 do begin
idx = where(erg[*,uu] gt 1,cc)
if cc eq 0 then continue
mini = (erg[idx,uu])[(sort(erg[idx,uu]))[ (n_elements(idx)-1)<1 ]]
maxi = (erg[idx,uu])[(sort(erg[idx,uu]))[(n_elements(idx)-2)>0]]
mini = min(erg[idx,uu])
maxi = max(erg[idx,uu])
meani = make_array(n_elements(cod_mod),value=!values.f_nan)
for uu=1,n_elements(cod_mod)-2 do begin
idx = where(erg[*,uu] gt 1,cc)
if cc eq 0 then continue
mini = (erg[idx,uu])[(sort(erg[idx,uu]))[ (n_elements(idx)-1)<1 ]]
maxi = (erg[idx,uu])[(sort(erg[idx,uu]))[(n_elements(idx)-2)>0]]
mini = min(erg[idx,uu])
maxi = max(erg[idx,uu])
meani[uu] = mean(erg[idx,uu])
sddevi = cc gt 1 ? stddev(erg[idx,uu]) : 0
meani[uu] = mean(erg[idx,uu])
sddevi = cc gt 1 ? stddev(erg[idx,uu]) : 0
plots,[lat[ind[uu-1]],lat[ind[uu]],lat[ind[uu]],lat[ind[uu-1]],lat[ind[uu-1]]] $
,[mini,mini,maxi,maxi,mini],color=t_c_i(240,240,240),thick=5.,noclip=0.
plots,[lat[ind[uu-1]],lat[ind[uu]],lat[ind[uu]],lat[ind[uu-1]],lat[ind[uu-1]]] $
,[meani[uu]-sddevi,meani[uu]-sddevi,meani[uu]+sddevi,meani[uu]+sddevi,meani[uu]-sddevi] $
,color=t_c_i(201,201,201),thick=5.,noclip=0.
lat_box = [lat[ind[uu-1]],lat[ind[uu]],lat[ind[uu]],lat[ind[uu-1]],lat[ind[uu-1]]]
val_box = [mini,mini,maxi,maxi,mini]
p01 = plot( lat_box,val_box,'orange',/overplot,/current)
; plots,[ $
; ,,color=t_c_i(240,240,240),thick=5.,noclip=0.
; plots,[lat[ind[uu-1]],lat[ind[uu]],lat[ind[uu]],lat[ind[uu-1]],lat[ind[uu-1]]] $
; ,[meani[uu]-sddevi,meani[uu]-sddevi,meani[uu]+sddevi,meani[uu]+sddevi,meani[uu]-sddevi] $
; ,color=t_c_i(201,201,201),thick=5.,noclip=0.
endfor
oplot,lat[ind],meani,color=fsc_color('black')
oplot,lat[ind],cod_mod,linestyle=0,color=fsc_color('red'),thick=2.5
;legend,['MODIS','SEVIRI mean']$
; ,color=[fsc_color('red'),fsc_color('black')] $
; ,linestyle=0,box=0,pos=[0.7,0.8],/normal,charsize=0.7
xyouts,0.8,0.80,'MODIS',/normal,charsize=0.7,col=fsc_color('red')
xyouts,0.8,0.76,'SEVIRI',/normal,charsize=0.7,col=fsc_color('black')
if ~keyword_set(noPS) then begin
endps
spawn,'convert -density 200 '+outfile $
+'.eps '+outfile+'.jpg'
spawn, 'rm -f '+outfile+'.eps'
endfor
p03 = plot ( lat[ind],meani , 'blue',/overplot)
p04 = plot ( lat[ind],cod_mod , 'red',/overplot)
t2 = text ( 0.8,0.80,'MODIS', color ='red',/normal)
t3 = text ( 0.8,0.76,'SEVIRI Average', color ='blue',/normal)
outFile = !PROJECTS.cws_path+'/results/atrain/cloudsat/C'+string(cut,fo='(i2.2)')+'_cod_' $
+'all_' +string(overpass,format='(i5.5)')
file_mkdir,file_dirname(outFile)
w.save, outFile+'.png', BORDER=10, RESOLUTION=300, /TRANSPARENT
print,'print in outfile: ',outfile
endif
startps,outname=outfile+'_number',xs=3,ys=1.2
plot,lat[ind],n_valid,/xstyle,xtitle='Latitude',charsize=0.8 $
, yTitle = '#',title='Number of COD algorithms'
endps
spawn,'convert -density 200 '+outfile+'_number' $
+'.eps '+outfile+'_number'+'.jpg'
spawn, 'rm -f '+outfile+'_number'+'.eps'
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment