Skip to main content

A Python tool to decode standard FM35 TEMP weather messages from upper-air observations.

Project description

FM35 Decoder

Ko-fi PyPI - Version PyPI - Python Version License: MIT

A Python tool to decode standard FM35 TEMP weather messages from upper-air observations (radiosoundings).

Installation

Install the package directly from the repository:

pip install fm35_decoder

Usage

Import the decoder into your project and call the decode function:

from fm35_decoder import decode

# Your FM35/TEMP message parts
ttaa = "..."
# ...
df_main, df_special = decode(ttaa, ttbb, ttcc, ttdd)

# df_main: Standard levels, interpolated data and geopotential heights
# df_special: Tropopause, Max Wind, and Cloud groups
print(df_main)
print(df_special)

Interpolation Methodology

Temperature and Dewpoint: Missing values are filled using linear interpolation with respect to the natural logarithm of pressure. This method aligns with standard atmospheric thermodynamics (Skew-T/Log-P diagrams), where temperature typically varies linearly with log-pressure, ensuring physically realistic profiles.

Wind: Wind speed and direction are decomposed into U (zonal) and V (meridional) vector components. Each component is interpolated independently with respect to the natural logarithm of pressure before being recombined. This vector-based approach prevents artifacts that can occur when interpolating speed and direction scalar values directly (e.g., across the 0°/360° north boundary).

AI usage

Google's Gemini 3 Pro and Flash were utilized to assist the development of this package, based on the FM35/TEMP documentation.

Example

df_main

=== Main Level DataFrame (df_main) ===
 Pressure  Height  Temp  DewPoint  WindDir  WindSpeed
     1000     163   NaN       NaN      NaN        NaN
      938     714  21.2      18.8     10.0        8.0
      925     843  20.0      18.1     75.0        6.0
      882    1249  16.8      16.4     23.0        8.5
      870    1366  19.8      13.8     15.0       10.0
      850    1570  18.6      13.6    360.0        8.0
      ...     ...   ...       ...      ...         ...
       31   23586 -58.8     -91.4     85.0       27.0
       30   23800 -58.3     -91.3     85.0       35.0
       29   24013 -58.0     -92.0     85.0       44.0
       28   24234 -57.7     -92.7     90.0       41.0

df_special

=== Special Data DataFrame (df_special) ===
  Symbol    Subject     Description     Value
       h      Cloud     Base Height                      600-1000m (2000-3300ft)
      Nh      Cloud          Amount                                      8 oktas
      CL      Cloud        Low Type     Stratus nebulosus and/or Stratus fractus
      CM      Cloud        Mid Type                                 No CM clouds
      CH      Cloud       High Type                                 No CH clouds
      sr Solar/Inst      Solar Corr                         NOAA solar corrected
    rara Solar/Inst      Sonde Type         Vaisala RS41/DigiCORA MW41 (Finland)
    sasa Solar/Inst        Tracking                                 Radar (5 cm)
   8GGgg Solar/Inst            Time                                        11:31
  PtPtPt Tropopause        Pressure                                       906hPa
  TtTtTt Tropopause     Temperature                                       -77.1C
    DtDt Tropopause        Dewpoint                                       -89.1C
dtdtftft Tropopause            Wind                                     260/18kt

License

This project is licensed under the terms of the MIT License.

You are free to create derivative works and use this software for commercial purposes. The only requirement is that you must give credit to the original author.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fm35_decoder-0.1.2.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fm35_decoder-0.1.2-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file fm35_decoder-0.1.2.tar.gz.

File metadata

  • Download URL: fm35_decoder-0.1.2.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fm35_decoder-0.1.2.tar.gz
Algorithm Hash digest
SHA256 985180031381ddb57338dbb9c48af9ef0266f4d8d3f70d5e020c4fe34fc46c17
MD5 0f5b52fb2b96c432bf4a6aa9880f95c3
BLAKE2b-256 7c467d0d1895ff7d0e02fdad63eb76265c690927e4f8322c122724e63d6dd560

See more details on using hashes here.

Provenance

The following attestation bundles were made for fm35_decoder-0.1.2.tar.gz:

Publisher: python-publish.yml on luciodaou/fm35_decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fm35_decoder-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: fm35_decoder-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fm35_decoder-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f7663ee5607f159b273814ae9348ce413f43c988962b9b3f64f638a4bb8ee4e9
MD5 9b431e657801c8cbccf79e9066391e7f
BLAKE2b-256 a4d3b039e0765dbe817877a450fa13a2b3d91f70c1d707f7ad0344cf3a567a19

See more details on using hashes here.

Provenance

The following attestation bundles were made for fm35_decoder-0.1.2-py3-none-any.whl:

Publisher: python-publish.yml on luciodaou/fm35_decoder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page