<div dir="ltr"><div><div>If you are "new to NCL", please read the NCL User Guide created by DKRZ. There are many examples.<br><br><a href="https://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Manuals/NCL_User_<wbr>Guide/</a><br></div><div><br>==============<br>BinCreate.ncl (modified bincreate.ncl)<br><br>f1 = addfile("<a href="http://uwnd.850.1951.nc" target="_blank">uwnd.850.1951.nc</a>","r"<wbr>)<br>uwnd = f1->uwnd<br></div>dimu = dimsizes(uwnd)<br></div>ntim = dimu(0)<br><div><div><br> do i = 0=ntim-1 ; each 'i' (time) is a record number<br> fbindirwrite ("1951.bin",uwnd(i,:,:)) ; each time (record number) has lat*lon pts<br> end do<br><br>==================<br></div><div>Your binread.f95 is odd (?not correct?). <br><br></div><div>(a) You are opening units 11 and 12 but not reading either file (unit). Why are they there?<br><br></div><div>(b) Where is 'uwnd' created? ***Where is the 'time' (record) dimension?***<br></div><div> <br>(c) Further, it is *writing* (nor *reading* as the file name would imply) one grid point value at each iteration.<br><br></div><div>To read what 'BinCreate.ncl' is doing you would need something like:<br><br>implicit none<br>integer::time,lon,lat,i,j,k,nu,nr<br>parameter (time=730)<br>parameter (lat=25)<br>parameter (lon=144)<br>real::uwnd(lat,lon)<br><br>open(11,file="1950.bin",form="unformatted",access="direct",recl=4*lat*lon)<br>open(21,file="1951.bin",form="unformatted",access="direct",recl=4*lat*lon)<br>open(31,file="50_51.bin",form="unformatted",access="direct",status="replace",recl=4*lat*lon)<br> <br><br> nr = 0<br> do nu=11,21,10<br> do i = 1,time<br> read(nu,rec=i) uwnd ! read all lat*lon<br> nr = nr+1<br> write(31,rec=nr) uwnd ! write all lat*lon <br><br> end do <br> end do<br><br>close(31)<br>close(21)<br>close(11)<br><br>end<br><br><br>====================<br><br></div><div>Good luck<br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 20, 2017 at 7:05 AM, Arijeet Dutta <span dir="ltr"><<a href="mailto:arijeet.uoh@gmail.com" target="_blank">arijeet.uoh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi, I am aware of addfiles() and I am able to merge nc files, that's not the issue; I am just playing around with fbindirread and fbindirwrite and make sense of them. Please have a look when you get time. Thanks <br><br></div>Cheers<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Arijeet<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 20, 2017 at 6:17 PM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I've not looked at the scripts just yet, but if all you are trying to do is to merge several NetCDF files, you might want to look at the addfile<font color="#ff0000">s</font>() command:<div><br></div><div><a href="http://ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml" target="_blank">http://ncl.ucar.edu/Document/F<wbr>unctions/Built-in/addfiles.sht<wbr>ml</a><br></div><div><br></div><div>This potentially save you some trouble.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-8988725723796018211h5">On Fri, Oct 20, 2017 at 6:17 AM, Arijeet Dutta <span dir="ltr"><<a href="mailto:arijeet.uoh@gmail.com" target="_blank">arijeet.uoh@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-8988725723796018211h5"><div dir="ltr"><div><div>Hi all, I am new to NCL. I had u-wind daily data at 850hPa as netcdf files. To get into how binary file works I converted the nc file into .bin using fbindirwrite and then used fortran to read and merge two such files and then tried to read the merged bin file in NCL with fbindirread I am having unrealistic values for u-wind. Please see the attached scripts I wrote and let me know if you can make out anything<br><br></div>Cheers <br></div><span class="m_-8988725723796018211m_-5083515176077928954HOEnZb"><font color="#888888">Arijeet<br></font></span></div>
<br></div></div>______________________________<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></div>
</blockquote></div><br></div>
</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>