Metview's documentation is now on readthedocs!

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Download source and data


Spherical harmonics spectrum Example
#Metview Macro

# **************************** LICENSE START ***********************************
#
# Copyright 2019 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 ************************************
#

# read grib file - contains only one
# spherical harmonic (spectral) field
f = read("z_for_spectra.grib")

# generate spectra plot definition
sp = spec_graph(
    data: f,
    truncation: 106,
    y_axis_type: "logartihmic"
    )
    
# define the output plot file
setoutput(pdf_output(output_name : 'spectra'))

# generate the plot
plot(sp)

 
Spherical harmonics spectrum Example
import metview as mv

#Metview Macro

# **************************** LICENSE START ***********************************
#
# Copyright 2019 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 grib file - contains only one
# spherical harmonic (spectral) field
f = mv.read("z_for_spectra.grib")

# generate spectra plot definition
sp = mv.spec_graph(
    data=f,
    truncation=106,
    y_axis_type="logartihmic"
    )
    
# define the output plot file
mv.setoutput(mv.pdf_output(output_name='spectra'))

# generate the plot
mv.plot(sp)

 
  • No labels