swiftest.io.swiftest_xr2infile

swiftest.io.swiftest_xr2infile#

swiftest.io.swiftest_xr2infile(ds, param, in_type='NETCDF_DOUBLE', infile_name=None, framenum=-1, verbose=True)[source]#

Writes a set of Swiftest input files from a single frame of a Swiftest xarray dataset.

Parameters:
  • ds (SwiftestDataset) – Dataset containing Swiftest n-body data in XV format

  • param (dict) – Swiftest input parameters. This method uses the names of the cb, pl, and tp files from the input

  • in_type (str, default=”NETCDF_DOUBLE”) – Type of input file to write. Options are “NETCDF_DOUBLE”, “NETCDF_FLOAT”, “ASCII”

  • infile_name (PathLike, default=None) – Name of the input file to write. If not passed, the default is to use the name from the input parameters

  • framenum (int (default=-1)) – Time frame to use to generate the initial conditions. If this argument is not passed, the default is to use the last frame in the dataset.

  • verbose (bool, default True) – Print out information about the file being written.

Returns:

None