<div style="line-height:1.7;color:#000000;font-size:10px;font-family:Arial"><div>Hi Barry,</div><div>&nbsp;ny = 440,nx=700, which are "nlat" and "nlon" in the script of Yi Lu.</div><br><br><br><br><div style="position:relative;zoom:1">--<br><div>Best regards,</div><div>Guanhuan Wen</div><div style="clear:both"></div></div><div id="divNeteaseMailCard"></div><br>At 2017-05-03 13:17:32, "Barry Lynn" &lt;barry.h.lynn@gmail.com&gt; wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="ltr">Hi Wen:<div><br></div><div>What are nx,ny?&nbsp; 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.&nbsp;</div><div>&nbsp;</div><br><div>&nbsp;setfileoption("bin","<wbr></wbr>ReadByteOrder","littleEndian")</div><div><span style="font-size:10px;line-height:1.7">&nbsp;mfile = "1.grd"</span></div><div>&nbsp; rec = 0</div><div>&nbsp; crain = fbindirread(mfile,rec,(/ny,nx/<wbr></wbr>),"float")</div><div>&nbsp; rec = 1</div><div>&nbsp; gsamp = fbindirread(mfile,rec,(/ny,nx/<wbr></wbr>),"float")</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,"易路" &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&nbsp;from&nbsp;China Meteorological Administration&nbsp;to get the hourly precipitation imformation, the suffix of the data file is grd&nbsp;which is a standard format of the tool GrADS. According to&nbsp;the associated ctl file&nbsp;of the grd file, &nbsp;I tried to write the NCL script to read it but can't get the right data, and I couldn't find out the prolbems...</div><div>&nbsp;</div><div>So would you please help me to find out the problems ? Thanks very mcuh for your precious time and kindness!</div><div>&nbsp;</div><div><div>Sincerely </div><div>Yi Lu</div><div>&nbsp;</div><div>;;;;;;;;;;; the part of NCL script to read in the precipitation&nbsp;;;;;;;;;;;&nbsp;</div></div><div>tim = "1.grd"<br>setfileoption("bin","<wbr></wbr>ReadByteOrder","LittleEndian")<br>rain = 
fbindirread(tim,0,(/nlat,nlon/<wbr></wbr>),"double")<br><br>nlat = 440<br>nlon = 
700<br>r=new((/nlat,nlon/),"double")<br>k=0<br>do i&nbsp;&nbsp;= 0, nlat-1<br>&nbsp;&nbsp;do j = 0, 
nlon-1<br>&nbsp; &nbsp;r(i,j) = rain(nlat-1-i,j)<br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;k = k+1<br>&nbsp;&nbsp;end do<br>end 
do<br><br>lon = fspan(70.05,139.95,nlon)<br>lon!0 = "lon"<br><a href="mailto:lon@units" target="_blank"><font color="#0066cc">lon@units</font></a> = 
"degrees_east"<br><a href="mailto:lon@long_name" target="_blank"><font color="#0066cc">lon@long_name</font></a> = "longitude"<br><br>lat = 
fspan(15.05,58.95,nlat)<br>lat!0 = "lat"<br><a href="mailto:lat@long_name" target="_blank">lat@long_name</a> = "latitude"<br><a href="mailto:lat@units" target="_blank">lat@units</a> = "degrees_north"<br><br>r!0 = "lat"<br>r!1 = 
"lon"<br>r&amp;lat = lat<br>r&amp;lon = lon<br><a href="mailto:r@units" target="_blank">r@units</a> = "mm/hour"<br><a href="mailto:r@long_name" target="_blank">r@long_name</a> = "merged CMORPH data "<br><a href="mailto:r@_FillValue" target="_blank">r@_FillValue</a> = -999.00<br></div><div>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr></wbr>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<wbr></wbr>;;;;;;;;;;</div><div>&nbsp;</div><div>&nbsp;</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号&nbsp;</p></td></tr></tbody></table></div></div><u></u></div><div>&nbsp;</div><div><u></u><u></u></div></blockquote></div></div></div><br><br><span title="neteasefooter"><p>&nbsp;</p></span><br>______________________________<wbr></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></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,&nbsp;</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem,&nbsp;</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel&nbsp;</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>
</blockquote></div><br><br><span title="neteasefooter"><p>&nbsp;</p></span>