Skip to content

Improve SYNOP Section 5, 6 and 7 decoding - #20

Open
Saeid008 wants to merge 4 commits into
antarctica:masterfrom
Saeid008:improve-synop-decoding
Open

Saeid008 wants to merge 4 commits into
antarctica:masterfrom
Saeid008:improve-synop-decoding

Conversation

@Saeid008

@Saeid008 Saeid008 commented Aug 23, 2026

Copy link
Copy Markdown

Summary

This pull request improves SYNOP decoding and encoding, with a focus on Sections 5, 6 and 7.

Changes

  • Improve SYNOP Section 5 decoding and encoding.
  • Add support for 24-hour maximum wind observations (3ddff and 4ddff).
  • Improve handling of optional and missing wind direction values.
  • Fix Code Table 0877 encoding for variable/unknown wind direction (99).
  • Improve SYNOP Section 6 decoding.
  • Add support for soil moisture observations in SYNOP Section 7.
  • Add additional validation and handling for Section 7 groups.
  • Add extensive regression and round-trip tests for the new functionality.
  • Ignore local development backup files.

Code Table 0877

The wind direction encoder previously did not correctly preserve the SYNOP 99 value for variable/unknown wind direction.

This change ensures that:

99 → variable/unknown direction

is decoded and encoded consistently.

Testing

The full test suite passes successfully:

448 passed, 1 skipped, 37 warnings

The warnings are existing DecodeWarning messages related to SYNOP Group 7 handling and do not cause test failures.

Also verified SYNOP round-trip encoding/decoding for:

  • Calm wind (00000)
  • Normal wind directions
  • 360° wind direction (13612)
  • Variable/unknown wind direction (19906)

All tested cases round-trip successfully.

@Saeid008

Copy link
Copy Markdown
Author

This PR also addresses the issues described in #19, particularly the missing SYNOP Section 5 supplementary groups and the inconsistent handling of the 910 gust group.

The relevant decoding and encoding support has been added along with regression tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant