On python 3.6 I have a netCDF file that contains global precipitation data with the variables: lat, lon, time, and precip. My ultimate goal is to plot the precip data on a scatter plot and create a trend-line. However I am new to python and am having trouble converting the data in the netCDF file to a format that I can read and easily plot on a scatter plot. Any ideas on how I would go about doing this would be much appreciated. Thank you!
0
votes
1 Answers
1
votes
As also stated in this question's answers, there is
- a netCDF4 module for python: http://unidata.github.io/netcdf4-python/ which can be used to load the data
- a scipy submodule to to load NetCDF data: https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.io.netcdf.netcdf_file.html
How easy or hard it is to directly use the data is then dependend on the data itself. But at least in the scipy case the returned variables are numpy arrays and may directly be plotted if the data is numeric.