0

I am learning python and I am working with some netCDF files. Suppose I have temperature data from 1950-2020 and I want data for only 1960-2015. How should I extract it.

2 Answers2

0

You should give more info about the data. What kind of output do you want like export as nc file or dataframe or what ?

updraftman
  • 36
  • 3
0

On linux and macOS, you can do this easily with nctoolkit. Example:

import nctoolkit as nc
ds = nc.open_data("infile.nc")
ds.subset(years = range(1960, 2016))
Robert Wilson
  • 3,192
  • 11
  • 19