Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ecmwf/magics-python
Python interface to Magics meteorological plotting package
https://github.com/ecmwf/magics-python
Last synced: about 2 months ago
JSON representation
Python interface to Magics meteorological plotting package
- Host: GitHub
- URL: https://github.com/ecmwf/magics-python
- Owner: ecmwf
- License: apache-2.0
- Created: 2018-09-03T10:12:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-17T12:41:13.000Z (over 1 year ago)
- Last Synced: 2024-10-31T14:36:59.871Z (3 months ago)
- Language: Python
- Size: 966 KB
- Stars: 49
- Watchers: 18
- Forks: 12
- Open Issues: 8
-
Metadata Files:
- Readme: README.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-earthobservation - magics - Python interface to Magics meteorological plotting package. (Language based EO Libraries / Python)
README
Magics is the latest generation of the ECMWF's meteorological plotting software and can be either
accessed directly through its Python or Fortran interfaces or by using Metview.Features:
- supports plotting of contours, wind fields, observations, satellite images, symbols, text, axis and graphs (including boxplots)
- can plot GRIB 1 and 2 coded data, gaussian grid, regularly spaced grid and fitted dataLimitations:
- development stage: **Alpha**,
Installation
------------The package is installed from PyPI with::
$ pip install Magics
System dependencies
~~~~~~~~~~~~~~~~~~~The python module depends on the ECMWF *Magics* and *eccodes* libraries
They can be installed from PyPI with::
$ pip install ecmwflibsYou may run a simple selfcheck command to ensure that your system is set up correctly::
$ python -m Magics selfcheck
Found: Magics 'Magics 4.10.0'.
Library: /usr/local/lib/python3.9/site-packages/ecmwflibs/.dylibs/libMagPlus.dylib
Magics home: /usr/local/lib/python3.9/site-packages/ecmwflibs
Your system is ready.Usage
-----First, you need a well-formed GRIB file, if you don't have one at hand you can download our
a 2m temperature grib file::$ wget http://download.ecmwf.int/test-data/magics/2m_temperature.grib
You may try out the high level API in a python interpreter::
from Magics import macro as magics
name = 'magics'
#Setting of the output file name
output = magics.output(output_formats = ['png'],
output_name_first_page_number = "off",
output_name = "magics")#Import the data
data = magics.mgrib(grib_input_file_name = "2m_temperature.grib", )#Apply an automatic styling
contour = magics.mcont( contour_automatic_setting = "ecmwf", )
coast = magics.mcoast()
magics.plot(output, data, contour, coast)Running the test program will create a png named magics.png
You can find notebooks examples :
https://github.com/ecmwf/notebook-examples/tree/master/visualisationContributing
------------The main repository is hosted on GitHub,
testing, bug reports and contributions are highly welcomed and appreciated:https://github.com/ecmwf/magics-python
Please see the CONTRIBUTING.rst document for the best way to help.
Lead developer:
- `Sylvie Lamy-Thepaut `_ - ECMWF
Main contributors:
- `Stephan Siemen `_ - ECMWF
- `Alessandro Amici `_ - B-Open
- `Daniel Tipping `_ - `Old Reliable `_
- `Ian Vermes `_ - `Old Reliable `_License
-------Copyright 2017-2018 European Centre for Medium-Range Weather Forecasts (ECMWF).
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License... |Travis Build| image:: https://img.shields.io/travis/ecmwf/magics-python/master.svg?logo=travis
:target: https://travis-ci.org/ecmwf/magics-python/branches
.. |Appveyor Build| image:: https://img.shields.io/appveyor/ci/ecmwf/magics-python/master.svg?logo=appveyor
:target: https://ci.appveyor.com/project/ecmwf/magics-python/branch/master
.. |ReadTheDocs Build| image:: https://readthedocs.org/projects/magics-python/badge/?version=latest
:target: https://magics-python.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status