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.
You should give more info about the data. What kind of output do you want like export as nc file or dataframe or what ?
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))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.