Accessing data via a THREDDS Catalogue

Overview

Some collections in the CSIRO Data Access Portal use a THREDDS catalogue. This is an alternative method for downloading a subset of data using coordinates and variables. Find out more about THREDDS Catalogues.

Netcdf subset service

The Netcdf subset service (NCSS) within the THREDDS catalogue allows subsetting of datasets by coordinates. Find out more about NetCDF Subset Service.

Two options are available:

  1. Point data subsets can be returned in CSV, XML, WaterML, netCDF files
  2. Gridded data subsets can be returned in netCDF-3 or netCDF-4 files

Example accessing NCSS from the CSIRO Data Access Portal

Below are two examples using NCSS for point subsets and gridded data subsets using the following CSIRO Data Acess Portal collection:

Durrant, Thomas; Hemer, Mark; Smith, Grant; Trenham, Claire; Greenslade, Diana (2019): CAWCR Wave Hindcast – Aggregated Collection. v1. CSIRO. Service Collection. http://hdl.handle.net/102.100.100/137152?index=1

Point subset example

Point datasets contain a collection of point features which can be subset by space and time.

  • Choose the gridded folder and a time period.
    • Files represent one month of data, eg.  ww3.pac_4m.201907.nc 201907 = year 2019 and month 07 or July

  • Choose ‘6. NetcdfSubset’
  • Choose ‘Grid point as dataset’ (at the top of the page)
  • Add your latitude and longitude (at the right of the page)
    • For this example: lat: -10, long: 150 (see image below)
  • Choose the following variables (at the left of the page)
    • For this example:
    • Dir (= wave mean direction)
    • Hs (= significant height of wind and swell waves)
    • t0m1 (=mean period T01)
  • Choose output format i.e. csv

  • Choose submit (at the bottom of the page)
    • A browser page will open with your data and you can save it as a csv file.

How to choose another monthly file

The URL for the data can be changed to a different monthly file.

For example the URL from the search above (available from page bottom) is

http://data-cbr.csiro.au/thredds/ncss/catch_all/CMAR_CAWCR-Wave_archive/CAWCR_Wave_Hindcast_aggregate/gridded/ww3.pac_4m.201812.nc?var=dir&var=hs&var=t01&latitude=-10&longitude=-150&time_start=2018-12-01T00%3A00%3A00Z&time_end=2018-12-31T23%3A00%3A00Z&accept=csv

To change the URL above to the 201805 monthly file

  • Change ww3pac_4m.201812 to ww3pac_4m.201811
  • Change time_start=2018-12 to time_start=2018-11
  • The amended URL is now

http://data-cbr.csiro.au/thredds/ncss/catch_all/CMAR_CAWCR-Wave_archive/CAWCR_Wave_Hindcast_aggregate/gridded/ww3.pac_4m.201811.nc?var=dir&var=hs&var=t01&latitude=-10&longitude=150&time_start=2018-11-01T00%3A00%3A00Z&time_end=2018-11-30T23%3A00%3A00Z&accept=csv

Gridded subset example

A Grid Dataset is a collection of Grids which have horizontal (x,y) coordinates, and optional vertical and time coordinates. Grid data points next to each other in index space are next to each other in coordinate space.

  • Choose the gridded folder and a time period.
    • Files represent one month of data, eg.  ww3.pac_4m.201907.nc 201907 = year 2019 and month 07 or July

  • Choose submit

This will take longer to produce than the first example as there are multiple data points to process. The file will download automatically when finished.

How to choose another monthly file

The URL for the data can be changed to a different monthly file.

For example the URL from the search above which is available from the bottom of the page

http://data-cbr.csiro.au/thredds/ncss/catch_all/CMAR_CAWCR-Wave_archive/CAWCR_Wave_Hindcast_aggregate/gridded/ww3.pac_4m.201812.nc?var=dir&var=hs&var=t01&north=-30&west=140&east=150&south=-40&disableProjSubset=on&horizStride=1&time_start=2018-12-01T00%3A00%3A00Z&time_end=2018-12-31T23%3A00%3A00Z&timeStride=1&accept=netcdf

You can change the monthly data file by amending the URL.

To change the URL above to the 201805 montly file

  • Change ww3pac_4m.201812 to ww3pac_4m.201811
  • Change time_start=2018-12 to time_start=2018-11 and time_end=2018-12 to time_end=2018-11
  • The amended URL

http://data-cbr.csiro.au/thredds/ncss/catch_all/CMAR_CAWCR-Wave_archive/CAWCR_Wave_Hindcast_aggregate/gridded/ww3.pac_4m.201811.nc?var=dir&var=hs&var=t01&north=-30&west=140&east=150&south=-40&disableProjSubset=on&horizStride=1&time_start=2018-11-01T00%3A00%3A00Z&time_end=2018-11-31T23%3A00%3A00Z&timeStride=1&accept=netcdf

Extract timeseries data at a point using OPeNDAP

CAWCR Wave Hindcast extract timeseries data at a point using OPeNDAP remote file access with python’s xarray.

This notebook demonstrates how to find files available on THREDDS in a given catalogue using the siphon tool, and pass them as a list to xarray to open as a “multifile dataset”.

https://gist.github.com/hot007/2e482b951603670f24ee03b4e7de4b9f

Please note:

You will need to add your point coordinate of interest.

These instructions have been developed with this timeseries:

Durrant, Thomas; Hemer, Mark; Trenham, Claire; Greenslade, Diana (2013): CAWCR Wave Hindcast 1979-2010. v10. CSIRO. Service Collection. http://hdl.handle.net/102.100.100/13165?index=1

Other timeseries are available and you will need to update this code to reflect the timeseries data location and run it separately.

Durrant, Thomas; Hemer, Mark; Trenham, Claire; Greenslade, Diana (2013): CAWCR wave hindcast extension Jan 2011 – May 2013. v7. CSIRO. Service Collection. http://hdl.handle.net/102.100.100/13680?index=1

Durrant, Thomas; Hemer, Mark; Smith, Grant; Trenham, Claire; Greenslade, Diana (2015): CAWCR Wave Hindcast extension June 2013 – July 2014. v4. CSIRO. Service Collection. http://hdl.handle.net/102.100.100/22670?index=1