<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("bin","ReadByteOrder","littleEndian")</div><div><span style="font-size: 10px; line-height: 1.7;"> mfile = "1.grd"</span></div><div> rec = 0</div><div> crain = fbindirread(mfile,rec,(/ny,nx/),"float")</div><div> rec = 1</div><div> gsamp = fbindirread(mfile,rec,(/ny,nx/),"float")</div><div><br></div><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>在 2017-04-30 12:07:44,"易路" <dg1225033@smail.nju.edu.cn> 写道:<br> <blockquote id="isReplyContent" 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't get the right data, and I couldn'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 = "1.grd"<br>setfileoption("bin","ReadByteOrder","LittleEndian")<br>rain =
fbindirread(tim,0,(/nlat,nlon/),"double")<br><br>nlat = 440<br>nlon =
700<br>r=new((/nlat,nlon/),"double")<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 = "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&lat = lat<br>r&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>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div><div> </div><div> </div><div><sign signid="98"><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="preview_table"><tbody><tr><td valign="middle"><img id="preview_qrcode" src="https://exmail.qq.com/cgi-bin/setting_qrcode_card?action=qrcode_card&alias=dg1225033@smail.nju.edu.cn&key=33b1e5708e6a55b5"></td><td valign="middle" style="color: rgb(160, 160, 160); font-size: 12px;"><h4 class="name" style="margin: 0px; color: rgb(0, 0, 0); line-height: 28px; font-size: 14px; font-weight: bold; -ms-zoom: 1;">易路</h4><p class="department" style="margin: 0px;">南大邮件系统/学生/博士生/12级博士生</p><p class="addr" style="margin: 0px; color: rgb(160, 160, 160); line-height: 22px;">南京市汉口路22号 </p></td></tr></tbody></table></div></div></sign></div><div> </div><div><includetail></includetail></div></blockquote></div><br><br><span title="neteasefooter"><p> </p></span>