<div dir="ltr"><div><div><div>Please *look* at your file dump. In particular, look at the variable types (integer, short) and the scale_factor and add_offset attributes.<br><br></div>See attached.<br>===========<br></div>There are numerous satellite swath examples:<br><br><a href="https://www.ncl.ucar.edu/Applications/HDF.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/HDF.shtml</a><br><br></div>Good luck<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 11, 2017 at 1:30 AM, 宫明晓 <span dir="ltr"><<a href="mailto:gongmingxiao1988@163.com" target="_blank">gongmingxiao1988@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Dear NCL team,<br><br> I have read a satellite grid data, but I want to read the data on the fixed longitude and latitude, so I need to change the data from data( NUMROWS, NUMCELLS) to data(lat,lon), how can I do it? <br>Sorry my English is very poor.<br>Thank you very much!<br><br><br>;;----------------------------<wbr>------------------------------<wbr>---<br>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl"<br>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl"<br>;;----------------------------<wbr>------------------------------<wbr>--------------<br><br>f=addfile("<a href="http://ascat_20130416_134200_metopa_33683_eps_o_coa_2101_ovw.l2.nc" target="_blank">ascat_20130416_<wbr>134200_metopa_33683_eps_o_coa_<wbr>2101_ovw.l2.nc</a>","r")<br>u_speed=f->wind_speed<br>vs = new(dimsizes(f->wind_speed),<wbr>float,-99999)<br>vs =(f->wind_speed)*0.01<br><br>lat2d = f->lat<br>lon2d = f->lon<br>lat2d@units <span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>= "degrees_north"<br>lon2d@units <span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>= "degrees_east"<br><br>vs@lat2d = lat2d<br>vs@lon2d = lon2d<br>vs@units = "ms-1"<br>vs@coordinmates = "lat2d lon2d"<br><br>print(vs({11},{11})) ;;;<b>how can I print the data like this type??????</b><br><br><br><br><br><b>;;PrintVarSummary(f)</b><div><br>Variable: f<br>Type: file<br>filename:<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>ascat_20130416_134200_metopa_<wbr>33683_eps_o_coa_2101_ovw.l2<br>path:<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span><a href="http://ascat_20130416_134200_metopa_33683_eps_o_coa_2101_ovw.l2.nc" target="_blank">ascat_20130416_134200_metopa_<wbr>33683_eps_o_coa_2101_ovw.l2.nc</a><br> file global attributes:<br> title : MetOp-A ASCAT Level 2 Coastal Ocean Surface Wind Vector Product<br> title_short_name : ASCAT-L2-Coastal<br> Conventions : CF-1.4<br> institution : EUMETSAT/OSI SAF/KNMI<br> source : MetOp-A ASCAT<br> software_identification_<wbr>level_1 : 801<br> instrument_calibration_<wbr>version : 0<br> software_identification_<wbr>wind : 2101<br> pixel_size_on_horizontal : 12.5 km<br> service_type : eps<br> processing_type : O<br> contents : ovw<br> granule_name : <a href="http://ascat_20130416_134200_metopa_33683_eps_o_coa_2101_ovw.l2.nc" target="_blank">ascat_20130416_134200_metopa_<wbr>33683_eps_o_coa_2101_ovw.l2.nc</a><br> processing_level : L2<br> orbit_number : 33683<br> start_date : 2013-04-16<br> start_time : 13:42:00<br> stop_date : 2013-04-16<br> stop_time : 15:23:58<br> equator_crossing_<wbr>longitude : 116.924<br> equator_crossing_date : 2013-04-16<br> equator_crossing_time : 13:41:03<br> rev_orbit_period : 6081.7<br> orbit_inclination : 98.7<br> history : N/A<br> references : ASCAT Wind Product User Manual, <a href="http://www.osi-saf.org/" target="_blank">http://www.osi-saf.org/</a>, <a href="http://www.knmi.nl/scatterometer/" target="_blank">http://www.knmi.nl/<wbr>scatterometer/</a><br> comment : Orbit period and inclination are constant values. All wind directions in oceanographic convention (0 deg. flowing North)<br> creation_date : 2013-04-16<br> creation_time : 16:27:43<br> dimensions:<br> NUMROWS = 3259<br> NUMCELLS = 82<br> variables:<br> integer time ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-<a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a><br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-<a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a><br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span><a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a><br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>time<br> units :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>seconds since 1990-01-01 00:00:00<br> coordinates :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>lat lon<br><br> integer lat ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-<a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a><br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-<a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a><br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-9000000<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>9000000<br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>latitude<br> units :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>degrees_north<br> scale_factor :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>1e-05<br> add_offset :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0<br><br> integer lon ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-<a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a><br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-<a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a><br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>36000000<br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>longitude<br> units :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>degrees_east<br> scale_factor :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>1e-05<br> add_offset :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0<br><br> short wvc_index ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>999<br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>cross track wind vector cell number<br> units :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>1<br> coordinates :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>lat lon<br><br> short model_speed ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>5000<br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>model wind speed at 10 m<br> units :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>m s-1<br> scale_factor :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0.01<br> add_offset :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0<br> coordinates :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>lat lon<br><br> short model_dir ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>3600<br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>model wind direction at 10 m<br> units :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>degree<br> scale_factor :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0.1<br> add_offset :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0<br> coordinates :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>lat lon<br><br> short ice_prob ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>1000<br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>ice probability<br> units :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>1<br> scale_factor :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0.001<br> add_offset :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0<br> coordinates :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>lat lon<br><br> short ice_age ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-5000<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>5000<br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>ice age (a-parameter)<br> units :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>dB<br> scale_factor :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0.01<br> add_offset :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0<br> coordinates :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>lat lon<br><br> integer wvc_quality_flag ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-<a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a><br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-<a href="tel:(214)%20748-3647" value="+12147483647" target="_blank">2147483647</a><br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>8388607<br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>wind vector cell quality<br> coordinates :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>lat lon<br> flag_masks :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span><ARRAY of 17 elements><br> flag_meanings :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>distance_to_gmf_too_large data_are_redundant no_meteorological_background_<wbr>used rain_detected rain_flag_not_usable small_wind_less_than_or_equal_<wbr>to_3_m_s large_wind_greater_than_30_m_s wind_inversion_not_successful some_portion_of_wvc_is_over_<wbr>ice some_portion_of_wvc_is_over_<wbr>land variational_quality_control_<wbr>fails knmi_quality_control_fails product_monitoring_event_flag product_monitoring_not_used any_beam_noise_content_above_<wbr>threshold poor_azimuth_diversity not_enough_good_sigma0_for_<wbr>wind_retrieval<br><br><b> short wind_speed ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>5000<br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>wind speed at 10 m<br> units :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>m s-1<br> scale_factor :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0.01<br> add_offset :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0<br> coordinates :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>lat lon</b><br><br> short wind_dir ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>0<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>3600<br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>wind direction at 10 m<br> units :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>degree<br> scale_factor :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0.1<br> add_offset :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0<br> coordinates :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>lat lon<br><br> short bs_distance ( NUMROWS, NUMCELLS )<br> _FillValue :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> missing_value :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-32767<br> valid_min :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>-500<br> valid_max :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>500<br> long_name :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>backscatter distance<br> units :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>1<br> scale_factor :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0.1<br> add_offset :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span> 0<br> coordinates :<span class="m_3791763330768493527Apple-tab-span" style="white-space:pre-wrap">        </span>lat lon<br><br><br></div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>