Master | Develop | |
---|---|---|
Lint | ||
Plot data from NWP output (BETA - in development).
The "word" dlotter is a contraction of DMI and Plotter.
Installation should be relatively simple.
Install using pip: pip install dlotter
One dependency is "cartopy". pip installation of cartopy seems to be currently broken, thus leads to a failed installation of dlotter. If this happens, either build cartopy from source or with conda (see section "Prerequisites").
Submodules can be imported, but this software is designed to be used as a CLI (Command-Line-Interface), by calling the __main__
module. See examples on the wiki page: https://github.com/dmidk/dlotter/wiki
python -m dlotter
: Prints a help message
python -m dlotter plot
: Calls the plot submodule and prints a help message (as flags are needed for this command to work)
python -m dlotter plot -p t2m:w10m -d /path/to/grib2/files/ --filetype grib2 --verbose
: Plots t2m and w10m from grib2 files in the directory specified.
python -m dlotter plot -p t2m:w10m -d /path/to/grib2/files/ --prefix 0 --filetype grib2 --limit-files 4 --verbose
: Limits to use the first 4 files sorted by name and only use files starting with "0" in their name.
python -m dlotter plot -p t2m:w10m -d /path/to/netcdf/files/ --postfix .nc --filetype netcdf --verbose
: Plots data from netcdf files with the postfix ".nc" in the directory specified.
'-a' or '--area' dk,neu
'-d' or '--directory' /path/to/files/
'-p' or '--parameters' t2m:w10m:precip:slp:td2m:tcc:lmhc
areas:
dk
: Denmarkneu
: Northern Europegl
: Greenlanddisko
: Disko Baysjalland
: Zealandeurope
: Europefaroes
: Faroe Islandsscoresbysund
: Scoresbysund (Greenland)
Parameters:
t2m
: 2 Meter Temperaturew10m
: 10 Meter Wind Speedprecip
: Accumulated Precipitationslp
: Sea Level Pressuretd2m
: 2 Meter Dewpoint Temperaturetcc
: Total Cloud Coverlmhc
: Low, Medium, High clouds
- All files should be in the same projection. This is to speed up the plotting.
- All files will be plotted in the same domain. This is also to speed up plotting.
- All data at one time are in the same file
dlotter is a script tool based on python. Dependencies is defined in dlotter.yml
and a python environment can be made using (mini)conda:
conda env create -f dlotter.yml
To build from the source code:
python setup.py sdist bdist_wheel
To install locally:
pip install dist/dlotter-$VERSION-py3-none-any.whl --upgrade
To deploy to PyPi (Only users with access can do this):
python -m twine upload dist/*