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

use refs for long variable names #448

Closed
3 tasks
juliasloan25 opened this issue Oct 2, 2023 · 0 comments · Fixed by #627
Closed
3 tasks

use refs for long variable names #448

juliasloan25 opened this issue Oct 2, 2023 · 0 comments · Fixed by #627
Assignees
Labels
🍃 leaf Issue coupled to a PR

Comments

@juliasloan25
Copy link
Member

juliasloan25 commented Oct 2, 2023

To make code more readable while avoiding extra allocations, we should use refs at the beginning of functions. This is done in oceananigans.

E.g. we could create a ref for rho_flux_h_tot at the beginning of this function and use it here

To Do

  • find other instances of long names that can be shortened in functions, primarily in these folders:
    • experiments/AMIP/components/...
    • src/...
    • maybe more places?
  • add local refs for these and use them inside functions
  • verify no behavioral changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍃 leaf Issue coupled to a PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants