pyudv.read_mfprof.mfprof_to_netcdf#

mfprof_to_netcdf(input_mfprof, output_netcdf, add_attr=None, cut_zeros=True)[source]#

Convert a .mfprof file to a netCDF file.

Parameters:
  • input_mfprof (str) – input .mfprof file path

  • output_netcdf (str | object) – output netCDF file path, or netCDF4 object (Dataset, Group) in which the data will be stored.

  • add_attr (dict, optional) – dictionnary containing attributes to be added to the netCDF file, by default None. For example, add_attr = {name: ‘John Smith’, team: ‘the best’}

  • cut_zeros (bool, optional) – If True, cut the measurements data and remove all the trailing 0 added when the measurements are stopped bedore the attributed time, by default True

Examples

>>> mfprof_to_netcdf('input.mfprof', 'output.nc', add_attr = {name: 'John Smith', team: 'the best'}, cut_zeros=True)