Skip to main content

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 data

Limitations:

  • 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 ecmwflibs

You 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/visualisation

Contributing

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:

Main contributors:

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.

Release files for Magics 1.5.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Magics 1.5.8
File Size Uploaded
Magics-1.5.8.tar.gz 22.6 kB Details

Release files / Magics-1.5.8.tar.gz

Download URL Magics-1.5.8.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7df4241802fb552ee052da18190a5266a8faff7feecc70779cb5e1809625fb90
BLAKE2b-256 checksum
How to use checksums
94f87247ee384c0044c4d9d950a3d2ea1003dca89c626eaf4a90ce0eb3a02d99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

1.5.8 This release

1 release file

1.5.7

1 release file

1.5.6

1 release file

1.5.5

1 release file

1.5.4

1 release file

1.5.3

1 release file

1.5.2

1 release file

1.5.0

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.0.11

1 release file

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page