Quacken8 / MagneticDisconnectSimulator

Python simulator of disconnection of solar magnetic field from its roots inpsired by Schüssler and Rempel (2018)
1 stars 0 forks source link

Find a smarter way to only init fortran libraries once #9

Open Quacken8 opened 1 year ago

Quacken8 commented 1 year ago

Right now when the init.py file executes, it sets pym.mesa2Py = True even tho pym doesnt have that attribute. When _init.py is executed again within the same session, that attribute still exists in pym so it's an indicator whether this file has already run. It's super hacky but it gets the job done. I'd like to use something smarter, but I don't know what

https://github.com/Quacken8/MagneticDisconnectSimulator/blob/250f27aa84cfa4a97a5407a60bef041d5cabe222/mesa2Py/__init__.py#L287