Iteration of the vertical slize with y = 0, one of the vertical """Īccording to what I have said before this will plot the second ![]() """ in this dataset each component will be Nc = netCDF4.Dataset(fp) # reading the nc file and creating Dataset To answer your question I commented the code: from matplotlib import pyplot as plt # import librariesįp='uwstemp.nc' # your file name with the eventual path Then a quick way to plot say layer z at time t is: plt.contourf(data) Temp = file2read.variables # var can be 'Theta', 'S', 'V', 'U' etc. The easiest way to read the data is: file2read = netcdf.NetCDFFile(path+'state.nc','r') Say you have your state.nc output.įirst of all make sure you import all you need: from scipy.io import netcdf
0 Comments
Leave a Reply. |