Skip to content
cheryldmorse edited this page Mar 17, 2017 · 54 revisions

NcSOS adds a OGC SOS service to your existing THREDDS server.

#Table of Contents
Installation
Supported Datasets
Setup for Developers
Development Roadmap

You will need a working THREDDS installation of a least 4.3.16 to run NcSOS. More specific or recent THREDDS dependencies will be described in the release notes or below in the installation section.

# Installation 1. If you are upgrading to a new version of ncSOS then delete the current ncSOS version from the `$TOMCAT_HOME/webapps/thredds/WEB-INF/lib` directory. 2. If you are **upgrading from a version pre RC9** then * Delete the sos-servlet.xml configuration file from the $TOMCAT_HOME/webapps/thredds/WEB-INF directory. * Remove the following two sos servlet mappings from the $TOMCAT_HOME/webapps/thredds/WEB-INF/web.xml file:
     ```xml
     <servlet>
        <servlet-name>sos</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
     </servlet>
     ```

     ```xml
     <servlet-mapping>
        <servlet-name>sos</servlet-name>
        <url-pattern>/sos/*</url-pattern>
     </servlet-mapping>
    ```
  1. Download ncSOS
  2. Copy the ncSOS jar file into your $TOMCAT_HOME/webapps/thredds/WEB-INF/lib directory.
  3. Add the following service definition to enable SOS in your THREDDS catalog XML files:
    <service name="sos" serviceType="SOS" base="/thredds/sos/" />
  4. Restart the web application server.

Alternatively, you can download a THREDDS war file that is pre-setup with NcSOS (bypassing the above installation steps) here.

Aggregation of netCDF Datasets

See the known issues for a note on NCML aggregation problems.

Aggregated netcdf files can be served through the catalog by using NCML. NcML is an XML representation of netCDF metadata, more information on NCML can be found at the unidata website here. In short NCML aggregation offers a seemless view and data access across multiple netcdf files.

Unidata also offers a Basic NCML tutorial here, with a tutorial geared towards NCML aggregation here. There are a number of different methods for agreegating Netcdf data through NCML, it is suggest that you read the above tutorials, particually the NCML agreegation one, and decide the best method for aggregating your data.

