ocean-eddy-cpt / gcm-filters

Diffusion-based Spatial Filtering of Gridded Data
https://gcm-filters.readthedocs.io/
Other
37 stars 24 forks source link

Handle simple fixed factor filtering internally #71

Closed NoraLoose closed 3 years ago

NoraLoose commented 3 years ago

Simple fixed factor filtering requires the following three steps by the user:

  1. Before filtering, multiply the field by the local cell area.
  2. Apply gcm-filters filter with dx_min=1and filter_scale= desired fixed factor, pretending the grid was uniform.
  3. After filtering, divide filtered field by local cell area.

Only the second step is handled by gcm-filters (see this tutorial or the new tutorial in #68).

To avoid confusion among users, we could let gcm-filters also handle steps 1 and 3. Implementing steps 1 and 3 internally would have to happen in the filter.py module (rather than the kernels.py module) because

We would want to do this only for a subset of Laplacians: REGULAR, REGULAR_WITH_LAND, TRIPOLAR_REGULAR_WITH_LAND, and all of these would need the additional required grid variable area.