[ncl-talk] how to read a fortran binary file using fbinrecread
Dave Allured - NOAA Affiliate
dave.allured at noaa.gov
Tue Mar 3 11:21:46 MST 2015
Xiaoming,
Please tell us the following debug information.
* The exact values of ids, ide, jds jde.
* The exact size of the file, in bytes, from "ls -l".
* The fortran data type of the array "h" in the fortran program (real,
double, or what?)
* NCL version number.
* Fortran compiler name and version number.
* The output from system command "uname -a".
Also, just a guess, try adding close (10) at the end of your fortran
program, and see if that helps.
--Dave
On Tue, Mar 3, 2015 at 11:09 AM, xiaoming Hu <yuanfangcan at hotmail.com>
wrote:
> Hello
>
> In fortran I have:
> ids=1;
> open(10,file='./test.dat',form='unformatted',access='sequential')
> write(10)((h(i,j),i=ids,ide),j=jds,jde)
>
>
> In ncl I tried to use
> h = fbinrecread ("./test.dat",0, (/jde,ide/),"float")
> to read
>
> But I got
> warning:fbinrecread: size specified is greater than record size, filling
> with missing values
> fatal:fbinrecread: an error occurred reading the requested record.
> Something is wrong with the FORTRAN binary file.
> fatal:Execute: Error occurred at or near line 11 in file conwomap_2.ncl
>
> Can anybody help?
>
> Thanks a lot!
>
> Xiaoming
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150303/95dab7d0/attachment.html
More information about the ncl-talk
mailing list