#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)
|