Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Confirmed.

For preparations and running the FLEXPART simulation needed for this tutorial click here ...

Note

To start this tutorial please enter folder 'forward'.

Info

To plot a particular parameter and level we need to filter the desired fields from the resulting FLEXPART output GRIB file. Unfortunately, Metview's Grib Filter icon cannot handle these files (partly due to the local GRIB definition they use) so we need to use other means to cope with this task. For this reason and also to make FLEXPART output handling easier a set of Metview Macro Library Functions were developed. We will use these functions in the example below.

Inspecting the FLEXPART GRIB file

...

Code Block
languagepy
dIn="result_fwd/"
inFile=dIn  & "conc_s001.grib"
lev=8000
par="feflux"
 
#Read fields on the given height level
g=flexpart_filter(source: inFile,
                  param: par,
                  levType: "hl", 
                  level: lev)

Next, we define the contouring. The

...

"feflux" fields have the units of "kg m**-2 s**-1

...

" but with the current value range "ng m**-2 s**-1

...

" units would better fit for contouring. To achieve this we simply multiply the "feflux" fieldset with 1012:

Code Block
languagepy
g=g*1E12

The contour definition itself goes like this:

Code Block
languagepy
titleDefine contouring
collapsetrue
#The contour levels
cont_list=[1,10,50,100,150,200,250,500,750,1000,2000,4000]
 
#Define contour shading
flux_shade = mcont(
    legend  						:   "on",
    contour 						:   "off",  
    contour_level_selection_type	:   "level_list",
    contour_level_list  			: 	cont_list,
    contour_label   				:   "off",
    contour_shade   				:   "on",
    contour_shade_method    		:   "area_fill",
    contour_shade_max_level_colour  :   "red",
    contour_shade_min_level_colour  :   "RGB(0.14,0.37,0.86)",
    contour_shade_colour_direction  :   "clockwise",    
    contour_method					: 	"linear"
    )

...