Difference between revisions of "Thredds"
From MohidWiki
(No difference)
|
Revision as of 13:25, 22 October 2008
Thredds (Thematic Realtime Environmental Distributed Data Services) is a tomcat servlet that serves xml catalogs of openDAP datasets.
Contents
Setup
A working tomcat server is a prerequisite. Simply copy the thredds.war file obtained from the thredds homepage into the tomcat webapps directory.
data.mohid.com
- How do I restart the tomcat and thredds server in data.mohid.com?
> cd /home/guillaume/Software/las7/tomcat/tomcat/bin > ./Tomcat5.sh start
- How do I know if tomcat is running?:
> netstat -tlnap | grep 8080
Directory tree structure
$TOMCAT_HOME/content/thredds
- catalog.xml: catalog file containing all the netcdf datasets.
Building thredds urls
Dataset
- Viewing a ${catalog} file tree named ${catalog}.xml:
http://data.mohid.com:8080/thredds/${catalog}.html
- Viewing a specific ${dataset} thredds metadata:
http://data.mohid.com:8080/thredds/${catalog}.html?dataset=${dataset.id}
- Viewing a specific ${dataset}:
http://data.mohid.com:8080/${dataset.service.base}/${dataset.urlpath}
DatasetScan
- Viewing a particular ${datasetscan} tree from any ${catalog} in the thredds server:
http://data.mohid.com:8080/thredds/catalog/${datasetscan.path}/catalog.html
- Viewing a specific ${datasetscan.filteredfilename} thredds metadata:
http://data.mohid.com:8080/thredds/catalog/${datasetscan.path}/catalog.html?dataset=${datasetscan.id}/${datasetscan.filteredfilename}.nc.html
- Viewing a specific ${datasetscan.filteredfilename} dataset:
http://data.mohid.com:8080/${datasetscan.service.base}/${datasetscan.path}/${datasetscan.filteredfilename}.nc.html
A sample catalog file
[XML]
<?xml version="1.0" encoding="UTF-8"?> <catalog name="MOHID THREDDS Server Catalog" xmlns="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0" xmlns:xlink="http://www.w3.org/1999/xlink"> <service name="MOHID DODS" serviceType="OpenDAP" base="/thredds/dodsC/" /> <datasetRoot path="test" location="content/testdata/"/> <dataset name="Test Single Dataset" ID="testDataset" serviceName="MOHID DODS" urlPath="test/testData.nc"/> <datasetScan name="Test all files in a directory" ID="testDatasetScan" path="testAll" location="content/testdata"> <metadata inherited="true"> <serviceName>MOHID DODS</serviceName> </metadata> <filter> <include wildcard="*.nc"/> </filter> </datasetScan> <catalogRef xlink:title="Test Enhanced Catalog" xlink:href="enhancedCatalog.xml" name=""/> </catalog>