[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GrADS IOSP



On 2/17/2011 12:32 PM, Don Murray wrote:
John-

Many people here write out their data in grads binary files. I'd like to view them in the IDV, so am working on an IOSP for this. I plan on using the GridServiceProvider framework that I used for the GEMPAK and McIDAS grid readers. At this point, I'm only going to handle lat/lon grids.

One question I have is about the RandomAccessFile that gets passed to the IOSP. For grads, there is a data description file (sometimes called the ctl file) which describes the structure of the binary data file (see: http://www.iges.org/grads/gadoc/descriptorfile.html). I've attached a sample CTL file. My idea is that the user would open the ctl file which would set up the grid structure for the GridServiceProvider, but when the data is read, it reads from the binary file described in the ctl file. So, the initial RandomAccessFile would be the CTL, but I'm wondering about accessing the binary file. Do I just hold a handle internally to a RandomAccessFile and read from that? Are there other IOSPs that handle metadata in one file and the data in another that I could use as a guide?

An IOSP is free to open other files, just make sure they get closed on the close(). check for the existence of the binary file on the isValidFile() but dont open it until open() is called. You cant keep any state from the isValidFile() method.

GRIB uses index files which are seperate files. Im working on ucar.nc2.iosp.noaa.Ghcnm which is also experimenting with index files. As usual, dont have any great examples.


I also have to figure out where this IOSP lives. Right now I'm just coding in ucar.nc2.iosp.grads (won't check it in until it works), but since the code is not being developed at UCAR, I'm not sure I want to use your licensing which gives all copyright/licensing to UCAR.

Its up to you. If you want to contribute it back, we would need a compatible license. If you do that, you basically give rights to fork the code (i think), in which case i dunno if copyright matters all that much. but i assume you can make copyright anything you want.


Thanks for an help you can give.

Do you want to meet for lunch or a walk next week?

I have my daughter coming in for a visit. let me see what my schedule looks like. A walk sounds good.


Don