FormingWorlds / PROTEUS

Coupled atmosphere-interior framework to simulate the temporal evolution of rocky planets.
https://fwl-proteus.readthedocs.io
Apache License 2.0
11 stars 1 forks source link

Crash with undefined escape model #208

Open stefsmeets opened 3 hours ago

stefsmeets commented 3 hours ago

If the escape model is not defined (config["escape_model"] == 0), RunEscape crashes because solvevol_target is undefined. What is the expected result here?

See this function: https://github.com/FormingWorlds/PROTEUS/blob/181d4ceb790eba15d69daaa229b73857a3738d1b/src/proteus/escape/wrapper.py#L18-L61

lsoucasse commented 3 hours ago

Actually, RunEscape must not be called if not dummy or zephyrus.

I would remove the if statement l.53 and put a statement like this in proteus.py if config["escape_model"]: RunEscape(parameters...)

stefsmeets commented 2 hours ago

That will only bring the undefined variable problem to the main loop of proteus as far as I can see. The main loop expects solvevol_target in several places.