fix: scale geostationary scan angles (rad) to PROJ metres before inverse projection#85
Conversation
geos)
|
@copilot The globe does not update. spin, spin, spin . the vars load and the 'Data loading...' pop up appears and then spin, spin. The dataset is very large chunks. Try this smaller dataset. I think it has the same issue but here it says it cannot load the data at all |
Found and fixed the root cause! The bug was a coordinate units mismatch: Root cause: CF-convention geostationary datasets (Himawari-8 AHI and others) store Fix: In Re: Re: "spin spin" on the 1km Himawari-8 dataset — the loading spinner is expected to take a while for very large chunks (a 1km full-disk image is ~121M pixels). The spinner will stop once the download completes. The fix above means the globe will now actually render correctly once the data arrives. If the download is stalling (not just slow), that would be a separate network/chunk-size issue. |
geos)
CF-convention geostationary datasets (Himawari-8 AHI, GOES-R ABI) store
x_geostationary/y_geostationaryas scan angles in radians (units = "rad", e.g.±0.15 rad). The existinginvGeostatPointformula treats these as PROJgeosmetres, dividing by Earth's semi-major axis (~6.4 M m). This maps every coordinate to essentially0, placing the entire dataset at the sub-satellite nadir — so the globe renders nothing.Fix
In
loadGeostatCoords(zarrUtils.ts), after fetching the coordinate arrays, check theirunitsattribute. When it starts with"rad", scale in-place bysatelliteOrbitalRadius = perspective_point_height + semi_major_axis(~42.2 M m) before passing toinvGeostatPoint:Coordinates already in metres (no
units = "rad") are passed through unchanged.Notes
nsrdb_india.icechunkURL returns 404; the available dataset in that bucket isnsrdb_himawari7.icechunk, which is also geostationary and should benefit from this fix.