[gradsusr] Data descriptor file

Jennifer M Adams jadams21 at gmu.edu
Wed Jul 12 17:28:22 EDT 2017


Sounds like your .dat file is really ascii, if it has columns with lat, lon, and wind speed data. 

The doc file I pointed to in my first reply does tell you ‘exactly how your output grid file must be written’ — look under the heading Structure of a Gridded Binary File:
http://cola.gmu.edu/grads/gadoc/aboutgriddeddata.html#structure

“… Each building block is a horizonal grid of data varying in the X and Y dimensions. The first dimension (X) always varies from west to east; the second dimension (Y) varies from south to north (by default).” 

So, you muse write all longitudes at the southernmost latitude. Then write out another row of data for all longidutes and the next latitude, etc. You may find this page useful: http://cola.gmu.edu/grads/gadoc/ascii.html — the section on “Input ASCII data” has an example showing how to deal with ASCII data using GrADS scripts.
—Jennifer





> On Jul 12, 2017, at 4:23 PM, Lovish Aggarwal <guptaluv.8098 at gmail.com> wrote:
> 
> This won't work as my dat file contains three columns containing lat long and wind speed. And grads is unable to read it. 
> The reason am trying to make a grid file from it using java! Please help me up with how exactly my output grid file must be written for it to be understood by grads. 
> Thanks! 
> 
> On Jul 12, 2017 5:54 PM, "Jennifer M Adams" <jadams21 at gmu.edu> wrote:
> This doc page should provide the information you need: http://cola.gmu.edu/grads/gadoc/aboutgriddeddata.html
> 
> Flat binary data files often have the .dat OR the .grd extension, so converting may not be necessary. Depending on what your error is, you can check the file's size, it should be xsize*ysize*zsize*4 bytes.
> —Jennifer
> 
> 
> > On Jul 12, 2017, at 5:15 AM, Lovish Aggarwal <guptaluv.8098 at gmail.com> wrote:
> >
> > I need to know the exact format of .grd file grads takes as input.
> > I have .dat file with xyz (lat lon windspeed) and am converting this .dat file to .grd but there is a problem in reading the grd file made.
> > So I want to know the exact format of grd file so that I can make it through my java code.
> > Thank you!
> > It's kind of urgent please reply asap.
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://gradsusr.org/mailman/listinfo/gradsusr
> 
> --
> Jennifer Miletta Adams
> Center for Ocean-Land-Atmosphere Studies (COLA)
> George Mason University
> 
> 
> 
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University






More information about the gradsusr mailing list