Closed anchwr closed 2 years ago
Oh wow thanks for finding this. I’m on travel so might not get to looking into this until the end of the week or so .
@anchwr when you have a chance please let me know if this works for this issue for you -- if so we'll close!
It does! Thank you so much! Sorry it took me a few days to check.
awesome glad it works! thanks for reporting it, and thanks @prerakgarg07 for PR'ing it in!
The current ordering of pd_front_end.py causes powderday runs using Enzo and/or the 'li_ml' or 'rr' dust grid options to crash. If
ds_type = ds.dataset_type
is called afterm, xcent, ycent, zcent, dx, dy, dz, reg, ds, boost = m_gen(fname, field_add)
, ds_type gets set to 'ytdatacontainer_hdf5' for Enzo, rather than 'enzo_packed_3d', since the dataset m_gen returns is 'temp_enzo.h5' instead of the original simulation. However, m_gen needs to be called after cfg.par.solar is set if the user has selected the 'li_ml' or 'rr' dust grid options, since the various frontends (e.g., tipsy2pd, arepo2pd) use cfg.par.solar to calculate the dust mass fields for these dust grids. One potential solution would be to putds_type = ds.dataset_type
only before the section of code setting cfg.par.solar and to putm, xcent, ycent, zcent, dx, dy, dz, reg, ds, boost = m_gen(fname, field_add)
only after the section of code setting cfg.par.solar, but I'm guessing that this causes other problems with the code.