fortran-lang / stdlib

Fortran Standard Library
https://stdlib.fortran-lang.org
MIT License
1.03k stars 163 forks source link

Porting everything from fortran-utils to stdlib #103

Open certik opened 4 years ago

certik commented 4 years ago

Here is my plan with https://github.com/certik/fortran-utils: I would like to port everything to stdlib. Once everything is in here, I will point users in the README to simply use stdlib, that fortran-utils is not developed anymore and users should switch to stdlib, which as all the functionality and more. I encourage other authors of similar libraries (listed in #1) to try to do the same.

Here is the functionality in fortran-utils that needs to be ported:

It seems everything (except #101) would be a nice fit into the scope of stdlib. I think #101 should go into a separate library (at least at first), but the rest I think has a chance of getting in.

I will use this issue to keep track of the progress.

scivision commented 4 years ago

I made a followup comment that I think #101 and similar can be interfaced via a shim. This can work for HDF5, FITS, etc. whatever someone wants to contribute a shim for. The user-facing stdlib API can be like:

savefile('foo.h5', x)
loadfile('foo.h5', y)

The same interface can be used for libpng and other images. For h5fortran and nc4fortran the rank- and kind-polymorphism is already in those interfaces. For libpng or FITS, stdlib may need to provide the polymorphism.

These file formats would all be optional at configure-time. A fallback to raw binary is straightforward if desired.