From 2732818ea515319238c6c9dc7c423b83a87755ab Mon Sep 17 00:00:00 2001
From: Lukas Kluft <lukas.kluft@mpimet.mpg.de>
Date: Mon, 24 Feb 2025 11:56:18 +0100
Subject: [PATCH] Add readme

---
 README.md | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 README.md

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..506efc0
--- /dev/null
+++ b/README.md
@@ -0,0 +1,25 @@
+# Generate HEALPix weights to use with CDO
+
+## 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.
+
+```sh
+./coarsen_weights.py --nbisections 7 weights_r02b08_hpz13.nc weights_r02b08_hpz6.nc
+```
-- 
GitLab