mpas_analysis.shared.io.write_netcdf

mpas_analysis.shared.io.write_netcdf(ds, fileName, fillValues={'S1': '\x00', 'f4': 9.969209968386869e+36, 'f8': 9.969209968386869e+36, 'i1': - 127, 'i2': - 32767, 'i4': - 2147483647, 'i8': - 9223372036854775806, 'u1': 255, 'u2': 65535, 'u4': 4294967295, 'u8': 18446744073709551614})[source]

Write an xarray data set to a NetCDF file using finite fill values and unicode strings

Parameters
  • ds (xarray.Dataset object) – The xarray data set to be written to a file

  • fileName (str) – The fileName to write the data set to

  • fillValues (dict) – A dictionary of fill values for each supported data type. By default, this is the dictionary used by the netCDF4 package. Key entries should be of the form ‘f8’ (for float64), ‘i4’ (for int32), etc.