Re: [netcdf-java] Java API: problems with temporary files


Don Murray wrote:

> 
> - If you have a grib file, say test.grb and index it,then rewrite
> test.grb but it ends up being the same size (maybe you are just changing
> param tables), the index will not get rewritten automatically.  There is
> a method that can be used to set this to always rewrite the index if the
> date has changed, but I can't find docs on what it is.  Perhaps
> it's GribServiceProvider.setIndexSyncMode()?  It would be nice to have
> some javadocs filled in on all these methods, so we know what they
> do.  John?

Ive added

http://www.unidata.ucar.edu/software/netcdf-java/reference/Caching.html

and this javadoc:

  /**
   * This controls the case where the GRIB file has changed, which is detected 
by comparing the GRIB
   *   file length with the file length recorded in the index file. If there is 
no index, one will
be created.
   *   Default is IndexExtendMode.rewrite.
   * <ol>
   * <li>IndexExtendMode.extend: when GRIB file length increases, extend the 
index. This is the case
when the file
   *   is being appended to, as new data arrives.
   * <li>IndexExtendMode.rewrite: when GRIB file length changes, rewrite the 
index. This is the
safest thing to do,
   *   at the expense of performance.
   * <li>IndexExtendMode.none: never modify an existing index. If there is no 
index, one will be
created.
   * </ol>
   * @param mode IndexExtendMode when file is opened
   */
  static public void setIndexExtendMode(IndexExtendMode mode);


note that it uses file length, not last modified.

thanks for your comments


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