<img src="http://nci.org.au/wp-content/themes/nci/img/img-logo-large.png", width=400>
Data Access and Manipulation Using iPython Notebooks
OFAM and Himawari 8
In this notebook:
The following will go through how to: <br >
Access netCDF data locally from /g/data
Extract/view data
Combine data from different datasets
The following material uses the CSIRO Ocean Forcasting Australian Model (OFAM) and the Bureau of Meteorology Himawari 8 Data Collections. For more information on the collection and licensing, please click here for OFAM and here for Himawari 8.
Prerequisites
A Python 3 environment
Setup instructions for python 3 virtual environments can be found here.
Ensure that the VDI modules listed below are loaded in the order listed. If you're uncertain, purge modules and start over (you can do this from inside your Python virtual environment).
The following Python modules need to be installed in your virtual environment:
Numpy
Cython
Cartopy 0.13
Check loaded modules using pip list
If you don't see any of the modules listed, then:
Cartopy needs a version flag (==0.13) because later iterations require Proj4.9, which is not available on the VDI at the time of writing this material.
...should now show the required modules.
Launch the Jupyter Notebook application: ``` $ jupyter notebook ```
Import python libraries
Ocean Forcasting Australian Model (OFAM v3.0) Data
Geonetwork URL: http://geonetwork.nci.org.au/geonetwork/srv/eng/catalog.search#/metadata/f9007_2850_9392_7175
NCI THREDDS Data Server: http://dapds00.nci.org.au/thredds/catalogs/gb6/catalog.html
Open dataset
Take a look at the file contents
Extract and plot global data from single time and depth
Do the same for a smaller subset
Himawari 8
Geonetwork URL: http://geonetwork.nci.org.au/geonetwork/srv/eng/catalog.search#/metadata/f9385_6463_3730_3415
NCI THREDDS Data Server: http://dapds00.nci.org.au/thredds/catalog/rr5/satellite/obs/himawari8/FLDK/catalog.html
This example is from 23-Feb-16 at 0400.
Open dataset
Take a look at the file contents¶
Extract and plot global data
Instead of looking at single band, let's make an RGB image
Do the same for a smaller subset (let's choose roughly the same region as the OFAM subset)
Note: In these examples, the subsets are specified directly by the index value but you could also query based on lat/lon values.
Now let's try and plot both datasets in the same plot...
Cartopy (based on Matplotlib but includes support for different coordinate reference systems)
Note: On the VDI, the Cartopy package will have to be installed locally. Instructions at the end of this notebook if you do not already have Cartopy installed.
Let's first replot the previous Himawari subset
Now let's do the same for the OFAM data
Now combine...
(1) Try playing around with different plotting options. For example, plotting contours instead of using "imshow".
(2) Try merging another dataset of interest with either of the ones above.