[RegCNET] Reading the SAV binary files

Michael Notaro mnotaro at wisc.edu
Thu Jan 13 16:59:42 CET 2011


Thanks.

>From the Makefile.inc, 
F90 = ifort
F90FLAGS = -O3 -fp-model precise -convert big_endian -heap-arrays \
                                         -assume byterecl

So I just tried
ifort -O3 -fp-model precise -convert big_endian -heap-arrays -assume byterecl read_restart.f
and it still gives unreasonable values for all double precision numbers.  

Any suggestions?

Michael




On Jan 12, 2011, at 7:43 PM, Steve Hostetler wrote:

> Are you sure you need to use the big_endian argument?  It might be native.  Also make sure your real types are compatible-- you might need to add a switch in your compile line.
> 
> __________________________
> Steve Hostetler
> US Geological Survey
> Department of Geosciences
> Wilkinson Hall Room 104
> Oregon State University
> Corvallis, OR 97331
> tel +1 541 737-8928
> fac +1 541 737-1200
> 
> 
> On 1/12/2011 3:39 PM, Michael Notaro wrote:
>> I am trying to open and read the SAV restart binary files
>> from regcm4.  I am on NCSA Abe (intel 64 cluster).
>> I tried reading the first bunch of variables on the file
>> with the following ifort script.  It reads all of the initial
>> integer values (mdate, ktau, ..., ntime) ok.  But all of
>> the double precision 2D variables have unreasonable
>> values.  Any suggestions?
>> 
>> 
>> c     ifort -convert big_endian -assume byterecl read_restart.f
>> 
>>       integer mdate, ktau , xtime , ldatez , lyear , lmonth , lday
>>       integer lhour , ntime
>>       real*8 ub0_io(128,152),vb0_io(128,152),qb0_io(128,152)
>>       real*8 tb0_io(128,152),ps0_io(128,152),ts0_io(128,152)
>> 
>>       open(21,file="G90s_SAV.1989010100",form="unformatted",
>>      #     status="old")
>>       read(21) mdate
>>       read(21) ktau, xtime, ldatez, lyear, lmonth, lday, lhour, ntime
>>       read(21) ub0_io, vb0_io, qb0_io, tb0_io ,ps0_io ,ts0_io
>> 
>>       print*, ub0_io
>> 
>>       close(21)
>>       end
>> 
>> _______________________________________________
>> RegCNET mailing list
>> RegCNET at lists.ictp.it
>> https://lists.ictp.it/mailman/listinfo/regcnet




More information about the RegCNET mailing list