NERSCPowering Scientific Discovery Since 1974


Description and Overview

netCDF4-python is an object oriented python interface to the netCDF C library.  

Loading netCDF4-python on Edison/Cori

module load python/2.7-anaconda

 Using netCDF4-python in the codes

from netCDF4 import Dataset
fx = Dataset("mydir/","w",format="NETCDF4")

Note that netCDF4-python supports various classic netcdf versions, e.g., netcdf3, netcdf3-classic, please make sure the format is consistent when you read and write the data.