Another example on how to write NetCDF files with python. This example is a contribution from Roberto de Almedia Ocean Data Engineer at MarinExplorer. This example is using Puppy , a simple DSL that I wrote to create NetCDF files, it simplifies a lot the previous code. See Writing a netcdf file with python to compare the differences.
Check the entry in the repository