Opening and visualizing a netCDF file in Python
Author: ORNL DAAC
Date: March 21, 2018
Contact for ORNL DAAC: email@example.com
Keywords: Python, netCDF, CSV, visualization, SoilSCAPE, soil moisture
This tutorial demonstrates how to open and explore the netCDF file, visualize the data, and export to a comma-separated file (CSV). This tutorial is intended for the users with novice-level programming skills. However, it is expected that the users familiarize themselves with key aspects of netCDF climate and forecast (CF) metadata convention before starting the tutorials.
The source data is a netCDF file (soil_moist_20min_Kendall_AZ_n1400.nc) consisting of volumetric root zone soil moisture data from a location in Kendall, Arizona, USA. This data was collected as a part of SoilSCAPE (Soil moisture Sensing Controller and oPtimal Estimator) project (https://daac.ornl.gov/cgi-bin/dsviewer.pl?ds_id=1339)
Python 2.7 or later. Python modules: netCDF4, numpy, pandas, matplotlib
You can access the Jupyter Notebook here.