Requirements
- Java and tomcat versions listed here
-
On the command line when starting up Tomcat/TDS, you must specify
-Dtds.content.root.path=<content root>where<content root>points to the top of the content directory. Note, in this exmaple, that this is/data/content/, not/data/content/thredds/. Don’t forget the trailing slash. For example:-Dtds.content.root.path=/data/content/
Overview
The configuration catalogs and internal state of the TDS has been extensively re-worked to be able to scale to large numbers of catalogs, datasets, and internal objects without excessive use of memory.
A running TDS can be triggered to reread the configuration catalogs without having to restart.
It can be configured to reread only changed catalogs, for fast incremental updates. Other features have been added to make writing configuration catalogs more maintainable, including the <catalogScan> element, and default and standard services.
The other major enhancement is that GridDataset is replaced by FeatureDatasetCoverage, to better support very large feature collections.
The Coverage API works with coordinate values (not array indices), which solves various intractable problems that arise when using array index subsetting on large collections.
A number of API enhancements have been made to take advantage of evolution in the Java language, for example try-with-resource and foreach constructs. The use of these make code simpler and more reliable.
Deprecated classes and methods have been removed, and the module structure and third-party jar use has been improved.
TDS Data Services
Netcdf Subset Service (NCSS)
NCSS queries and responses have been improved and clarified. Generally the previous queries are backwards compatible. See NCSS Reference for details.
New functionality:
- 2D time can now be handled for gridded datasets, with addition of
runtimeandtimeOffsetparameters. - Handling of interval coordinates has been clarified.
- Use
ensCoordto select an ensemble member.
Minor syntax changes:
- Use
time=allinstead oftemporal=all - For station datasets,
subset=stnsorsubset=bbis not needed. Just definestnsor a bounding box.
ThreddsConfig.xml
You no longer turn catalog caching on or off, but you can control how many catalogs are cached (see here for the new syntax).
The following is no longer used:
<Catalog>
<cache>false</cache>
</Catalog>
- By default, most services are enabled, but may still be turned off in
threddsConfig.xml.
WMS/ Godiva
TDS 5.x uses the edal-java library (formerly ncWMS 1.x). As this is a major version change to that library, there may be some breaking changes. See also the edal user guide and the changes from ncWMS 1.x.
ncISO services
To use the ncISO services, you must add the tds-plugin-jar-with-dependencies.jar artifact to your TDS for TDS versions >= 5.5.
For TDS versions prior to 5.5 this artifact was included in the TDS war file.
See ncISO configuration for more details.
Java Web Start
Java Web Start has been deprecated as of Java 9, and has been removed in Java 11, which is the Long-term Release post-Java 8. Due to these changes, the netCDF-Java project no longer provide Java Web Start files as of version 5.0. Following suite, the TDS no longer provide any Web Start based Viewers on Dataset pages out of the box.
Catalogs
Catalog Schema Changes
Schema version is now 1.2.
Client Catalogs
<service>elements may not be nested inside of<dataset>elements, they must be directly contained in the<catalog>element.
Server Configuration Catalogs
- The
<catalogScan>element is now available, which scans a directory for catalog files (any file ending in xml) - The
<datasetFmrc>element is no longer supported <datasetRoot>elements may not be contained inside of service elements, they must be directly contained in the<catalog>element<service>elements may not be nested inside of<dataset>elements, they must be directly contained in the<catalog>element.<service>elements no longer need to be explicitly defined in each config catalog, but may reference user defined global services- If the
datatype/featureTypeis defined for a dataset, then the<service>element may be omitted, and the default set of services for thatdatatypewill be used. - The
expiresattribute is no longer used.
Viewers
thredds.servlet.ViewerhasInvDatasetImplchanged toDatasetthredds.servlet.ViewerLinkProviderhasInvDatasetImplchanged toDatasetthredds.server.viewer.dataservice.ViewerServicehasInvDatasetImplchanged toDataset
DatasetScan
addIDis no longer needed, ids are always addedaddDatasetSizeis no longer needed, the dataset size is always added- With
addLatest, theservicename is no longer used, it is alwaysResolver, and the correct service is automatically added. UseaddLatestattribute for simple case. fileSort: by default, datasets at each collection level are listed in increasing order by filename. To change to decreasing order, use the fileSort element.sort: deprecated in favor offilesSort- User pluggable classes implementing
UserImplType(crawlableDatasetImpl,crawlableDatasetFilterImpl,crawlableDatasetLabelerImpl,crawlableDatasetSorterImpl) are no longer supported. (This was never officially released or documented). DatasetScandetails are here
Standard Services
- The TDS provides standard service elements, which know which services are appropriate for each Feature Type.
- User defined services in the root catalog are global and can be referenced by name in any other config catalog.
- User defined services in non-root catalogs are local to that catalog and override (by name) any global services.
- All services are enabled unless explicitly disabled. ** Except for remote catalog services.
- Standard service details are here)
Feature Collections
- The
updateelement default is nowstartup="never", meaning do not update collection on start up, and use existing indices when the collection is accessed. -
The
fileSortelement is now inside thefeatureCollectionitself, so it can be processed uniformly for all types of feature collections. When a collection shows a list of files, the files will be sorted by increasing name. To use a decreasing sort, use the element<filesSort increasing="false" />inside thefeatureCollectionelement. This supersedes the old way of placing that element in the<gribConfig>element, or the older verboselexigraphicByNameelement:<filesSort> <lexigraphicByName increasing="false" /> // deprecated </filesSort> - Feature Collection details are here
Recommendations for 5.x catalogs
- Put all
<datasetRoot>elements in root catalog. - Put all
<catalogScan>elements in root catalog. - Use
StandardServiceswhen possible. Annotate your datasets withfeatureType/dataType. - Put all user-defined
<service>elements in root catalog. - Only use user-defined
<service>elements in non-root catalogs when they are experimental or truly a special case.
Recommendations for ESGF
You must determine the number of datasets that are contained in all of your catalogs.
To get a report, enable Remote Management, and from https://server/thredds/admin/debug, select “Make Catalog Report”.
This may take 5-20 minutes, depending on the numbers of catalogs.
Add the <ConfigCatalog> element to threddsConfig.xml:
<ConfigCatalog>
<keepInMemory>100</keepInMemory>
<reread>check</reread>
<dir>/tomcat_home/content/thredds/cache/catalog/</dir>
<maxDatasets>1000000</maxDatasets>
</ConfigCatalog>
where:
keepInMemory: using the default value of 100 is probably good enough.reread: use value of check to only read changed catalogs when restarting TDS.diris where the catalog cache files are kept. Use the default directory (or symlink to another place) unless you have a good reason to change.maxDatasets: this is the number you found in step 1. Typical values for ESGF are 1 - 7 million. This is a maximum, so it’s ok to make it bigger than you need.
Here are some additional, optional changes you can make to increase maintainability:
- Place all
datasetRootelements in the top catalog - Place all
serviceelements in the root catalog (catalog.xml). These can be referenced from any catalog. - Remove
<service>elements from non-root catalogs. - Add a
catalogScanelement to the root catalog, replacing the list ofcatalogRefs listing all the other catalogs.- This assumes that other catalogs live in a subdirectory under the root, for example
${tds.content.root.path}/thredds/esgcet/**.
- This assumes that other catalogs live in a subdirectory under the root, for example
For example:
<?xml version='1.0' encoding='UTF-8'?>
<catalog name="ESGF Master Catalog" version="1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0"
xsi:schemaLocation="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0 https://schemas.unidata.ucar.edu/thredds/InvCatalog.1.2.xsd">
<datasetRoot location="/esg/data" path="esg_testroot"/>
<datasetRoot location="/esg/arc/data/" path="esg_obs4MIPs"/>
<datasetRoot location="/esg/cordex/data/" path="esg_cordex"/>
<datasetRoot location="/esg/specs/data/" path="esg_specs"/>
<service base="/thredds/dodsC/" desc="OpenDAP" name="gridded" serviceType="OpenDAP">
<property name="requires_authorization" value="false"/>
<property name="application" value="Web Browser"/>
</service>
<service base="" name="fileservice" serviceType="Compound">
<service base="/thredds/fileServer/" desc="HTTPServer" name="HTTPServer" serviceType="HTTPServer">
<property name="requires_authorization" value="true"/>
<property name="application" value="Web Browser"/>
<property name="application" value="Web Script"/>
</service>
<service base="gsiftp://cmip-bdm1.badc.rl.ac.uk/" desc="GridFTP" name="GridFTPServer" serviceType="GridFTP">
<property name="requires_authorization" value="true"/>
<property name="application" value="DataMover-Lite"/>
</service>
<service base="/thredds/dodsC/" desc="OpenDAP" name="OpenDAPFiles" serviceType="OpenDAP">
<property name="requires_authorization" value="false"/>
<property name="application" value="Web Browser"/>
</service>
</service>
<catalogScan name="ESGF catalogs" path="esgcet" location="esgcet" />
</catalog>