A simple example aggregation, using a simple union can be seen below. The example implemention outlines some of the steps you should take.

  1. identify how you are going to aggregate your netcdf data (in this example taken from Unidata's NCML aggregation page we are using an aggregation on an existing dimension named "time", this might be a typical approach for the aggregation of time series files.

  2. generate an NCML file using a text editor, something like this...

<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
 <aggregation dimName="time" type="joinExisting">
   <netcdf location="jan.nc" />
   <netcdf location="feb.nc" />
 </aggregation>
</netcdf>

In the NCML file we can see the dimension we what to join on ("time"), and the netcdf files we are aggregating together ("jan.nc", "feb.nc"). We could now open this NCML files in something like toolsui (toolsui.jar is a java application available from unidata's website, great for viewing netcdf files)

  1. With the NCML file generated we just need to add it to the THREDDS catalog, this can be done the same as any other netcdf dataset.
# Supported Datasets

NcSOS works with datasets that can be loaded as an ANY_POINT FeatureType using the NetCDF-Java library. A mapping from CF-1.6 Discrete Sampling Geometries to NetCDF-Java Point Feature Types to NcSOS offerings is below.

Note: NetCDF-Java added support for the CF-1.6 Discrete Sampling Geometries in version 4.3. Any version prior to 4.3 will not work with NcSOS.

CF-1.6 NetCDF-Java What NcSOS Offers
Point PointFeature Point
Many Points PointFeatureCollection Many Points
Profile ProfileFeature Profile
Many Profiles ProfileFeatureCollection Many Profiles
Timeseries StationTimeSeriesFeature Timeseries
Many Timeseries StationTimeSeriesFeatureCollection Many Timeseries
TimeseriesProfile StationProfileFeature TimeseriesProfile
Many TimeseriesProfiles StationProfileFeatureCollection Many TimeseriesProfiles
Trajectory TrajectoryFeature Trajectory
Many Trajectories TrajectoryFeatureCollection Many Trajectories
TrajectoryProfile SectionFeature Trajectory with a profile of data (ranging Z) at each point
Many TrajectoryProfiles SectionFeatureCollection Many Trajectories with a profile of data (ranging Z) at each point

Compatible Templates

Working NetCDF templates for all types of the CF-1.6 Discrete Sampling Geometries are available for reference when creating files for NcSOS to serve. Each of these templates aligns with a corresponding CF-1.6 example. Each template folder has a description of the type of data used in each file and when to use such an encoding.

One or more parameters measured at a point in time and space.

Example: You went out on a boat one day and measured a few parameters. Some unrelated time in the future, you went out to a completely different point and measured a few parameters. The measurements have nothing in common. This could be represented as a CF-1.6 Point dataset containing two points.

Templates: https://github.com/asascience-open/CFPointConventions/tree/master/point

One or more parameters measured at a point space with varying time.

Example: Two wind sensors measuring wind speed and wing gust every 6 minutes for a year. The sensors did not move from their geographic location during the year. This could be represented as a CF-1.6 Timeseries dataset containing two 'stations'.

Templates: https://github.com/asascience-open/CFPointConventions/tree/master/timeSeries

A set of data points along a vertical line.

Example: The timeseries produced from bottom mounted ADCP.

Templates: https://github.com/asascience-open/CFPointConventions/tree/master/timeSeriesProfile

A set of data points along a 1D curve in time and space.

Example: A glider moving through the water column in the x,y, and z dimentions, and taking readings at its location.

Templates: https://github.com/asascience-open/CFPointConventions/tree/master/trajectory

Profiles taken along a trajectory.

Example: A glider moving through the water column in the x,y, and z dimentions, making water column profiles as it moves.

Templates: https://github.com/asascience-open/CFPointConventions/tree/master/trajectoryProfile

Will my dataset work?

If you already have your dataset in a THREDDS server, you can test if it will work with NcSOS by using the ToolsUI program from the NetCDF-Java library. You can Webstart the ToolsUI application here: ToolsUI JNLP Webstart.

Enter your OPeNDAP Data endpoint from THREDDS OPeNDAP Link

Into the ToolsUI FeatureTypes / PointFeature tab and press enter: Enter DAP URL into ToolsUI

If you see a row of data here, you are in good shape so far!

Working file!

Clicking through rows!

Supported Output Formats

IOOS SWE (text/xml;schema="om/1.0.0/profiles/ioos_sos/1.0")

GetCapabilities

DescribeSensor

GetObservation

All SWE output templates are wrapped in an O&M 1.0 wrapper

OOSTethys SWE ("text/xml; subtype='om/1.0.0'")

GetCapabilities

DescribeSensor

GetObservation

# Setup for Developing ncSOS * [Maven Installation/Use](http://github.com/asascience-open/ncSOS/wiki/Maven) * [Testing Setup](http://github.com/asascience-open/ncSOS/wiki/Testing) # Development Roadmap ## Current (RC8) * IOOS [Milestone 1.0](https://code.google.com/p/ioostech/source/browse/#svn/trunk/templates/Milestone1.0) SWE output for [GetCapabilities](https://code.google.com/p/ioostech/source/browse/trunk/templates/Milestone1.0/OM-GetObservation.xml), DescribeSensor ([Network](https://code.google.com/p/ioostech/source/browse/trunk/templates/Milestone1.0/SML-DescribeSensor-Network.xml), [Station](https://code.google.com/p/ioostech/source/browse/trunk/templates/Milestone1.0/SML-DescribeSensor-Station.xml)), and GetObservation (TimeSeries, TimeSeriesProfile).

1.0

  • Better testing and documentation
  • Integration with THREDDS 4.4.1
  • Verification of side by side 52North and ncSOS deployments.

1.1

  • Add GetObservation Trajectory and TrajectoryProfile responses (IOOS SWE Milestone 1.0)
  • Add SensorML response for individual sensors
  • Crosswalk SensorML generation with the "platform" variable concepts in the US NODC netCDF templates.
  • Add csv output format

2.0

  • Implement SOS 2.0 specification
  • add additional data output formats (CSV, geoJSON)

Future

  • Support for SOS, SWE, SensorML, and O&M 2.0
  • Add kml output format
  • Support for HDF5/netCDF4 hierarchical data sets using groups
  • coordinate with Unidata to integrate ncSOS into THREDDS development cycle