phas = () =>
Plot.plot({
width: 928,
projection: { type: "equal-earth", rotate: [-10, 0] },
color: { scheme: "rainbow" },
marks: [
Plot.raster(PHAS, {
pixelSize: 0.5,
x: LON,
y: LAT,
fill: PHAS
}),
Plot.contour(PHAS, {
pixelSize: 0.5,
x: LON,
y: LAT,
value: PHAS.map((d) => Math.sin((d / 180) * Math.PI * 12)),
thresholds: [0],
stroke: "white",
strokeWidth: 0.25
}),
Plot.contour(PHAS, {
pixelSize: 0.5,
x: LON,
y: LAT,
value: PHAS.map((d) => Math.sin((d / 180) * Math.PI * 2)),
thresholds: [0],
stroke: "white",
strokeWidth: 0.75
}),
Plot.sphere()
]
})