[Thread Prev][Thread Next][Index]

Re: [ferret_users]



Hi,

| I am reading a file of columnar data written in fortran code as
|       do i=
|       do j=
|       do k=
|       write(10,26) alon(i,j), [. . .]
| 26    format(8e12.5)   ! effectively 96 character long 
|       enddo
|       enddo
|       enddo

I don't know exactly what went wrong when you tried to read
the data in Ferret, but I'd just like to point out that
you can make your data file easier to read in Ferret.

1) Write out your data in the "Fortran order":

  do k = . . .
    do j = . . .
      do i = . . .
        write(. . .) var(i,j,k)

 For both Fortran and Ferret, the natural order is such that
 "i" varies fastest.  So, it's better that the i-loop is
 inner-most.

 If you choose this ordering, you don't have to specify
 the ordering in Ferret.

2) Insert a blank between the values:

  write(10,"(8(1X,E12.5)")  var1(i,j,k), . . .

 If there are blanks between the values, you can omit the format
 specifier when you read the file in Ferret.

Regards,
Ryo


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement