Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Second, drop your 'AMSUA.odb' database icon into the Odb Data field. This specifies the database for which the query will be performed.

Third, we need to specify the ODB/SQL query and the way the columns are interpreted to generate the plot. We want to perform the following query:

...

Having finished the modifications your icon editor should look like this:

 

Note
titleRemarks
  1. The ODB database for which the query is performed can be alternatively specified by the database path via the Odb Filename input field. Please note that the typed-in database path is only used by Metview if no database icon is present.
  2. The maximum number of rows accepted in the ODB retrieval is specified in the Odb Nb Rows input field. By default (-1) there is no upper limit for the number of rows.
  3. If column latlon_rad@desc is available in an ODB (it is defined for our 'AMSUA.odb' database) it tells us the geographical co-ordinate units. Its 0 value indicates degrees while 1 means radians (you can use the ODB Examiner to check this value for our database). Besides, it is worth mentioning that all ODBs retrieved from MARS, as a generic rule, use degrees as geographical co-ordinate units.

...

Now drop this icon into the plot to see the effect of the changes.

We used the Symbol Table Mode in our icon and set it to 'Advanced' which enabled us to automatically define intervals with a separate maker type, colour and size. These settings work in a similar way as in the Contouring icon.
Our palette was automatically generated from a colour wheel

...

Now open folder 'wind' inside your 'odb_tutorial' folder. Create a new ODB Visualiser icon and rename it 'wind_plot'. Open its editor and set ODB Plot Type to 'Geo Vectors' to indicate that we want to plot vectors on a map.
Then, change the icon to perform the query specified above for the 'CCMA.obs' icon located in this folder. This can be done in a similar fashion to our symbol plotting example. The main difference is that this time we plot wind data, so we need to work with the u and v wind components instead of scalar data values.

First, drop your 'CCMA.obs' ODB Database icon into the Odb Data field. This defines the database for which the query will be performed.

...

Right-click and visualise the icon to plot the retrieved data (please note that you can directly visualise this icon by skipping the execute step). This will bring up the Metview Display Window using the default visualisation assigned to wind plotting (your default settings might be different to the one used to generate this plot).

We will change the plot by applying a colour palette according to the wind speed and change the wind arrow size and thinning, as well.
Let's create a new Wind Plotting icon:

...

Wind Field Type

Arrows

Wind Advanced Method

On

Wind Arrow Unit Velocity

50.

Wind Thinning Factor

1.0

Wind Advanced Colour Max Level Colour

Red

Wind Advanced Colour Min Level Colour

Blue

Wind Advanced Colour Direction

Clockwise

 

Now drop this icon into the plot to see the effect of the changes.

We used the Wind Advanced Method in our icon that enabled us to automatically define wind speed intervals and assign a nice palette to them. These settings work in a similar way to the Contouring icon. Please note that our palette was automatically generated from a colour wheel by interpolating in clockwise direction between Wind Advanced Colour Min Level Colour and Wind Advanced Colour Max Level Colour.

...

Second, drop your 'AMSUA.odb' ODB Database icon into the Odb Data field. This specifies the database for which the query will be performed.

Last, we need to specify the ODB/SQL query and the way the columns are to be interpreted to generate the plot. We want to perform the following query:

...

Right-click and visualise the icon to plot the data (please note that you can directly visualise this icon by skipping the execute step). This will bring up the Metview Display Window using the default visualisation (black circles) assigned to this kind of plots.

We can change the symbol (its type, colour and size) used for the plot with a Symbol Plotting icon. This time you do not need to create a new icon since there is one called 'scatter_symbol' already prepared for you. Edit this icon to see its settings then simply drag it into the Display Window and see how your plot has been changed.

...

Right-click and visualise icon 'bin_plot' to retrieve the data, perform the binning and plot the resulting dataset. This will bring up the Metview Display Window using the default contouring visualisation assigned to gridded datasets (your default contouring settings might be different to the one used to generate this plot).

Since isolines is not the desired visualisation type in our case (our data is not smooth enough) we will to further customise the contouring settings. The best choice for us is to use grid shading since it applies shading for the grid cells themselves and we get the correct representation of our grid in the plot. (Please note that grid shading is different to cell shading, since the latter always involves an interpolation to define a new set of grid cells that the shading is applied for.)

...

Legend

On

Contour

Off

Contour Level Selection Type

Count

Contour Reference Level

0.

Contour Min Level

1.

Contour Shade Min Level

1.

Contour Level Count

20

Contour Shade

On

Contour Shade Technique

Grid Shading

Contour Shade Method

Area Fill

Contour Shade Max Level Colour

Red

Contour Shade Min Level Colour

Blue

Contour Shade Colour Direction

Clockwise

 

Now drop this icon into the plot to see the effect of the changes.

In our Contouring icon we set the minimum value to '1.' to exclude grid cells containing no points at all and used 20 intervals between the minimum and the maximum to define the colour palette. Please note that our palette was automatically generated from a colour wheel by interpolating in clockwise direction between Contour Shade Min Level Colour and Contour Shade Max Level Colour.

...

We will further customise the plot by changing the axis value ranges and adding axis labels and grid-lines to it. To change these properties we need a Cartesian View icon (it can be found in the Visual Definitions icon drawer).


This time you do not need to create a new icon since there is one called 'scatter_view' already prepared for you. Edit this icon to see how the view is constructed (please note that the axis properties are defined via the embedded Horizontal Axis and Vertical Axis icons). Then simply drag it into the Display Window and see how your plot has been changed.

Changing the Title

To change the automatically generated ODB title you need to simply drag an already prepared Text Plotting icon called 'title' into the Display Window.

...

Now your icon editor should look like this:

Note
titleRemarks
  • It is advised to use the full column names in the query because this fully complies with the SQL standards and newer versions of ODB require this as well.
  • We used aliases (e.g. as lat) since it highly simplifies the referencing to the columns in the visualisation and macro processing.
  • The ODB database for which the query is performed can be alternatively specified by the database path via the Odb Filename input field. Please note that the typed-in database path is only used by Metview if no database icon is present.
  • The maximum number of rows accepted in the ODB retrieval is specified in the Odb Nb Rows input field. By default (-1) there is no upper limit for the number of rows.

...

Save your ODB Filter icon (Apply) then right-click and execute to run the query. Within a few seconds the icon should turn green indicating that the retrieval was successful and has been cached. Now your icon behaves exactly like an ODB Database icon. Right-click examine to look at its content.


Now you can see that as we defined it in the query the resulting ODB contains only four columns: lat, lon, fg_dep and an_dep.

...

Now, if you execute this macro (right-click execute or click on the Play button in the Macro editor) you should see a Display Window popping up with this result (your plot might look different depending on your default symbol plotting settings):

 

Improving the Plot

In our plot the large increments (in terms of absolute value) are not clearly highlighted because the plot is dominated by the bright green colour assigned to the near-zero values. To enhance the plot we would like to apply another colour palette by using:

...

Now edit your MARS Retrieval icon so that it could perform this retrieval.
 

  Please be aware that the Obsgroup parameter in the icon editor does not contain the string "hirs". Instead it offers a list of numerical IDs. The ID of HIRS is 2.

...