You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output is defined on the Cartesian product of `hcoords` with `zcoords`.
81
87
@@ -89,6 +95,154 @@ using CairoMakie
89
95
heatmap(ClimaCore.Remapping.interpolate(field))
90
96
```
91
97
98
+
### Remapping methods: Bilinear vs SpectralElementRemapping
99
+
100
+
Two horizontal remapping methods are available:
101
+
102
+
-**`SpectralElementRemapping()`** (default): Uses spectral element quadrature weights for high-order polynomial interpolation. More accurate for smooth fields but can produce overshoots/undershoots near discontinuities.
103
+
-**`BilinearRemapping()`**: Uses bilinear interpolation on the 2×2 GLL cell containing each target point. More conservative (bounds-preserving) but lower-order accuracy.
104
+
105
+
Both methods can be used with `interpolate_array` or `Remapper`:
106
+
107
+
```julia
108
+
using ClimaCore.Remapping: SpectralElementRemapping, BilinearRemapping
vlines!(ax_se, boundary_pos; color = :pink, linewidth = 2)
237
+
hlines!(ax_se, boundary_pos; color = :pink, linewidth = 2)
238
+
limits!(ax_se, 0, 1, 0, 1)
239
+
Colorbar(fig[2, 2], sc_se; label = "value")
240
+
241
+
fig
242
+
```
243
+
244
+
Row 1: heatmaps use **orange** for undershoots (< 0) and **red** for overshoots (> 1). The spectral method produces overshoots/undershoots near the discontinuity; bilinear stays in [0, 1]. The error panel (bilinear − spectral) shows where the two methods differ. Row 2: raw field values at the GLL nodes (the source data); pink lines show element boundaries.
245
+
92
246
### The `Remapper` object
93
247
94
248
A `Remapping.Remapper` is an object that is tied to a specified `Space` and can
0 commit comments