../../../_images/netcdfExamplesInPython.png

Examples#

The examples below will show you how to make NetCDF data CF-Compliant, so that it can be read by Vapor.

Make sure to pick the example that matches the grid type of your data. For information on Vapor’s supported grid types (cartesian, rectilinear, and curvilinear), you can read more here.

A demonstration can be viewed below, and the sample data used in these examples can be downloaded here <https://github.com/NCAR/VAPOR-Data/blob/main/netCDF/simple.nc>.

Note

The Cartesian and Rectilinar grid examples are nearly identical. The only difference is how we define the coordinate variables, using numpy.linspace in the cartesian grid example, and numpy.geomspace in the rectilinear grid example.


cartesianGridExample.py

cartesianGridExample.py

cartesianGridExample.py
rectilinearGridExample.py

rectilinearGridExample.py

rectilinearGridExample.py

Gallery generated by Sphinx-Gallery