[gradsusr] hi (harikishan gandham)

jl sa esjluis at yahoo.com.mx
Mon Aug 30 10:44:34 EDT 2010


and
command the link where you can find the solution about going from ascii
to binary, I use a program in FORTRAN and create a ctl GRADS to read
it, I hope to help you with this, plus I show an example of the prgram
in fortran:



 real data (625.381) / / x y  points and mesh

        real numo2 l * 8

        real * 8 i, d, j





        open (33, file = 'ville.bin', status = 'unknown', access = 'direct'

     + RECL = 952 500) / / the file format to create bnario the "RECL = points in x and y by 4 625X381X4"

c source files

        open (12, file = 'ayuda.txt') / / the file that has ascii values sequentially

            i = 0

40 i = i +1

          if (i.le.625) then

            j = 0

60 j = j +1

           if (j.le.381) then

            read (12, '(f8.2)') numo2

      data (i, j) = numo2



          goto 60

         endif

          goto 40

          endif

50 close (12)

            write (*,*)' save '

          write (33, rec = 1) ((data (e, t), t = 1.381), e = 1.625) / / how to save data in binary file

        close (33)

30 end



then creates a file and lcual ctl must have the following information:

DSET ^ ville.bin

undef -999.99

xdef 625 linear -117.20 05 / / MI Mall is. 05

05 13.95 381 linear ydef

1 Levels zdef 1000.00

1HR 01Z23AUG2009 TDEF a linear / / START DATE

vars 1

prec 0 99 precipitation (mm) / / THE VARIABLE

endvars

means this is a good guide
http://www.cmc.org.ve/mediawiki/index.php?title=Guia_GrADS
I hope that I have not confused
and sorry for the translation




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100830/f9227a06/attachment-0003.html 


More information about the gradsusr mailing list