Skip to content

Commit ac22b34

Browse files
Update documentation on the unstructured grid search to note change to spherical bounding box
1 parent 312901d commit ac22b34

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

docs/development/unstructured_grid_search.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ The algorithm has two phases: **initialisation** (once, when the grid is first u
4242

4343
The hash grid is three-dimensional regardless of the source grid:
4444

45-
| Source grid | Mesh type | Hash-grid space |
46-
| ----------- | --------- | ------------------------------------- |
47-
| `XGrid` | spherical | Cartesian unit cube (lon/lat → x,y,z) |
48-
| `XGrid` | flat | 2-D lon/lat bounding box (z set to 0) |
49-
| `UxGrid` | spherical | Cartesian unit cube |
50-
| `UxGrid` | flat | 2-D lon/lat bounding box |
45+
| Source grid | Mesh type | Hash-grid space |
46+
| ----------- | --------- | ---------------------------------------- |
47+
| `XGrid` | spherical | Cartesian bounding box (lon/lat → x,y,z) |
48+
| `XGrid` | flat | 2-D lon/lat bounding box (z set to 0) |
49+
| `UxGrid` | spherical | Cartesian bounding box (lon/lat → x,y,z) |
50+
| `UxGrid` | flat | 2-D lon/lat bounding box |
5151

5252
For spherical grids, node coordinates are converted from degrees to radians and then to Cartesian (x, y, z) on the unit sphere using `parcels._core.index_search._latlon_rad_to_xyz`:
5353

@@ -57,7 +57,7 @@ y = sin(lon) * cos(lat)
5757
z = sin(lat)
5858
```
5959

60-
The hash grid then spans the unit cube `[-1, 1]³`. Working in Cartesian space avoids the longitude wrap-around discontinuity that would otherwise cause the bounding boxes of cells crossing the antimeridian to erroneously span the entire domain.
60+
The hash grid then spans the axis-aligned Cartesian bounding box of the transformed grid nodes. For a global grid this is (nearly) the unit cube `[-1, 1]³`; for a regional grid it is much tighter, so the full quantization resolution (1024 bins per axis) is spent on the region actually covered by the grid rather than the whole sphere. Working in Cartesian space avoids the longitude wrap-around discontinuity that would otherwise cause the bounding boxes of cells crossing the antimeridian to erroneously span the entire domain.
6161

6262
For flat meshes the hash grid simply spans `[lon_min, lon_max] × [lat_min, lat_max]`, with z fixed at 0.
6363

0 commit comments

Comments
 (0)