# Title: 2m Temperature Plot
# **************************** LICENSE START ***********************************
#
# Copyright 2018 ECMWF. This software is distributed under the terms
# of the Apache License version 2.0. In applying this license, ECMWF does not
# waive the privileges and immunities granted to it by virtue of its status as
# an Intergovernmental Organization or submit itself to any jurisdiction.
#
# ***************************** LICENSE END ************************************
import metview as mv
# read the data from a GRIB file
data = mv.read('2m_temperature.grib')
# use the automatic ecCharts style for contouring
contours = mv.mcont(contour_automatic_setting = 'ecchart')
# define the output plot file
mv.setoutput(mv.pdf_output(output_name = 'plot_t2m'))
# plot the data with the style
mv.plot(data, contours)
|