problem plotting u,v winds from binary file

Matt Georgescu matt1 at CEP.RUTGERS.EDU
Wed Mar 19 09:51:44 EDT 2008


Brad, when writing out the data using fortran, try this writing in this
manner instead:

write(16,rec=1) ((Ux(I,J),I=1,191),J=1,360)

and similarly for to V component.

then GrADS should be able to deal with that properly.

matt

On Wed, 19 Mar 2008, Brad Navarro wrote:

> Greetings,
>
>
>
> Despite my persistent efforts, I cannot seem to solve this particular
> problem. Perhaps someone out there will know how. I have generated a
> binary file with U and V wind components for only one level and
> timestamp, and I have provided the piece of code that writes this data
> to file:
>
>
>
>         DO 110 I=1,191
>
>             write(16,rec=I) (Ux(I,J),J=1,360)  ! writes the u component
> to file
>
>  110    CONTINUE
>
>
>
>         DO 115 I=1,191
>
>          write(16,rec=I) (Vy(I,J),J=1,360) ! writes the v component to
> file.
>
> 115        CONTINUE
>
>
>
> So, in essence, each component is written for each latitude, I, and for
> each longitude, J, at 1 degree intervals. So my control file then looks
> like this:
>
>
>
> DSET  /home/bradn/WINDVERIF/TEST/windcompgridded.dat
>
> TITLE  Qscat 10m wind
>
> UNDEF  -0.9999E4
>
> XDEF 360 LINEAR 0 1
>
> YDEF 181 LINEAR -90 1
>
> ZDEF 1 LEVELS 1 1
>
> TDEF 1 LINEAR 15Z17JUN07 3hr
>
> VARS 2
>
> u 0 99 u component
>
> v 0 99 v component
>
> ENDVARS
>
>
>
>
>
> However, when trying to plot the U component, it looks as if GrADS uses
> the V data in the binary file as the U data, and then gives me this
> error message when trying to plot the V component:
>
>
>
> Low Level I/O Error:  Read error on data file
>
>  Data file name = /home/bradn/WINDVERIF/TEST/DIR/windcompgridded.dat
>
>  Error reading 360 bytes at location 68760
>
> Data Request Error:  Error for variable 'v'
>
>  Error ocurred at column 1
>
> DISPLAY error:  Invalid expression
>
>  Expression = v
>
>
>
> Anyone have any ideas what I might be doing wrong? Any help would be
> much appreciated.
>
>
>
> Thanks,
>
> Brad
>
>



More information about the gradsusr mailing list