Skip to end of metadata
Go to start of metadata

Download source and data


BUFR Synop_TEST
#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 bufr file
bd = read("synop.bufr")

# define observation plotting
obsp = mobs(
    obs_distance_apart : 1.5,
    obs_size           : 0.25,
    obs_ring_size      : 0.2
    )

# define land-sea shading
coast = mcoast(
    map_coastline_land_shade        : "on",
    map_coastline_land_shade_colour : "grey",
    map_coastline_sea_shade         : "on",
    map_coastline_sea_shade_colour  : "RGB(0.7903,0.8438,0.943)",
    map_grid_colour                 : "charcoal",
    map_grid_longitude_increment    : 10
    )


# define map
view = geoview(
    map_area_definition : "corners",
    area                : [30,-16,75,45],
    coastlines          :  coast
    )

# define the output plot file
setoutput(pdf_output(output_name : 'synop_map'))

# generate plot
plot(view, bd, obsp)
BUFR Synop_TEST
#  **************************** 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 bufr file
bd = mv.read("synop.bufr")

# define observation plotting
obsp = mv.mobs(
    obs_distance_apart = 1.5,
    obs_size           = 0.25,
    obs_ring_size      = 0.2
    )

# define land-sea shading
coast = mv.mcoast(
    map_coastline_land_shade        = "on",
    map_coastline_land_shade_colour = "grey",output_width : 1200
    map_coastline_sea_shade         = "on",
    map_coastline_sea_shade_colour  = "RGB(0.7903,0.8438,0.943)",
    map_grid_colour                 = "charcoal",
    map_grid_longitude_increment    = 10
    )


# define map
view = mv.geoview(
    map_area_definition = "corners",
    area                = [30,-16,75,45],
    coastlines          =  coast
    )

mv.setoutput(mv.pdf_output(output_name = 'synop_map'))

# generate plot
mv.plot(view, bd, obsp)
  • No labels