The SUMMA coupling brings up the idea that it might be useful to NOT require buiilding with PIO. This is especially to save the complexity of having to bring it into the build.
I'm not sure if this is a good long term idea or not. But, below I layout some ideas on how it could be done on short to longer timescales.
- PIO and lake libraries. I experimented with the PIO and lake libraries, but found that integrating and compiling them together with SUMMA is not straightforward. Because SUMMA will handle most of the input/output operations in the coupled model, I plan to continue using SUMMA's existing I/O routines. This should also simplify the implementation, and I do not think the PIO infrastructure on the mizuRoute side is necessary for the current coupling.
Medium term:
We did assume that adding PIO to be build would be acceptable for mizuRoute, so there isn't an easy way to turn it off. Based on how the code is done now, I think the way to do it would be to first turn off history output in mizuRoute, and add interfaces of the PIO modules in mizuRoute to summa that override the use of PIO with either SUMMA I/O or plain NetCDF.
I think you can turn history output off easy enough, so you shouldn't have to change histVars_data.f90, write_simoutput_pio.f90, or historyFile.f90, except to make sure they still build. The files that would need to be worked with would be pio_decomp_data.f90, and pio_utils.f90. The first should be fairly simple since, there's no decomposition. The second would be more involved. globalData, popMetadt.f90 would also need some changes made to it. There might also be some changes to files that use those: init_model_data.f90, and write_restart_pio.f90.
Short term:
I'm having a hard time seeing how to turn PIO off easily. But, there might be ways with having a simple PIO library that has stubs to the interfaces used in mizuRoute. Or maybe adding a CPP token to the code to turn off IO in mizuRoute completely. Outside of that, this could be a good reason to at least start on the serial branch. It's just you really want to move away from it as soon as possible.
Longer term:
It sound like having the ability to run mizuRoute without needing the PIO library might be a desired feature. Building off the medium term solution above, this should be something that could be added in and supported on the main branch.
Originally posted by @ekluzek in #642
The SUMMA coupling brings up the idea that it might be useful to NOT require buiilding with PIO. This is especially to save the complexity of having to bring it into the build.
I'm not sure if this is a good long term idea or not. But, below I layout some ideas on how it could be done on short to longer timescales.
Originally posted by @ekluzek in #642