0

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!

CPG
  • 97
  • 2
  • 15
  • 1
    Scipy can read netCDF. [Documentation](https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.io.netcdf.netcdf_file.html) – Jerry Zhao May 31 '17 at 22:03
  • I haven't tested recent version of SciPy, but unidata module is better imo, see @ ImportanceOfBeingErnest answer – kakk11 Jun 01 '17 at 11:18

1 Answers1

1

As also stated in this question's answers, there is

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.

ImportanceOfBeingErnest
  • 321,279
  • 53
  • 665
  • 712