Move case-specific intitlization / finalization to dedicated case subroutine
The file xcompact3d.f90 contains case-specific open / close statements. This should be moved inside the corresponding init and finalize subroutines in BC-xxx.f90.
https://github.com/xcompact3d/Incompact3d/blob/ca5be84f7aa4f92a355e4e4cb89becb493f238c3/src/xcompact3d.f90#L264
https://github.com/xcompact3d/Incompact3d/blob/ca5be84f7aa4f92a355e4e4cb89becb493f238c3/src/xcompact3d.f90#L292
However, the case/init subroutine is called only when irestart==0. It might be relevant to adapt the initial stage of xcompact3d. For instance :
- always call a subroutine case/boot
- then call the subroutine case/init when irestart==0
The case-specific open / close statements could then be moved inside case/boot and case/finalize
See this commit, or this one for instance
That would be nice.
I also recommend making the parameters filename (InputFN='input.i3d') global at module_param.f90, so we can handle case-specific nameslists at case-specific files.
It would reduce a little bit the footprint of different modules and make it easier for us to drop in customized solutions.