Skip to content

Commit

Permalink
chore: fetch archived forecast data through s3 proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed Oct 1, 2024
1 parent c6de908 commit 9fd9cad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/config/layers/weather/forecast-layers.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module.exports = function ({ wmtsUrl, tmsUrl, wmsUrl, wcsUrl, k2Url, s3Url }) {
model: { strTemplate: '<%- model.name %>' }
},
geotiff: { // geotiff props
url: { strTemplate: "<% const lvl = (level !== undefined) ? level.toString() : '10'; const folder = runTime.format('YYYY/MM/DD/HH'); const isobaric = (level !== undefined) ? '-isobaric' : ''; const file = forecastTime.format('YYYY-MM-DD-HH') %>https://kargo.s3.eu-central-1.amazonaws.com/archive/<%- model.name %><%- isobaric %>/<%- folder %>/<%- windComponent %>/<%- lvl %>/<%- file %>.cog" }
url: { strTemplate: "<% const lvl = (level !== undefined) ? level.toString() : '10'; const folder = runTime.format('YYYY/MM/DD/HH'); const isobaric = (level !== undefined) ? '-isobaric' : ''; const file = forecastTime.format('YYYY-MM-DD-HH') %>" + s3Url + "/ovh/meteo-archives/archive/<%- model.name %><%- isobaric %>/<%- folder %>/<%- windComponent %>/<%- lvl %>/<%- file %>.cog" }
}
}
},
Expand Down Expand Up @@ -189,7 +189,7 @@ module.exports = function ({ wmtsUrl, tmsUrl, wmsUrl, wcsUrl, k2Url, s3Url }) {
model: { strTemplate: '<%- model.name %>' }
},
geotiff: { // geotiff props
url: { strTemplate: "<% const lvl = (level !== undefined) ? level.toString() : (model.name.startsWith('gfs-') ? 'surface' : '10'); const folder = runTime.format('YYYY/MM/DD/HH'); const isobaric = (level !== undefined) ? '-isobaric' : ''; const file = forecastTime.format('YYYY-MM-DD-HH') %>https://kargo.s3.eu-central-1.amazonaws.com/archive/<%- model.name %><%- isobaric %>/<%- folder %>/<%- meteoElements[0] %>/<%- lvl %>/<%- file %>.cog" }
url: { strTemplate: "<% const lvl = (level !== undefined) ? level.toString() : (model.name.startsWith('gfs-') ? 'surface' : '10'); const folder = runTime.format('YYYY/MM/DD/HH'); const isobaric = (level !== undefined) ? '-isobaric' : ''; const file = forecastTime.format('YYYY-MM-DD-HH') %>" + s3Url + "/ovh/meteo-archives/archive/<%- model.name %><%- isobaric %>/<%- folder %>/<%- meteoElements[0] %>/<%- lvl %>/<%- file %>.cog" }
}
}
},
Expand Down Expand Up @@ -284,7 +284,7 @@ module.exports = function ({ wmtsUrl, tmsUrl, wmsUrl, wcsUrl, k2Url, s3Url }) {
model: { strTemplate: '<%- model.name %>' }
},
geotiff: { // geotiff props
url: { strTemplate: "<% const lvl = (level !== undefined) ? level.toString() : 'surface'; const folder = runTime.format('YYYY/MM/DD/HH'); const isobaric = (level !== undefined) ? '-isobaric' : ''; const file = forecastTime.format('YYYY-MM-DD-HH') %>https://kargo.s3.eu-central-1.amazonaws.com/archive/<%- model.name %><%- isobaric %>/<%- folder %>/<%- meteoElements[0] %>/<%- lvl %>/<%- file %>.cog" }
url: { strTemplate: "<% const lvl = (level !== undefined) ? level.toString() : 'surface'; const folder = runTime.format('YYYY/MM/DD/HH'); const isobaric = (level !== undefined) ? '-isobaric' : ''; const file = forecastTime.format('YYYY-MM-DD-HH') %>" + s3Url + "/ovh/meteo-archives/archive/<%- model.name %><%- isobaric %>/<%- folder %>/<%- meteoElements[0] %>/<%- lvl %>/<%- file %>.cog" }
}
}
},
Expand Down Expand Up @@ -381,7 +381,7 @@ module.exports = function ({ wmtsUrl, tmsUrl, wmsUrl, wcsUrl, k2Url, s3Url }) {
model: { strTemplate: '<%- model.name %>' }
},
geotiff: { // geotiff props
url: { strTemplate: "<% const lvl = (level !== undefined) ? level.toString() : '2'; const folder = runTime.format('YYYY/MM/DD/HH'); const isobaric = (level !== undefined) ? '-isobaric' : ''; const file = forecastTime.format('YYYY-MM-DD-HH') %>https://kargo.s3.eu-central-1.amazonaws.com/archive/<%- model.name %><%- isobaric %>/<%- folder %>/<%- meteoElements[0] %>/<%- lvl %>/<%- file %>.cog" }
url: { strTemplate: "<% const lvl = (level !== undefined) ? level.toString() : '2'; const folder = runTime.format('YYYY/MM/DD/HH'); const isobaric = (level !== undefined) ? '-isobaric' : ''; const file = forecastTime.format('YYYY-MM-DD-HH') %>" + s3Url + "/ovh/meteo-archives/archive/<%- model.name %><%- isobaric %>/<%- folder %>/<%- meteoElements[0] %>/<%- lvl %>/<%- file %>.cog" }
}
}
},
Expand Down

0 comments on commit 9fd9cad

Please sign in to comment.