For preparations and running the FLEXPART simulation needed for this tutorial click here ...
To start this tutorial please enter folder 'forward'.
Inspecting the FLEXPART GRIB file
Before seeing the macro code to generate the plot we inspect the file itself we want to plot. Double-click on the 'flux_s001.grib' GRIB icon' in folder 'result_fwd' to start up the Grib Examiner. We can see that our GRIB file contains various flux fields. We can find out further details about the parameters by setting the Dump mode to Namespace and Namespace to Parameter in the examiner:
Generating the plot
The macro to visualise the flux fields on a given level is 'plot_flux.mv'.
In the macro first we define the level (8000 m) and the parameter ("feflux" = eastward flux) we want to plot. Then we call flexpart_filter() to extract the data.
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:
g=g*1E12
The contour definition itself goes like this:
Next, we build the title with flexpart_build_title(). Please note that we need to explicitly specify the plotting units!
title=flexpart_build_title(data: g, fontsize: 0.3, units: "ng m**-2 s**-1")
Finally we define the map view:
and generate the plot:
plot(view,g,flux_shade,title)
Having run the macro we will get a plot like this (after navigating to step 39h):