[RegCNET] Reading the SAV binary files

Michael Notaro mnotaro at wisc.edu
Thu Jan 13 20:38:04 CET 2011


Thanks Graziano.  Based on your script, I modified mine and now
it works.  My 2 primary mistakes were not dividing by ps0 and
using 2d instead of 3d for some variables.

Thanks again!

Michael



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,18,152),vb0_io(128,18,152),qb0_io(128,18,152)
      real*8 tb0_io(128,18,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*,mdate,ktau,xtime,ldatez,lyear,lmonth,lday,lhour,ntime

      do i=1,128
        do j=1,152
          do k=1,18
            ub0_io(i,k,j)=ub0_io(i,k,j)/ps0_io(i,j)
            vb0_io(i,k,j)=vb0_io(i,k,j)/ps0_io(i,j)
            qb0_io(i,k,j)=qb0_io(i,k,j)/ps0_io(i,j)
            tb0_io(i,k,j)=tb0_io(i,k,j)/ps0_io(i,j)
          end do
        end do
      end do

      print*, ts0_io

      close(21)
      end







On Jan 13, 2011, at 12:11 PM, Graziano Giuliani wrote:

> On 01/13/2011 07:01 PM, Graziano Giuliani wrote:
> [...]
>> Try the attached program (changing dimension parameters), compiled with the
>> above flags.
> [...]
> 
> OOOps...
> 
> The order of dimension in U,V,T,and Q was wrong. The correct source is again attached. Forgive me for previous error.
> 
> My bad.
> 
> Graziano.
> <readsavefile.f90>_______________________________________________
> RegCNET mailing list
> RegCNET at lists.ictp.it
> https://lists.ictp.it/mailman/listinfo/regcnet




More information about the RegCNET mailing list