From 6e7bc3f87df71f66dbf528c38149b587f99bb073 Mon Sep 17 00:00:00 2001 From: "Carlos E. Ugarte" Date: Thu, 11 Jun 2026 08:29:55 -0400 Subject: [PATCH] Fix atl24x photon-cloud overlay version handling (#1084) The ATL24 photon-cloud overlay re-fetches an atl03x request with atl24 classification, deriving the source ATL03 granule name and CMR version from the parent ATL24 product. The CMR version was hardcoded to '006', so it could not track the ATL24 product's input ATL03 release. - Derive cmr.version from the derived resource name's version field (VVV) instead of hardcoding '006', so the overlay follows the ATL24 product (e.g. automatically uses '007' once the R007-based ATL24 run ships). - Color an atl24x overlay by atl24_class by passing the real parent func string, and fall back to atl03x in getDefaultColorEncoding before the rec tree updates (removes a spurious "No function found for reqId" warning). Note: this does not restore the photon cloud on its own. The current ATL24 product was built from ATL03 R006, which NSIDC removed from S3; full resolution depends on R006 being restored or the R007-based ATL24 run (summer 2026). See issue #1084. Co-Authored-By: Claude Opus 4.8 --- web-client/src/components/SrElevationPlot.vue | 2 +- web-client/src/stores/reqParamsStore.ts | 11 +++++++++-- web-client/src/utils/plotUtils.ts | 6 +++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/web-client/src/components/SrElevationPlot.vue b/web-client/src/components/SrElevationPlot.vue index fc6d66e0..5ce43901 100644 --- a/web-client/src/components/SrElevationPlot.vue +++ b/web-client/src/components/SrElevationPlot.vue @@ -1130,7 +1130,7 @@ async function handlePhotonCloudShow() { ) chartStore.setSelectedColorEncodeData(parentReqIdStr, 'solid') await initSymbolSize(runContext.reqId) // for new record - initializeColorEncoding(runContext.reqId, 'atl03x') + initializeColorEncoding(runContext.reqId, parentFuncStr) // The worker will now fetch the data from the server // and write the opfs file then update // the map selected layer and the chart diff --git a/web-client/src/stores/reqParamsStore.ts b/web-client/src/stores/reqParamsStore.ts index 5c9b2491..082e2a45 100644 --- a/web-client/src/stores/reqParamsStore.ts +++ b/web-client/src/stores/reqParamsStore.ts @@ -506,9 +506,16 @@ const createReqParamsStore = (id: string) => logger.error('Mission not recognized in getAtlReqParams', { mission: this.missionValue }) } - // Add CMR version for ATL24 photon cloud overlay + // Pin the CMR ATL03 release to match the ATL24 product's input ATL03 version. ATL24 + // granule names encode that version (ATL24 user guide ยง1.2.3), and we already carry it + // through in the derived resource name (ATL03_[date]_[ttttccss]_[VVV]_[RR].h5). Derive + // it from that resource rather than hardcoding, so the overlay tracks the ATL24 product + // automatically โ€” e.g. when ATL24 is rebuilt against ATL03 R007, both the resource name + // and this version become '007' with no code change. (Note: this only works while the + // matching ATL03 release is still available to SlideRule in S3.) if (this.isAtl24PhotonOverlay && this.iceSat2SelectedAPI.includes('atl03')) { - req.cmr = { version: '006' } + const atl03Release = this.resources[0]?.split('_')[3] + req.cmr = { version: atl03Release || '006' } } if (this.iceSat2SelectedAPI.includes('atl03')) { diff --git a/web-client/src/utils/plotUtils.ts b/web-client/src/utils/plotUtils.ts index a97c2a2e..07931abb 100644 --- a/web-client/src/utils/plotUtils.ts +++ b/web-client/src/utils/plotUtils.ts @@ -129,7 +129,11 @@ export interface SrScatterSeriesData { export function getDefaultColorEncoding(reqId: number, parentFuncStr?: string) { if (reqId > 0) { - const func = useRecTreeStore().findApiForReqId(reqId) + // A photon-cloud overlay (signalled by parentFuncStr) is always an atl03x record. + // The rec tree may not yet contain a freshly-created overlay node โ€” it is rebuilt + // asynchronously once the OPFS file is ready โ€” so fall back to atl03x rather than + // emitting a misleading "solid" default and warning during that window. + const func = useRecTreeStore().findApiForReqId(reqId) || (parentFuncStr ? 'atl03x' : '') if (func) { const fieldNameStore = useFieldNameStore() // Special cases that use non-height field for color encoding