Skip to content

Commit

Permalink
fix: use correct parameter name
Browse files Browse the repository at this point in the history
  • Loading branch information
sampov2 committed Oct 10, 2024
1 parent 4ae9af7 commit 54b2b7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/EDRQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TemperatureData> => {
const lonLat = toLonLat(location, config.projection)
Expand All @@ -43,7 +44,7 @@ export const requestTemperatureData = async (location: number[]): Promise<Temper

response.coverages.forEach((coverage: any) => {
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
Expand Down

0 comments on commit 54b2b7a

Please sign in to comment.