# 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
- Python 3.7 and above
- [ecCodes](https://confluence.ecmwf.int/display/ECC)
- [UDUNITS-2](https://www.unidata.ucar.edu/software/udunits/)
### Dependencies
Dependencies are listed in requirements.txt. Dependencies are automatically installed during FM15_transform installation.
### pip
Install latest stable version from [PyPI](https://pypi.org/project/FM15_transform).
```bash
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:
```bash
$ 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](https://docs.unidata.ucar.edu/udunits/current/#Source)
### 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:
```bash
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
```bash
# 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
```bash
# 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
* [Alex Thompson](https://github.com/aothompson)
Raw data
{
"_id": null,
"home_page": null,
"name": "FM15-transform",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "WMO, METAR, FM-15, BUFR, decoding, weather, observations",
"author": null,
"author_email": "Alexander Thompson <alexander.thompson@noaa.gov>",
"download_url": "https://files.pythonhosted.org/packages/e4/0b/ae6cf50a2d5da927293eed85c932d941e5b36b8fd7f4402b58e902f41b0b/fm15_transform-0.0.18.tar.gz",
"platform": null,
"description": "# FM15_transform\n\nFM15_transform provides functionality to transform raw FM15 (METAR) TAC messages\ninto their corresponding bufr4 translations as well as extraction of geojson records\nof the individual observations formatted for use by a WIS2 node.\n\n## Installation\n\n### Requirements\n- Python 3.7 and above\n- [ecCodes](https://confluence.ecmwf.int/display/ECC)\n- [UDUNITS-2](https://www.unidata.ucar.edu/software/udunits/)\n\n### Dependencies\n\nDependencies are listed in requirements.txt. Dependencies are automatically installed during FM15_transform installation.\n\n### pip\n\nInstall latest stable version from [PyPI](https://pypi.org/project/FM15_transform).\n\n```bash\npip3 install FM15_transform\n```\n\n### UDUNITS-2 Installation and Configuration\n\nUDUNITS-2 is a C library that provides support for units of physical quantities\n\nIf 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```.\n\nIf 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.\n\nUDUNITS is available via conda with:\n\n```bash\n$ conda install -c conda-forge udunits2>=2.2.25\n```\n\nAlternatively, you can download and install UDUNITS directly from its source distribution following the documentation outlined\non the [unidata website](https://docs.unidata.ucar.edu/udunits/current/#Source)\n\n### Environment variable configuration\n\nYou will need to add an environment variable to your system called ```ECCODES_DEFINITION_PATH``` that points to the definitions\nfolder inside ecCodes. Once ecCodes is installed on your system, you can find this directory using the command:\n\n```bash\nfind . -samefile */share/eccodes/definitions\n```\n\nIf you encounter a warning from ecmwflibs about ignoring your specified environment variable, instead use the variable name ```ECMWFLIBS_ECCODES_DEFINITION_PATH```\n\n## Transform FM15 files from the command line\n\n```bash\n# basic cli command to transform TAC file of metar(s) and print resulting geojson records\n# both month and year as int values\ntransform-file example_metars.txt month year\n```\n\n## Releasing\n\n```bash\n# uploading to PyPI\n# make sure to update version number in pyproject.toml using vim or another IDE\nrm -fr build dist *.egg-info\npython3 -m build\ntwine upload dist/*\n```\n\n## Contact\n\n* [Alex Thompson](https://github.com/aothompson)\n",
"bugtrack_url": null,
"license": null,
"summary": "Package for converting FM15 METAR TAC messages or an individual METAR message to BUFR4",
"version": "0.0.18",
"project_urls": {
"Bug Tracker": "https://github.com/pypa/sampleproject/issues",
"Homepage": "https://github.com/pypa/sampleproject"
},
"split_keywords": [
"wmo",
" metar",
" fm-15",
" bufr",
" decoding",
" weather",
" observations"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c82aea195880bde2382a6d291037df1ee78e676fb05c24a268ebbd99b761e90e",
"md5": "05158fdb691180086d58d594de026470",
"sha256": "7b52d65e341660da890b7ea6fc1f34e0db8a447497086b9cdfb38a8fd49d6933"
},
"downloads": -1,
"filename": "FM15_transform-0.0.18-py3-none-any.whl",
"has_sig": false,
"md5_digest": "05158fdb691180086d58d594de026470",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 223752,
"upload_time": "2024-08-12T16:42:56",
"upload_time_iso_8601": "2024-08-12T16:42:56.849104Z",
"url": "https://files.pythonhosted.org/packages/c8/2a/ea195880bde2382a6d291037df1ee78e676fb05c24a268ebbd99b761e90e/FM15_transform-0.0.18-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e40bae6cf50a2d5da927293eed85c932d941e5b36b8fd7f4402b58e902f41b0b",
"md5": "a54755d3f2737b8b54f5c548485f4b22",
"sha256": "b2f505ade2a67e32b27b2e19db2151a531abcd233e5ccfec6f34528f70734c28"
},
"downloads": -1,
"filename": "fm15_transform-0.0.18.tar.gz",
"has_sig": false,
"md5_digest": "a54755d3f2737b8b54f5c548485f4b22",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 220442,
"upload_time": "2024-08-12T16:42:58",
"upload_time_iso_8601": "2024-08-12T16:42:58.441249Z",
"url": "https://files.pythonhosted.org/packages/e4/0b/ae6cf50a2d5da927293eed85c932d941e5b36b8fd7f4402b58e902f41b0b/fm15_transform-0.0.18.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-12 16:42:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pypa",
"github_project": "sampleproject",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fm15-transform"
}