Commit 3c7dcf1
BUG: fix wind heading and direction wraparound interpolation
Unwrap wind heading/direction angles (np.unwrap) before building the
linear interpolation Function, then wrap back with % 360 on evaluation.
This removes the spurious mid-altitude spikes that appeared when the
profile crossed the 360/0 boundary (e.g. 350 deg -> 10 deg).
The shared logic lives in a single private helper
(__set_wind_angle_function) used by both wind setters, keeping the
module under pylint's max-module-lines. Adds a unit test covering the
wraparound case.
Closes #253
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent a5b3b1f commit 3c7dcf1
3 files changed
Lines changed: 61 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
540 | 568 | | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
| 569 | + | |
| 570 | + | |
546 | 571 | | |
547 | 572 | | |
548 | 573 | | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
| 574 | + | |
| 575 | + | |
554 | 576 | | |
555 | 577 | | |
556 | 578 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
607 | 635 | | |
608 | 636 | | |
609 | 637 | | |
| |||
0 commit comments