nco

Python : Replacing Values in netcdf file using netCDF4

Python : Replacing Values in netcdf file using netCDF4 Question: I have a netcdf file with several values < 0. I would like to replace all of them with a single value (say -1). How do I do that using netCDF4? I am reading in the file like this: import netCDF4 dset = netCDF4.Dataset(‘test.nc’) dset[dset.variables[‘var’] …

Total answers: 4

Combine multiple NetCDF files into timeseries multidimensional array python

Combine multiple NetCDF files into timeseries multidimensional array python Question: I am using data from multiple netcdf files (in a folder on my computer). Each file holds data for the entire USA, for a time period of 5 years. Locations are referenced based on the index of an x and y coordinate. I am trying …

Total answers: 5