-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional dewpoints for invalid values (#5)
- Loading branch information
Showing
7 changed files
with
118 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import assert from "assert/strict"; | ||
import fse from "fs-extra"; | ||
import { run } from "../misc.js"; | ||
import parse from "../../lib/index.js"; | ||
import { dirname } from "path"; | ||
import { fileURLToPath } from "url"; | ||
|
||
const __dirname = dirname(fileURLToPath(import.meta.url)); | ||
|
||
// RAP from Alaska | ||
|
||
run(async () => { | ||
const rap = fse.readFileSync(`${__dirname}/rap.txt`).toString(); | ||
|
||
const parsed = parse(rap); | ||
|
||
for (const datum of parsed[0].data) { | ||
if (datum.dewpt) { | ||
assert(datum.dewpt >= -1000); | ||
assert(datum.dewpt <= 1000); | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
Op40 analysis valid for grid point 5.6 nm / 94 deg from 43.053,-89.438: | ||
Op40 22 07 Jun 2023 | ||
CAPE 0 CIN 0 Helic 99999 PW 99999 | ||
1 23062 99999 43.05 89.31 99999 99999 | ||
2 99999 99999 99999 66 99999 99999 | ||
3 43.053,-89.438 12 kt | ||
9 9783 289 232 36 25 9 | ||
4 10000 99999 99999 99999 99999 99999 | ||
5 9754 318 225 32 27 10 | ||
5 9701 369 219 26 27 11 | ||
5 9608 453 209 18 28 12 | ||
5 9472 574 197 9 28 12 | ||
5 9298 733 181 0 28 12 | ||
4 9250 775 176 -1 28 12 | ||
5 9090 922 161 -6 27 12 | ||
5 8863 1136 140 -11 26 12 | ||
5 8617 1374 118 -30 24 12 | ||
4 8500 1488 109 -46 24 12 | ||
5 8343 1644 96 -67 23 12 | ||
5 8041 1949 75 -116 20 13 | ||
5 7711 2293 56 -213 18 15 | ||
5 7352 2681 39 -245 11 21 | ||
4 7000 3079 24 -307 5 28 | ||
5 6966 3119 23 -313 4 29 | ||
5 6551 3614 5 997259 353 38 | ||
5 6107 4173 -19 -455 349 43 | ||
5 5639 4790 -58 -323 350 48 | ||
5 5184 5430 -102 -355 351 54 | ||
4 5000 5705 -124 -359 352 55 | ||
5 4774 6058 -153 -364 353 56 | ||
5 4406 6658 -199 -389 357 57 | ||
5 4074 7235 -236 -456 360 63 | ||
4 4000 7368 -246 -464 360 64 | ||
5 3773 7791 -276 -488 358 67 | ||
5 3501 8323 -320 -487 360 70 | ||
5 3256 8832 -358 -506 2 78 | ||
5 3034 9317 -395 -547 3 85 | ||
4 3000 9394 -401 -550 3 86 | ||
5 2835 9779 -430 -563 4 90 | ||
5 2655 10221 -459 -559 360 97 | ||
4 2500 10614 -490 -567 359 103 | ||
5 2487 10649 -493 -568 359 103 | ||
5 2335 11060 -522 -604 2 103 | ||
5 2196 11464 -542 -645 5 100 | ||
5 2057 11883 -559 -667 5 91 | ||
5 1917 12328 -572 -684 2 81 | ||
5 1778 12806 -575 -720 360 70 | ||
5 1638 13324 -569 -774 360 59 | ||
4 1500 13879 -573 -797 359 55 | ||
5 1498 13888 -573 -797 359 55 | ||
5 1359 14507 -573 -822 3 47 | ||
5 1219 15194 -567 -849 10 37 | ||
5 1080 15966 -569 -860 6 30 | ||
4 1000 16442 -573 -865 6 28 | ||
5 940 16826 -576 -869 6 26 | ||
5 810 17727 -585 -879 15 21 | ||
5 706 18591 -596 -888 30 17 | ||
4 700 18647 -596 -888 31 17 | ||
5 622 19416 -597 -895 41 17 | ||
5 543 20266 -582 -902 61 20 | ||
4 500 20785 -570 -906 75 17 | ||
5 469 21187 -561 -909 85 15 | ||
5 401 22192 -542 -915 114 8 | ||
5 338 23305 -524 -922 113 8 | ||
5 278 24563 -508 -932 127 10 | ||
5 223 26019 -495 -949 106 8 | ||
5 171 27770 -462 -947 69 10 | ||
5 123 30051 -408 -956 108 20 |