Name | PyFa-tool JSON |
Version |
0.0.1
JSON |
| download |
home_page | |
Summary | A python wrapper on RFa for FA files using Xarray |
upload_time | 2023-12-13 10:44:44 |
maintainer | Thomas Vergauwen |
docs_url | None |
author | Thomas Vergauwen |
requires_python | >=3.9,<4.0 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# PyFa-tool
Python wrapper on Rfa using [Xarray](https://docs.xarray.dev/en/stable/). The goal of this package is to import FA files into Xarray and provide basic and user friendly commands for inspecting FA files.
## Required software and install
This package is developed for Linux distributions with a Python3 installation. In addition, R should be installed and the [Rfa](https://github.com/harphub/Rfa) library as well.
For the most stable versions use the github main, or use the version on [PyPI](https://pypi.org/project/PyFa-tool/). Install this with:
```bash
pip install PyFa-tool --upgrade
```
## Setup
There are two ways to use the PyFa package:
* Use this as a python package to convert FA to Xarray, and make your own analysis
* Use this as backand for shell commands to make some basic visualisations.
### Python package usage
To use PyFa as a package, import it and try the available functions:
```python
import pyfa_tool as pyfa
# Get available fields
fielddf = pyfa.get_fields(fa_filepath=path_to_fa_file)
print(fielddf) #Note that not all rows are printed (default pandas settings).
# convert to an Xarray.DataArray
dxr = pyfa.FA_to_Xarray(fa_filepath=path_to_fa_file,
fieldname='SURFTEMPERATURE',
target_crs='EPSG:4326')
# info and plotting:
print(dxr) #Don' panic if you see Nan's in the data, this is often so for the corners because of reprojecting.
dxr.plot() #Matplotlib backend
```
### Setup the shell commands
To use this package as a shell command, execute following python code only once:
```python
import pyfa_tool as pyfa
pyfa.setup_shell_command()
```
Restart a terminal, and you are ready to go.
This file will add the `pyfa` alias to your `~\.bashrc` file, and will propagate arguments to the python package.
## Shell Usage
The FA file, and some settings are given throug arguments ex.:
```bash
pyfa FA_file --print_fields --proj=EPSG:4326 --save
```
To see all possible arguements run `pyfa -h`. (Don't forget to setup the shell commands first)
Raw data
{
"_id": null,
"home_page": "",
"name": "PyFa-tool",
"maintainer": "Thomas Vergauwen",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "thomas.vergauwen@meteo.be",
"keywords": "",
"author": "Thomas Vergauwen",
"author_email": "thomas.vergauwen@meteo.be",
"download_url": "https://files.pythonhosted.org/packages/a1/c7/ec768d16d97c5aaef3149ed510c3375b2248820010a374883f3d889fdb39/pyfa_tool-0.0.1.tar.gz",
"platform": null,
"description": "# PyFa-tool\nPython wrapper on Rfa using [Xarray](https://docs.xarray.dev/en/stable/). The goal of this package is to import FA files into Xarray and provide basic and user friendly commands for inspecting FA files.\n\n\n## Required software and install\n\nThis package is developed for Linux distributions with a Python3 installation. In addition, R should be installed and the [Rfa](https://github.com/harphub/Rfa) library as well.\n\n\nFor the most stable versions use the github main, or use the version on [PyPI](https://pypi.org/project/PyFa-tool/). Install this with:\n```bash\npip install PyFa-tool --upgrade\n```\n\n## Setup\nThere are two ways to use the PyFa package:\n* Use this as a python package to convert FA to Xarray, and make your own analysis\n* Use this as backand for shell commands to make some basic visualisations.\n\n### Python package usage\n To use PyFa as a package, import it and try the available functions:\n\n ```python\nimport pyfa_tool as pyfa\n\n# Get available fields\nfielddf = pyfa.get_fields(fa_filepath=path_to_fa_file)\nprint(fielddf) #Note that not all rows are printed (default pandas settings).\n\n\n# convert to an Xarray.DataArray\ndxr = pyfa.FA_to_Xarray(fa_filepath=path_to_fa_file,\n fieldname='SURFTEMPERATURE',\n target_crs='EPSG:4326')\n# info and plotting:\nprint(dxr) #Don' panic if you see Nan's in the data, this is often so for the corners because of reprojecting.\ndxr.plot() #Matplotlib backend\n```\n\n\n### Setup the shell commands\nTo use this package as a shell command, execute following python code only once:\n\n```python\nimport pyfa_tool as pyfa\npyfa.setup_shell_command()\n```\nRestart a terminal, and you are ready to go.\nThis file will add the `pyfa` alias to your `~\\.bashrc` file, and will propagate arguments to the python package.\n\n\n## Shell Usage\nThe FA file, and some settings are given throug arguments ex.:\n```bash\npyfa FA_file --print_fields --proj=EPSG:4326 --save\n```\n\nTo see all possible arguements run `pyfa -h`. (Don't forget to setup the shell commands first)\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "A python wrapper on RFa for FA files using Xarray",
"version": "0.0.1",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2c30cc2d0e29132ab1039ac46c48ff91194ad1889effd52bb62b86bd12b9a5c2",
"md5": "ef25622f1c5fa2f9af8de9d20b123284",
"sha256": "c2fc6d4dd11d3da4bf4cc525d8db9d41f9a48f04ca046b30e219ac5c912727c0"
},
"downloads": -1,
"filename": "pyfa_tool-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ef25622f1c5fa2f9af8de9d20b123284",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 12015,
"upload_time": "2023-12-13T10:44:42",
"upload_time_iso_8601": "2023-12-13T10:44:42.114418Z",
"url": "https://files.pythonhosted.org/packages/2c/30/cc2d0e29132ab1039ac46c48ff91194ad1889effd52bb62b86bd12b9a5c2/pyfa_tool-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a1c7ec768d16d97c5aaef3149ed510c3375b2248820010a374883f3d889fdb39",
"md5": "d75d6c1725e2acd159fe05e3f1fa2f32",
"sha256": "7ba3cc37155ededc317190be4b7b80f99f5b9662a1b1b2eb61d3a0b79f8da1d3"
},
"downloads": -1,
"filename": "pyfa_tool-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "d75d6c1725e2acd159fe05e3f1fa2f32",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 9595,
"upload_time": "2023-12-13T10:44:44",
"upload_time_iso_8601": "2023-12-13T10:44:44.241104Z",
"url": "https://files.pythonhosted.org/packages/a1/c7/ec768d16d97c5aaef3149ed510c3375b2248820010a374883f3d889fdb39/pyfa_tool-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-13 10:44:44",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pyfa-tool"
}