Skip to content

Commit

Permalink
Allow unsupported simulation types to work with grackle yt fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
brittonsmith committed Jun 21, 2024
1 parent cf1f6b3 commit 152a7b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/python/pygrackle/yt_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ def prepare_grackle_data(ds, parameters=None):
sim_type = type(ds)
par_map = _parameter_map.get(sim_type)
if par_map is None:
raise RuntimeError(
"Simulation type not supported: %s." % sim_type)
print (f"Warning: cannot get Grackle parameters from {sim_type}.\n"
"All parameters need to be supplied through the \"parameters\" keyword.")
par_map = {}

all_parameters = \
dict([(gpar, ds.parameters[dpar])
Expand Down

0 comments on commit 152a7b8

Please sign in to comment.