From 54b2b7a3539dfbfe3c9ced7911f6c49b4642776c Mon Sep 17 00:00:00 2001 From: Sampo Savolainen Date: Thu, 10 Oct 2024 07:11:20 +0000 Subject: [PATCH] fix: use correct parameter name --- src/services/EDRQuery.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/EDRQuery.ts b/src/services/EDRQuery.ts index c762e88..3996b87 100644 --- a/src/services/EDRQuery.ts +++ b/src/services/EDRQuery.ts @@ -21,7 +21,8 @@ const legend = [ { minValue: 16, maxValue: 50, color: '#ee0000' } ] -const parameterName = 'monthly_timmax_so' +// const parameterName = 'monthly_timmax_so' // Salt +const parameterNameTemp = 'monthly_timmax_thetao' // Temperature export const requestTemperatureData = async (location: number[]): Promise => { const lonLat = toLonLat(location, config.projection) @@ -43,7 +44,7 @@ export const requestTemperatureData = async (location: number[]): Promise { const x = new Date(coverage.domain.axes.t.values[0] as string).getMonth() - const values = coverage.ranges[parameterName].values as number[] + const values = coverage.ranges[parameterNameTemp].values as number[] values.forEach((value, y) => { if (value !== null && y > seabedDepthIndex) { seabedDepthIndex = y