code: def write_NetCDF_georeference(origin, outfile):
      
  
      geo_ref = ensure_geo_reference(origin)
      geo_ref.write_NetCDF(outfile)
      return geo_ref
docs: Write georeference info to a netcdf file, usually sww.
  
      The origin can be a georef instance or parameters for a geo_ref instance
  
      outfile is the name of the file to be written to.