Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Added new variables to pyton io
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Apr 28, 2023
1 parent 5136422 commit 6617319
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions python/swiftest/swiftest/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"ENCOUNTER_CHECK",
"TSTART",
"DUMP_CADENCE",
"ENCOUNTER_SAVE")
"ENCOUNTER_SAVE",
"COARRAY")

# This list defines features that are booleans, so must be converted to/from string when writing/reading from file
bool_param = ["RESTART",
Expand All @@ -46,7 +47,8 @@
"ENERGY",
"GR",
"YARKOVSKY",
"YORP"]
"YORP",
"COARRAY"]

int_param = ["ISTEP_OUT", "DUMP_CADENCE"]
float_param = ["T0", "TSTART", "TSTOP", "DT", "CHK_RMIN", "CHK_RMAX", "CHK_EJECT", "CHK_QMIN", "DU2M", "MU2KG",
Expand All @@ -59,7 +61,7 @@

# This defines Xarray Dataset variables that are strings, which must be processed due to quirks in how NetCDF-Fortran
# handles strings differently than Python's Xarray.
string_varnames = ["name", "particle_type", "status", "origin_type", "stage", "regime"]
string_varnames = ["name", "particle_type", "origin_type", "stage", "regime"]
char_varnames = ["space"]
int_varnames = ["id", "ntp", "npl", "nplm", "discard_body_id", "collision_id", "status"]

Expand Down

0 comments on commit 6617319

Please sign in to comment.