Proposed new feature or change:
Overview
The goal of this issue is to optimize the non-conservative zonal average routine by:
- Avoiding redundant recalculations
- Reusing intermediary computational steps to minimize overhead
Note: The current implementation uses data copying in its general helper function to support broad user scenarios. This behavior will remain for user-facing functions.
Proposed Approach
-
Dedicated Helper Functions:
Build specialized helper functions tailored for the non-conservative zonal average routine.
-
Specialized Routine for Internal Use:
Implement an optimized version that avoids unnecessary data copying internally, while preserving the general helper function that uses copies for general user use.
-
Intermediary Step Reuse:
Identify and reuse common intermediary steps in the computation to avoid redundant calculations.
-
Module Organization:
Create a separate zonal.py file that bundles all related functions for clarity and maintainability.
Tasks
Example Reference
In a similar non-conservative zonal average implementation, dedicated helper functions are built to work specifically for that routine. While general helper functions may use data copying for broad usability, an optimized internal version can focus on performance by reusing intermediary steps and minimizing overhead.
Proposed new feature or change:
Overview
The goal of this issue is to optimize the non-conservative zonal average routine by:
Note: The current implementation uses data copying in its general helper function to support broad user scenarios. This behavior will remain for user-facing functions.
Proposed Approach
Dedicated Helper Functions:
Build specialized helper functions tailored for the non-conservative zonal average routine.
Specialized Routine for Internal Use:
Implement an optimized version that avoids unnecessary data copying internally, while preserving the general helper function that uses copies for general user use.
Intermediary Step Reuse:
Identify and reuse common intermediary steps in the computation to avoid redundant calculations.
Module Organization:
Create a separate
zonal.pyfile that bundles all related functions for clarity and maintainability.Tasks
zonal.pyfor inefficiencies.Example Reference
In a similar non-conservative zonal average implementation, dedicated helper functions are built to work specifically for that routine. While general helper functions may use data copying for broad usability, an optimized internal version can focus on performance by reusing intermediary steps and minimizing overhead.