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