FormingWorlds / PROTEUS

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

Generic submodule handling #126

Closed nichollsh closed 4 weeks ago

nichollsh commented 3 months ago

We recently discussed how best to handle many submodules in a simple and transparent manner. For example, in cases where the interior can be handled by either SPIDER or Aragog.

This can be done by having an interior.py file (for example) which handles generalised interior stuff, and then calls the appropriate submodule-specific functions (e.g. RunSPIDER in spider.py) as necessary. This will reduce the amount of duplicate code and therefore also make things easier to maintain.

Touches on #74 and #62

lsoucasse commented 3 months ago

I think this issue needs to be addressed per submodule

nichollsh commented 3 months ago

I agree. We could format the proteus package directory like so:

And so on

stefsmeets commented 3 months ago

@nichollsh I was just about to make this post, this is exactly what I had in mind as well! 😅

Eventually, all files in the plot, utils, tools directories and proteus.py should either move somewhere under src/janus. Or, if they are simply scripts that you expect users to edit (i.e. these do not provide any library functions), we can move them under ./scripts or ./examples.

timlichtenberg commented 3 months ago

The structure above sounds reasonable to me. What do we do with "interface" modules, such as the future atmodeller module, and ZEPHYRUS? Could all go in one of the two, but then MORS becomes a bit weirdly placed.

lsoucasse commented 3 months ago

I think we just follow the main proteus script, each tick being a subdirectory:

timlichtenberg commented 3 months ago

Ok, makes sense to me. Let's call "stellar flux" "star" for simplicity?

lsoucasse commented 3 months ago

Just to not duplicate the work, I have started this in the atmos_wrapper branch.