## Generation of high-res nearest-neighbor weights
As a starting point for our hierarchy of weights, we compute the nearest neighbour weights to a very fine-scale HEALPix grid, i.e. zoom level 13 or 600m.
This can be done by running the `gen_weights.sh` script.
The script is a convenient wrapper around `cdo` that handles atmosphere and ocean grids properly.
The source grid can be defined by setting various grid-related variables in the script itself.
```sh
./gen_weights.sh
```
## Coarsening the computed weights
The hierarchical construction of the HEALPix grids allows a coarser version of a grid to be computed by taking the average of four contiguous values in its parent grid.
This can be used to coarsen existing remapping weights to any other HEALPix zoom level.
Internally, the individual remapping weights are grouped by source and (new) destination addresses and combined where possible.
This allows us to compute a conservative but lightweight mapping from our source grid to an arbitrary HEALPix grid.