More advanced example
From CrewWiki
(Difference between revisions)
Line 1: | Line 1: | ||
<code> | <code> | ||
- | ";" define object | + | ";" define object <br> |
o=obj_new('cws_read',xrange=[1500,2800],yrange=[2800,3400],scale=0.3)<br> | o=obj_new('cws_read',xrange=[1500,2800],yrange=[2800,3400],scale=0.3)<br> | ||
- | ; define date and time | + | ; define date and time<br> |
o->set_date,2008,6,13,12,0<br> | o->set_date,2008,6,13,12,0<br> | ||
- | ; read coast vector | + | ; read coast vector<br> |
coast=o->coast_line(/vector)<br> | coast=o->coast_line(/vector)<br> | ||
- | ; set cloud property | + | ; set cloud property<br> |
o->set_product,'ctp'<br> | o->set_product,'ctp'<br> | ||
- | ;set CREW algorithm | + | ;set CREW algorithm<br> |
o->set_group,'AWG'<br> | o->set_group,'AWG'<br> | ||
- | ; read and display data | + | ; read and display data<br> |
ctp1=o->get_data()<br> | ctp1=o->get_data()<br> | ||
window,1<br> | window,1<br> | ||
view2d,ctp1,/cool,/colo,no_data_idx=where(ctp1 le 0),coast_vec=coast,title='EUM ctp', min=200<br> | view2d,ctp1,/cool,/colo,no_data_idx=where(ctp1 le 0),coast_vec=coast,title='EUM ctp', min=200<br> | ||
- | ; read and display cloud top pressure for another | + | ; read and display cloud top pressure for another algorithm<br> |
o->set_group,'CMS'<br> | o->set_group,'CMS'<br> | ||
ctp2=o->get_data()<br> | ctp2=o->get_data()<br> | ||
Line 22: | Line 22: | ||
view2d,ctp2,/cool,/colo,no_data_idx=where(ctp2 le 0),coast_vec=coast,title='CMS ctp',min=200<br> | view2d,ctp2,/cool,/colo,no_data_idx=where(ctp2 le 0),coast_vec=coast,title='CMS ctp',min=200<br> | ||
- | ; display the difference of the two datasets | + | ; display the difference of the two datasets<br> |
window,3<br> | window,3<br> | ||
view2d,ctp1-ctp2,/cool,/colo,no_data_idx=where((ctp1 le 0) or (ctp2 le 0) or (abs(ctp1-ctp2) gt 150)),coast_vec=coast,title='difference ctp AWG-CMS',min=-150,max=150<br> | view2d,ctp1-ctp2,/cool,/colo,no_data_idx=where((ctp1 le 0) or (ctp2 le 0) or (abs(ctp1-ctp2) gt 150)),coast_vec=coast,title='difference ctp AWG-CMS',min=-150,max=150<br> |
Revision as of 10:12, 14 February 2014
";" define object
o=obj_new('cws_read',xrange=[1500,2800],yrange=[2800,3400],scale=0.3)
- define date and time
o->set_date,2008,6,13,12,0
- read coast vector
coast=o->coast_line(/vector)
- set cloud property
o->set_product,'ctp'
- set CREW algorithm
o->set_group,'AWG'
- read and display data
ctp1=o->get_data()
window,1
view2d,ctp1,/cool,/colo,no_data_idx=where(ctp1 le 0),coast_vec=coast,title='EUM ctp', min=200
- read and display cloud top pressure for another algorithm
o->set_group,'CMS'
ctp2=o->get_data()
window,2
view2d,ctp2,/cool,/colo,no_data_idx=where(ctp2 le 0),coast_vec=coast,title='CMS ctp',min=200
- display the difference of the two datasets
window,3
view2d,ctp1-ctp2,/cool,/colo,no_data_idx=where((ctp1 le 0) or (ctp2 le 0) or (abs(ctp1-ctp2) gt 150)),coast_vec=coast,title='difference ctp AWG-CMS',min=-150,max=150
obj_destroy, o