<div dir="ltr">Hi Wen:<div><br></div><div>What are nx,ny?  Are they suppose to be the same values in the data read in and the data plotted?</div><div><br></div><div>Are you sure about the little_endian definition?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 3, 2017 at 6:16 AM, wen <span dir="ltr">&lt;<a href="mailto:wenguanhuan@163.com" target="_blank">wenguanhuan@163.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;color:#000000;font-size:10px;font-family:Arial"><div>Hi. The following script is able to read the data. I hope it work for you. </div><div> </div><br><div> setfileoption(&quot;bin&quot;,&quot;<wbr>ReadByteOrder&quot;,&quot;littleEndian&quot;)</div><div><span style="font-size:10px;line-height:1.7"> mfile = &quot;1.grd&quot;</span></div><div>  rec = 0</div><div>  crain = fbindirread(mfile,rec,(/ny,nx/<wbr>),&quot;float&quot;)</div><div>  rec = 1</div><div>  gsamp = fbindirread(mfile,rec,(/ny,nx/<wbr>),&quot;float&quot;)</div><div><br></div><br><br><div style="zoom:1">--<br><div>Best regards,</div><div>Guanhuan Wen</div><div style="clear:both"></div></div><div><div class="h5"><div id="m_-8949255065581638016divNeteaseMailCard"></div><br>在 2017-04-30 12:07:44,&quot;易路&quot; &lt;<a href="mailto:dg1225033@smail.nju.edu.cn" target="_blank">dg1225033@smail.nju.edu.cn</a>&gt; 写道:<br> <blockquote id="m_-8949255065581638016isReplyContent" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid"><div>Hi all,</div><div>I downloaed the merged CMORPH data from China Meteorological Administration to get the hourly precipitation imformation, the suffix of the data file is grd which is a standard format of the tool GrADS. According to the associated ctl file of the grd file,  I tried to write the NCL script to read it but can&#39;t get the right data, and I couldn&#39;t find out the prolbems...</div><div> </div><div>So would you please help me to find out the problems ? Thanks very mcuh for your precious time and kindness!</div><div> </div><div><div>Sincerely </div><div>Yi Lu</div><div> </div><div>;;;;;;;;;;; the part of NCL script to read in the precipitation ;;;;;;;;;; </div></div><div>tim = &quot;1.grd&quot;<br>setfileoption(&quot;bin&quot;,&quot;<wbr>ReadByteOrder&quot;,&quot;LittleEndian&quot;)<br>rain = 
fbindirread(tim,0,(/nlat,nlon/<wbr>),&quot;double&quot;)<br><br>nlat = 440<br>nlon = 
700<br>r=new((/nlat,nlon/),&quot;double&quot;)<br>k=0<br>do i  = 0, nlat-1<br>  do j = 0, 
nlon-1<br>   r(i,j) = rain(nlat-1-i,j)<br>        k = k+1<br>  end do<br>end 
do<br><br>lon = fspan(70.05,139.95,nlon)<br>lon!0 = &quot;lon&quot;<br><a href="mailto:lon@units" target="_blank"><font color="#0066cc">lon@units</font></a> = 
&quot;degrees_east&quot;<br><a href="mailto:lon@long_name" target="_blank"><font color="#0066cc">lon@long_name</font></a> = &quot;longitude&quot;<br><br>lat = 
fspan(15.05,58.95,nlat)<br>lat!0 = &quot;lat&quot;<br><a href="mailto:lat@long_name" target="_blank">lat@long_name</a> = &quot;latitude&quot;<br><a href="mailto:lat@units" target="_blank">lat@units</a> = &quot;degrees_north&quot;<br><br>r!0 = &quot;lat&quot;<br>r!1 = 
&quot;lon&quot;<br>r&amp;lat = lat<br>r&amp;lon = lon<br><a href="mailto:r@units" target="_blank">r@units</a> = &quot;mm/hour&quot;<br><a href="mailto:r@long_name" target="_blank">r@long_name</a> = &quot;merged CMORPH data &quot;<br><a href="mailto:r@_FillValue" target="_blank">r@_FillValue</a> = -999.00<br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr>;;;;;;;;;;</div><div> </div><div> </div><div><u></u><div style="color:rgb(144,144,144);font-family:Arial Narrow;font-size:12px"><br><br><br><br></div><div style="color:rgb(0,0,0);font-family:Verdana;font-size:14px"><div style="overflow:hidden"><table class="m_-8949255065581638016preview_table"><tbody><tr><td valign="middle"><img id="m_-8949255065581638016preview_qrcode" src="https://exmail.qq.com/cgi-bin/setting_qrcode_card?action=qrcode_card&amp;alias=dg1225033@smail.nju.edu.cn&amp;key=33b1e5708e6a55b5"></td><td valign="middle" style="color:rgb(160,160,160);font-size:12px"><h4 class="m_-8949255065581638016name" style="margin:0px;color:rgb(0,0,0);line-height:28px;font-size:14px;font-weight:bold">易路</h4><p class="m_-8949255065581638016department" style="margin:0px">南大邮件系统/学生/博士生/12级博士生</p><p class="m_-8949255065581638016addr" style="margin:0px;color:rgb(160,160,160);line-height:22px">南京市汉口路22号 </p></td></tr></tbody></table></div></div><u></u></div><div> </div><div><u></u><u></u></div></blockquote></div></div></div><br><br><span title="neteasefooter"><p> </p></span><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><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US 914 432 3108<br></div></div></div>
</div>