I would like to extract a spatial subset of a rather large netcdf file. From Loop through netcdf files and run calculations - Python or R
from pylab import
If you are working in Linux or macOS this can be handled very easily using nctoolkit (https://nctoolkit.readthedocs.io/en/latest/):
import nctoolkit as nc
data = nc.open_data('/usgs/data2/rsignell/models/ncep/narr/air.2m.1989.nc')
data.crop(lon = [-(96+31/60), -(89+5/6)], lat = [40 + 36/60, 43 + 30/60])