<div dir="ltr"><div>Barry makes a good point about the using the &quot;Little Endian&quot; byte-order. Another issue is the &#39;type&#39;  ,,, In my opinion, using &quot;double&quot; is likely not correct. Having precipitation at (say) 12+ digits of precision is rather silly.<br><br></div><div>I suggest that you do some very basic &#39;data exploration&#39;. <br>For example: Look at min/max<br></div><div>You should do this type of thing on a regular basis.<br></div><div><br><br></div><div>You have:<br></div><div>setfileoption(&quot;bin&quot;,&quot;<wbr>ReadByteOrder&quot;,&quot;LittleEndian&quot;)<br>rain = 
fbindirread(tim,0,(/nlat,nlon/<wbr>),&quot;double&quot;)<br></div><div>print(&quot;min=&quot;+min(rain)+&quot;  max=&quot;+max(rain))<br></div><div><br></div><div>Try:<br>setfileoption(&quot;bin&quot;,&quot;<wbr>ReadByteOrder&quot;,&quot;BigEndian&quot;)<br>rain = 
fbindirread(tim,0,(/nlat,nlon/<wbr>),&quot;float&quot;)<br><div>print(&quot;min=&quot;+min(rain)+&quot;  max=&quot;+max(rain))<br></div><div><br></div><br></div><div>----<br><a target="_blank" href="https://www.ncl.ucar.edu/Applications/">https://www.ncl.ucar.edu/<wbr>Applications/</a><br></div><div>Under &quot;Datasets&quot;, Click &quot;High Res Precipitation&quot;<br><br></div><div>There are several CMORPH examples. <br><br>The source of the files USA NCEP/CPC has documentation (<a target="_blank" href="ftp://ftp.cpc.ncep.noaa.gov/precip/global_CMORPH/README.cmorph.025deg_3-hourly">ftp://ftp.cpc.ncep.noaa.gov/<wbr>precip/global_CMORPH/README.<wbr>cmorph.025deg_3-hourly</a>) that states: <br><pre>Each file is composed of 16 direct access binary
(&quot;big_endian&quot;)<br><br></pre><pre>Maybe CMA has a different data set. I do not know.<br></pre>========================<br></div><div>cmorph_1.ncl   <br><br></div><div>demonstrates how to <br><br></div><div>[1] Read the CMORPH binary files<br></div><div>[2] Create meta data<br></div><div>[3] Plot  on global projection<br><br>--<br></div><div>For the China region<br><br></div><div>[1]<br></div><div>   latS = 15.0<br></div><div>   latN = 58.9<br></div><div>   lonL = 70.0<br></div><div>   lonR = 140.0<br><br></div><div>Two approaches to plot the China region:<br><br>  res@mpMinLatF            = latS     ; range to zoom in on<br>  res@mpMaxLatF            = latN<br>  res@mpMinLonF            =  lonL<br>  res@mpMaxLonF            = lonR<br><br>[2]<br>  plot = gsn_csm_contour_map(wks, rain, res)<br> <br></div><div>[3]<br><br></div><div>  rain_china= rain({latS:latN},{lonL:lonr})  ; coordinate subscripting<br>  <br></div><div>  res@gsnAddCyclic = False<br></div><div>  plot = gsn_csm_contour_map(wks, rain_china, res)<br><br>=============================<br><br></div><div>If you are new to NCL, please read the excellent tutorial created by DKRZ at:<br>   <a href="https://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/">https://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/</a><br><br><br></div><div>Good Luck<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 11:59 PM, 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 Barry,</div><div> ny = 440,nx=700, which are &quot;nlat&quot; and &quot;nlon&quot; in the script of Yi Lu.</div><br><br><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_-9152499539507856186divNeteaseMailCard"></div><br>At 2017-05-03 13:17:32, &quot;Barry Lynn&quot; &lt;<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>&gt; wrote:<br> <blockquote id="m_-9152499539507856186isReplyContent" 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?  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;ReadByte<wbr>Order&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="m_-9152499539507856186h5"><div id="m_-9152499539507856186m_-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_-9152499539507856186m_-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;ReadByteO<wbr>rder&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_-9152499539507856186m_-8949255065581638016preview_table"><tbody><tr><td valign="middle"><img id="m_-9152499539507856186m_-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 style="color:rgb(160,160,160);font-size:12px" valign="middle"><h4 class="m_-9152499539507856186m_-8949255065581638016name" style="margin:0px;color:rgb(0,0,0);line-height:28px;font-size:14px;font-weight:bold">易路</h4><p class="m_-9152499539507856186m_-8949255065581638016department" style="margin:0px">南大邮件系统/学生/博士生/12级博士生</p><p class="m_-9152499539507856186m_-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" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-9152499539507856186gmail_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 <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</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></div>