Python wrapper on Rfa using Xarray. The goal of this package is to import FA files into Xarray and provide basic and user friendly commands for inspecting FA files.
This package is developed for Linux distributions with a Python3 installation. In addition, R should be installed and the Rfa library as well.
For the most stable versions use the github main, or use the version on PyPI. Install this with:
pip install PyFa-tool --upgrade
There are two ways to use the PyFa package:
To use PyFa as a package, take a look at these notebook examples:
To use this package as a shell command, execute following python code only once:
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.
The FA file, and some settings are given throug arguments ex.:
pyfa -d PFAR07+0001 # --> describe the content of a file
pyfa -c --whitelist=CLSTEMPERATURE,CLSVENT.ZONAL --proj=EPSG:4326 PFAR*+000* # --> convert a FA-file, or a collection of them (by regex) to a netCDF file.
pyfa -p --whitelist=CLSTEMPERATURE --proj=EPSG:4326 PFAR07+0002 vmin=294 cmap='viridis' # --> 2D plot of (reprojected) field with **kwargs passed to the plot.
To see all possible arguements run pyfa -h
. (Don't forget to setup the shell commands first)