climt icon indicating copy to clipboard operation
climt copied to clipboard

Refactor Emanuel convection to support non-contiguous arrays

Open mcgibbon opened this issue 7 years ago • 3 comments

Currently the Emanuel convection Fortran code is written to only work on contiguous vertical columns. Since the GFS dynamical core only works on contiguous horizontal slices, that means array copying has to occur between calls to these two components. We could re-factor the Emanuel Fortran code to avoid this.

mcgibbon avatar Jun 14 '18 20:06 mcgibbon

Honestly, if you look at the Emanuel fortran code, I would rather write a pure python implementation than refactor it ;)

For now, I think I can live with this copy. I really plan to write a pure python implementation of the emanuel scheme, both as a learning project and to clean it up. But that is way out in the future.

JoyMonteiro avatar Jun 14 '18 21:06 JoyMonteiro

I would suggest writing it in Cython when you do. You should see significant speed-ups relative to pure Python, and Cython isn't bad.

mcgibbon avatar Jun 14 '18 21:06 mcgibbon

Let's leave this issue open, with the plan to eventually fix it by writing a non-Fortran Emanuel convection implementation.

mcgibbon avatar Jun 14 '18 21:06 mcgibbon