Weather and climate modeling codes from Fortran to C++

It will be impossible to make everybody happy, but we’ve been discussing interfaces at length with @jeremie.vandenplas, @everythingfunctional, @hkvzjal, @gnikit et al. during our past Monthly calls.

So far we’ve come up with some interesting things:

  • All procedures that could be made pure were made pure (first time ever?)

  • Generalised KIND-dependent functions and 128-bit linear algebra support (first time ever?)

  • 2/3 interfaces for each operation, ideally:

    • subroutine interface that minimizes allocations
    • function interface returning optional error flag
    • .operator. interface with no error flag, pure if applicable

We also do not want to deviate too much from common interfaces such as NumPy and SciPy, because that’s what most people are used to nowadays.

See for example the current matrix inversion interface:

Of course all comments and ideas are very welcome and we’ll do our best to optimize across all the requests!

2 Likes