Skip to content

Commit

Permalink
Fix invalid dewpoints from rucsoundings data (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeharding authored Jun 8, 2023
1 parent acf7d60 commit 6fcf415
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"emotion": "^11.0.0",
"fast-xml-parser": "^4.0.7",
"geolib": "^3.3.3",
"gsl-parser": "^2.0.0",
"gsl-parser": "^3.0.0",
"i18next": "^22.5.0",
"i18next-browser-languagedetector": "^7.0.1",
"iso8601-duration": "^2.1.1",
Expand Down
5 changes: 4 additions & 1 deletion src/services/rapidRefresh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ function transformRapToWindsAloft(rap: Rap[]): WindsAloftReport {
temperatureInC: temp / 10,
altitudeInM: height,
pressure: Math.round(pressure / 10),
dewpointInC: dewpt / 10,

// Based on everything I've seen, invalid dewpt values are
// due to extremely low dewpts. So just set to -100°C.
dewpointInC: dewpt != null ? dewpt / 10 : -100,
})
),
})),
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import eslint from "vite-plugin-eslint";
export default defineConfig(() => {
return {
optimizeDeps: {
include: ["metar-taf-parser"],
include: ["metar-taf-parser", "gsl-parser"],
},
build: {
outDir: "build",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5006,10 +5006,10 @@ graphemer@^1.4.0:
resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==

gsl-parser@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/gsl-parser/-/gsl-parser-2.0.3.tgz#6bd0c1564ef6e64ef45c470be0253daefd9e9485"
integrity sha512-bkYMVgW6s8KZ6Qne8mQ2Nrkl3nmjOiuScMbYtqjJe+Z9myRTzcLsMdRt1e3vmHWOJRd3yHFUS79P7T8qCJk3vA==
gsl-parser@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/gsl-parser/-/gsl-parser-3.0.0.tgz#fbdef891ec6726316a8c9dcda01ebd6225efa4b8"
integrity sha512-xa9FEilxqwHm1ZtcH07AeuwDexVmbdEtdSkGrHaDpbS3LG+X0+mZC1dA6gqi4PRXNcOguBjiOdGTSL8JrLlWcA==

gzip-size@^6.0.0:
version "6.0.0"
Expand Down

0 comments on commit 6fcf415

Please sign in to comment.