-Dtds.content.root.path=/opt/tomcat-home/content/For example, your {tomcat}/bin/setenv.sh might look like:
#!/bin/sh # ulimit -n 2048 # CATALINA_HOME="/opt/tomcat-home" export CATALINA_HOME CATALINA_BASE="/opt/tomcat-home" export CATALINA_BASE JAVA_HOME="/opt/jdk" export JAVA_HOME # CONTENT_ROOT="-Dtds.content.root.path=/data/thredds/tds-dev/content" NORMAL="-d64 -Xmx4090m -Xms512m -server" MAX_PERM_GEN="-XX:MaxPermSize=256m" HEADLESS="-Djava.awt.headless=true" JAVA_PREFS_SYSTEM_ROOT="-Djava.util.prefs.systemRoot=$CATALINA_BASE/content/thredds/javaUtilPrefs -Djava.util.prefs.userRoot=$CATALINA_BASE/content/thredds/javaUtilPrefs" # JAVA_OPTS="$CONTENT_ROOT $NORMAL $MAX_PERM_GEN $HEADLESS $JAVA_PREFS_SYSTEM_ROOT" export JAVA_OPTS
Troubleshooting:
Don't leave a space after the =
CONTENT_ROOT="-Dtds.content.root.path=/data/thredds/tds-dev/content" not CONTENT_ROOT= "-Dtds.content.root.path=/data/thredds/tds-dev/content"
If the content root is not correctly set, you will see a message like: "SEVERE: Error listenerStart" in {tomcat}/logs/catalina.out and "Error creating bean with name 'tdsContext'", and "Content directory not a directory" in {$tomcat}/logs/localhost.log.
We recommend that you use an absolute path, like /opt/tomcat/content, instead of a reletive path like "../content".
Note that your catalogs are under ${tomcat}/content/thredds but tds.content.root.path does not include the thredds subdirectory.
Example 4.3 catalog:
<featureCollection featureType="GRIB" name="GFS-Global_onedeg" path="grib/NCEP/GFS/Global_onedeg"> <collection spec="/data/ldm/pub/native/grid/NCEP/GFS/Global_onedeg/.*grib2$" dateFormatMark="#GFS_Global_onedeg_#yyyyMMdd_HHmm" timePartition="1 day" olderThan="5 min"/> <update startup="nocheck" trigger="allow"/> <tdm startup="true" rescan="0 8,23,38,53 * * * ? *" trigger="allow"/> <gribConfig datasetTypes="Best LatestFile Files" /> </featureCollection>
For version 4.5 should be:
<featureCollection featureType="GRIB2" name="GFS-Global_onedeg" harvest="true" path="grib/NCEP/GFS/Global_onedeg"> <collection spec="/data/ldm/pub/native/grid/NCEP/GFS/Global_onedeg/.*grib2$" dateFormatMark="#GFS_Global_onedeg_#yyyyMMdd_HHmm" timePartition="directory" olderThan="5 min"/> <update startup="never" trigger="allow"/> <tdm rewrite="test" rescan="0 8,23,38,53 * * * ? *" trigger="allow"/> <gribConfig datasetTypes="TwoD Best LatestFile Files" /> </featureCollection>
For complete information, see GRIB Collections and TDM.
<service name="ncss" serviceType="NetcdfSubset" base="/thredds/ncss/grid"/>to:<service name="ncss" serviceType="NetcdfSubset" base="/thredds/ncss/"/>
An old (4.3) NCSS URL:
http://thredds.ucar.edu/thredds/ncss/grid/grib/NCEP/GFS/Global_0p5deg/best/dataset.htmlShould be changed in version 4.5 to:
http://thredds.ucar.edu/thredds/ncss/grib/NCEP/GFS/Global_0p5deg/best/dataset.htmlNote the only difference is the absence of "grid" after "thredds/ncss" in the URL.
Rectangle2D hr = new Rectangle2D.Double(); hr.setRect(prect.getX(), prect.getY(), prect.getWidth(), prect.getHeight());