[ncl-talk] how to read a fortran binary file using fbinrecread

xiaoming Hu yuanfangcan at hotmail.com
Tue Mar 3 11:44:02 MST 2015


Dave

Here is the relevant info:
    ids=1;ide=401
    jds=1;jde=401
-rw-r--r-- 1 xhu caps 617M Mar  3 11:11 test.dat

real,dimension(:,:),allocatable   :: u,v,h

NCAR Command Language Version 5.2.1

/usr/local/intel/fc/9.1.040/bin/ifort

Linux cirrus.caps.ou.edu 2.6.18-348.12.1.el5 #1 SMP Mon Jul 1 17:54:12 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux

I do have close(10) in the fortran code

Thanks a lot!
Xiaoming 
Date: Tue, 3 Mar 2015 11:21:46 -0700
Subject: Re: [ncl-talk] how to read a fortran binary file using fbinrecread
From: dave.allured at noaa.gov
To: yuanfangcan at hotmail.com
CC: ncl-talk at ucar.edu

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/aac1586f/attachment.html 


More information about the ncl-talk mailing list