NCI data access training
Monash University, July 2017
Trainers
Dr Jingbo Wang
Dr Joseph Antony
Dr Adam Steer
Aims:
Students should leave with an understanding of how to:
1. Access data from NCI remotely using a web coverage service request
directly in a web browser or programmatic web request
using Python's OWSlib
2. Access data remotely using the NetCDF subset service
directly in a web browser or programmatic request
using Python's Siphon library
Assumptions:
Some familiarity with Python 3 and the Jupyter environment
Some familiarity with netCDF files
Students have been provided NCI materials on data discovery
Caution - Many NCI training examples are developed using Python 2.7. This is a Python 3 environment - if in doubt ask us
(or refer to the cheatsheet...)
Task: extracting a data subset from a massive file - ocean colour, 15.65gb
We want to grab ocean colour in a small region off the east coast of Australia (say, the coast of Victoria), but we don't want to download the whole 15gb file to do that. Here is our dataset in the NCI THREDDS catalogue:
http://dapds00.nci.org.au/thredds/catalog/u39/public/data/modis/oc.stacked/v201503/catalog.html
We'll use two different services - Web Coverage Service and the NetCDF Subset Service to get some data.
1. Web Coverage services
Required libraries:
OWSlib
matplotlib
scipy
numpy
io
Reference notebooks:
This example is based on material here: https://github.com/geopython/OWSLib/blob/master/examples/wcs-thredds-prism.py
2. NetCDF subset service and Siphon
Required libraries:
netCDF4
Siphon
numpy
matplotlib
datetime
Reference notebooks:
https://github.com/nci/nci-notebooks/blob/master/Data_Access/Using_Thredds/THREDDS_DataAccess.ipynb
https://github.com/nci/nci-notebooks/blob/master/Data_Access/Using_Siphon/Python_Siphon_II.ipynb
This material is mainly based on the notebook https://github.com/nci/nci-notebooks/blob/master/Data_Access/Using_Siphon/Python_Siphon_II.ipynb and material here: https://unidata.github.io/siphon/examples/ncss/NCSS_Example.html#sphx-glr-examples-ncss-ncss-example-py