Re: [thredds] THREDDS directory scanning question

  • To: Brian Blanton <bblanton@xxxxxxxxx>
  • Subject: Re: [thredds] THREDDS directory scanning question
  • From: Christian Ward-Garrison <cwardgar@xxxxxxxx>
  • Date: Tue, 15 Sep 2015 17:52:30 -0600
Hi Brian,

There is currently no way to specify a filter that accepts a collection
(directory) only if it contains at least one *.nc file. Well, technically
there is (crawlableDatasetFilterImpl), but it's not documented and is
slated to be removed in 5.0 anyway [1]. Plus, you'd have to write the logic
in Java and add it to the classpath when you ran the TDS. Tedious.

An idea: in your catalog-building script, instead of explicitly including
individual NetCDF files, you might instead try explicitly *excluding*
directories with no NetCDF files in them.

Cheers,
Chrisitan

[1]
http://www.unidata.ucar.edu/software/thredds/v5.0/tds/UpgradingTo5.html#_datasetscan

On Mon, Sep 14, 2015 at 12:31 PM, Brian Blanton <bblanton@xxxxxxxxx> wrote:

> Hi All,  I have a directory scanning question.  I want to expose only
> netCDF files in a large directory structure that will have many directories
> without netCDF files.   If a directory does not have a netCDF file, I need
> to have it hidden.
>
> So, if I have
>
> dir1/subdir1/<bunch of files but NO netCDF files>
> dir1/subdir2/<bunch of files and some netCDF files>
>
> I only want dir1/subdir2/<netcdf files>  to be in the catalog, and not
> dir1/subdir1 with nothing at the endpoint.
>
> I can make a script that builds a catalog file that explicitly contains
> the netCDF files, but would rather do this with datasetScan.  I was hoping
> that the following would exclude everything except netCDF files.
>
> <filter>
>     <include wildcard="*.nc" collection="false"/>
>     <exclude wildcard="/*" collection="true"/>
> </filter>
>
> I hope I've articulated this well.  If anyone has any guidance, that would
> be great.
>
>
> Cheers,
>
>
> Brian O. Blanton, Ph.D.
> Director of Environmental Initiatives
> Oceanographer
> Renaissance Computing Institute
> University of North Carolina at Chapel Hill
> 100 Europa Drive
> Suite 540 Chapel Hill, NC, 27517
>
> Brian_Blanton@xxxxxxxxx
> 919-445-9620 (O)
>
>
> _______________________________________________
> thredds mailing list
> thredds@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> http://www.unidata.ucar.edu/mailing_lists/
>

PNG image

  • 2015 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: