wavespectra.SpecDataset.to_json#

SpecDataset.to_json(filename, mode='w', date_format='%Y-%m-%dT%H:%M:%SZ')#

Write spectra in json format.

Xarray’s to_dict it used to dump dataset into dictionary to save as a json file.

Args:
  • filename (str): name of output json file.

  • mode (str): file mode, by default w (create or overwrite).

  • date_format(str): strftime format for serializing datetimes.