Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More structure and abstraction in core routines #22

Open
dionhaefner opened this issue Nov 28, 2017 · 0 comments
Open

More structure and abstraction in core routines #22

dionhaefner opened this issue Nov 28, 2017 · 0 comments

Comments

@dionhaefner
Copy link
Collaborator

Currently, all core routines are modeled very closely after the corresponding PyOM routines, including variable names and code structure. Additionally, all gradients are calculated via index shifting and slicing. This makes the code hard to read and understand, but has a performance impact, too, since temporary arrays cannot be freed until the (often overly long) routine has finished.

From the top of my head, possible enhancements include:

  • An xarray-style shifting / gradient function instead of explicit index shifts
  • Re-working of some particularly problematic variables like flux_east / flux_north / ...
  • Giving meaningful names to all variables (especially everything currently named fxa, temp, ...)
  • More (inline?) functions instead of docstring-separated code blocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant