Skip to main content

Package for converting FM15 METAR TAC messages or an individual METAR message to BUFR4

Project description

FM15_transform

FM15_transform provides functionality to transform raw FM15 (METAR) TAC messages into their corresponding bufr4 translations as well as extraction of geojson records of the individual observations formatted for use by a WIS2 node.

Installation

Requirements

Dependencies

Dependencies are listed in requirements.txt. Dependencies are automatically installed during FM15_transform installation.

pip

Install latest stable version from PyPI.

pip3 install FM15_transform

UDUNITS-2 Installation and Configuration

UDUNITS-2 is a C library that provides support for units of physical quantities

If the UDUNITS-2 shared library file (libudunits2.so.0 on GNU/Linux or libudunits2.0.dylibfile on MacOS) is in a non-standard location then its directory path should be added to the LD_LIBRARY_PATH environment variable. It may also be necessary to specify the location (directory path and file name) of the udunits2.xml file in the UDUNITS2_XML_PATH environment variable, although the default location is usually correct. For example, export UDUNITS2_XML_PATH=/home/user/anaconda3/share/udunits/udunits2.xml.

If you get an error that looks like assert(0 == _ut_unmap_symbol_to_unit(_ut_system, _c_char_p(b'Sv'), _UT_ASCII)) then setting the UDUNITS2_XML_PATH environment variable is the likely solution.

UDUNITS is available via conda with:

$ conda install -c conda-forge udunits2>=2.2.25

Alternatively, you can download and install UDUNITS directly from its source distribution following the documentation outlined on the unidata website

Environment variable configuration

You will need to add an environment variable to your system called ECCODES_DEFINITION_PATH that points to the definitions folder inside ecCodes. Once ecCodes is installed on your system, you can find this directory using the command:

find . -samefile */share/eccodes/definitions

If you encounter a warning from ecmwflibs about ignoring your specified environment variable, instead use the variable name ECMWFLIBS_ECCODES_DEFINITION_PATH

Transform FM15 files from the command line

#   basic cli command to transform TAC file of metar(s) and print resulting geojson records
#   both month and year as int values
transform-file example_metars.txt month year

Releasing

#   uploading to PyPI
#   make sure to update version number in pyproject.toml using vim or another IDE
rm -fr build dist *.egg-info
python3 -m build
twine upload dist/*

Contact

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

FM15_transform-0.0.9.tar.gz (220.2 kB view details)

Uploaded Source

Built Distribution

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

FM15_transform-0.0.9-py3-none-any.whl (223.5 kB view details)

Uploaded Python 3

File details

Details for the file FM15_transform-0.0.9.tar.gz.

File metadata

  • Download URL: FM15_transform-0.0.9.tar.gz
  • Upload date:
  • Size: 220.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for FM15_transform-0.0.9.tar.gz
Algorithm Hash digest
SHA256 1e014c7d33cc4e3aa41af80653519c5168f2b74a0bb55349dc09dbbeb455b03c
MD5 b35d16d0c76657cafb5ed85dcf966800
BLAKE2b-256 02c0a9a8460103ed90c6018b0422e6360ed69384cbe9a89507215344bcb6caa6

See more details on using hashes here.

File details

Details for the file FM15_transform-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: FM15_transform-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 223.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for FM15_transform-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 8cba987c7c7653d6d79a434117215278a36468fa1a39737a7a208759664a5d15
MD5 86d21f309ea0f9ce72f6f91082b8e3a5
BLAKE2b-256 d23a215e7b35beba815d421ebdae1612c376902ac311d0e1002b1935f055f057

See more details on using hashes here.

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