savegrid

DimArray.savegrid(fname, format='surfer', **kwargs)

Save the array data to an ASCII or binary file. The array must be 2 dimension.

Parameters
  • fname – (string) File name.

  • format – (string) File format [surfer | bil | esri_ascii | micaps4].

  • description – (string) Data description - only used for micaps4 file.

  • date – (datetime) Data datetime - only used for micaps4 file.

  • hours – (int) Data forcasting hours - only used for micaps4 file.

  • level – (float) Data vertical level - only used for micaps4 file.

  • smooth – (int) 1 or 0 - only used for micaps4 file.

  • boldvalue – (int) Bold contour value - only used for micaps4 file.

  • proj – (ProjectionInfo) Data ProjectionInfo - only used for micaps4 file.

  • float_format – (string) Float number format, such as ‘%.2f’.

Examples:

>>> data.savegrid('C:/Temp/test.txt', float_format='%.2f')