I have a .bin file on my hard drive.
It's recl is nx*ny*4. Its dimensions are (241,121). 241 in x dimension. 121 in y dimension.
How would I convert it using fortran to an ascii file that I can open and read numbers off of?
So, far I have tried
real :: g1(241,121)
open(unit=1,file=gaugemax2010.bin',status='old',
form='unformatted',access='direct',recl=nx*ny*4)
open(unit=5,file='g2010.txt',status='unknown',
form='unformatted',access='direct',recl=1)
read(1, rec=1) ((g1(i,j,),i=1,nx,j=1,ny)
write(5, rec=1) (g1(i,j,),i=1,241),h=1,121)
end
and it has not worked
read(1, rec=1) ((g1(i,j),i=1,nx),j=1,ny). Obvioulsy h should be j in the second case... Of course since your array is dimensioned exactly right you could just doread(1,rec=1)g1