Hello,
Thanks for all of your answers.
I think the best way for me is to write a subclass of
thredds.servlet.DatasetSource. However, I didn't see any link to get TDS
source code ?
I'll also take a look at F-TDS and PyDap projects, which seems very
intersting.
I can give you some feedback regarding my progress, if you're intersted in.
Stéphane
On Thu, Jun 4, 2009 at 3:52 PM, Roland Schweitzer <
Roland.Schweitzer@xxxxxxxx> wrote:
> Ethan Davis wrote:
>
> Hi Stéphane,
>
> Stéphane wrote:
>
>
> Stephane:
> Sorry, but I don't have any knowledge about grib generation!
>
> Ethan:
> My grib data is stored in a database, in a specific format.
> The script extract the data from my database and is able to perform
> specific action, like sub grib extraction.
>
> I think the good way is to trigger the script on demand from Thredds.
> But I don't see any way to do call external program from Thredds ?
>
>
> The TDS does not currently have a way to call a script or access a
> database for data retrieval. Besides extracting some data by hand and
> then configuring the TDS to serve that data, the only things that come
> to mind involve writing some Java code. If that is something you are
> interested in, take a look at the following two possibilities:
>
> 1) The thredds.servlet.DatasetSource interface which provides
> implementations with information from the incoming HTTP request and
> response objects that can then be used to locate/build and return a
> netCDF dataset. The TDS Reference Document discusses the DatasetSource
> interface at the following link:
> http://www.unidata.ucar.edu/projects/THREDDS/tech/reference/DatasetSource.html
>
> 2) The ucar.nc2.iosp.IOServiceProvider interface can be implemented to
> read new data formats and represent them through the netCDF-Java API as
> a netCDF dataset. The netCDF-Java Tutorial has a section on the I/O
> Service Provider interface:
> http://www.unidata.ucar.edu/software/netcdf-java/tutorial/index.html
>
> Hope that is helpful.
>
>
>
> By using the DataSource and IOSP plugins to TDS we are able to run
> external programs to create data files on-demand and serve them via TDS. If
> you decide that you want to undertake the job of writing of some Java code
> to implement a similar process you might want to take a look at our code.
> Creating sub-classes of the Task and Tool classes to run your particular
> scripts or external programs might save you some work.
>
> Some details can be found here:
> http://ferret.pmel.noaa.gov/LAS/documentation/the-ferret-thredds-data-server-f-tds
> .
>
> Slides from a talk about F-TDS are here:
> http://go-essp.gfdl.noaa.gov/2008/files/Roland-Schweitzer-GO-ESSP_09_2008.ppt
> .
>
> There's a better talk (more general and not as focused on server-side
> functions) on the OPeNDAP developers wiki, but it seems to be down at the
> moment.
>
> Roland
>
> Ethan
>
>
>
> On Tue, Jun 2, 2009 at 6:59 PM, Ethan Davis
> <edavis@xxxxxxxxxxxxxxxx<mailto:edavis@xxxxxxxxxxxxxxxx>
> <edavis@xxxxxxxxxxxxxxxx>> wrote:
>
> Hi Stéphane,
>
> Where is the GRIB data and what is the script doing to copy/move the
> data into your directory?
>
> Ethan
>
> Stéphane wrote:
> > Hello,
> >
> > I access a set of grib data from a script.
> > I would like to offer these data through Thredds server.
> >
> > I success to manualy extract a grib with my script, put it in a
> > directory and then access it through Thredds. It works fine !
> > But now, I would like that Thredds server automatically call my script
> > to extract the data.
> >
> > Is there any way to do that ?
> >
> > Thanks a lot,
> > Stéphane
>
>
>
>
>
>