Skip to content

Make greater use of numba to speed up calculations #7

@robwarrenwx

Description

@robwarrenwx

It has come to my attention that significant performance improvements could potentially be achieved by making extensive use of numba for just-in-time compilation and vectorization. This is based on advice from Charles Turner from ACCESS-NRI and from some online discussion around the use of numba (for example, this series of blog posts). I recently modified the code to use numba.vectorize for the Lambert-W function solver (used in the calculation of dewpoint temperature and the lifting condensation level) and the polynomial fits to pseudoadiabats, which has already led to an impressive speed up in the calculation of parcel parameters. The purpose of this issue is to investigate the benefits of using numba more extensively throughout the code. Specific things I plan to test include:

  • Applying numba.jit or numba.vectorize to the basic thermodynamic and moisture calculations
  • Replacing the parcel, kinematic, and utils functions (which operate level by level in a vectorized manner) with functions that operate on 1D arrays (i.e., single vertical profiles) with numba.guvectorize used to vectorize over the other dimensions

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions