Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated the Migration 3-4 page

Things to document:

  • pgraph -> mgraph
  • ptext->mtext
    new projections
  • axis plotting
  • cross sections, etc  (4.4)
  • annotation view  (4.4)

Introduction

The intention behind this page is not to advertise the new features of Metview 4, but to help users migrate existing plots and macros from Metview 3 to Metview 4. In general, icons and macros which do no plotting should require very little, if any, modification. Many icons and macros used to produce plots will likewise require little or no modification, but some will need to be updated. These changes, plus some other points of interest are briefly described on this page.

System Settings, Macro libraries and Defaults

...

Although your old icons will still (mostly) work in Metview 4, you may wish to convert some of them to the new formats in order to use the new parameters available. As an example, suppose you have a Contouring icon from Metview 3 which you wish to convert into a Metview 4 Contouring icon. In Metview 4, first create a new contour icon. Edit this icon, and drop your old icon into the icon editor. The parameters which are valid in the new icon will be transferred; you can now click Apply to save the new icon.

...

Metview's Map View has been replaced by Geo View, allowing access to the new projections of Metview 4. Note that there is now a new parameter with which you must specify whether you wish a global or non-global area. Legacy Map View icons will still work.

Legends

Metview 4 has a new icon for handling legends - the Legend icon in the Visual Definitions drawer. This replaces the legend functionality that used to be in the Text Plotting and Legend Entry icons.

Text Plotting

Metview 4's Text Plotting icon no longer has any legend parameters - these are all now contained in the Legend icon. In addition, the way to specify user text in a title has changed a little. Metview 3 contained options to specify whether a title contained automatic text, user text or both; Metview 4 instead has a default title line which is "<magics_title/>". Any text line with this string will have the automatic title; lines without it will not. Magics++ also has features, still to be fully documented, to automatically add GRIB meta-data to a 'semi-automatic' plot title using GRIB_API keys. For instance, where Metview 3 used !PARAM!  Metview 4 would use <grib_info key='name'/>. Another commonly-encountered change is that instead of Text Reference Character Height, Metview now has Text Font Size. In Macro, ptext is replaced by mtext.

Curve Plotting

This is perhaps the area which has experienced the greatest change. Curve plotting is now achieved via one of the Visualiser icons. The Curve View is replaced by the more general-purpose purpose Cartesian View. There is a Macro example which shows, side by side, Metview 3 and 4 code for plotting curves - Migration: Curve Plotting.

Symbol Plotting

The new Symbol Plotting icon provides access to a particularly useful feature of Magics - Advanced symbol plotting mode. This allows the automatic creation of colour scales in much the same way as is available for contouring. In Macro, psymb is replaced by msymb.

Graph Plotting

The new Graph Plotting icon is very similar to that in Metview 3. In Macro, pgraph is replaced by mgraph.

Vectors

Metview 3 had a Vectors icon which was used for combining two scalar fields and plotting them as a vector pair. It also allowed the use of a third field for the purpose of colouring the vector arrows. This functionality is now in a new icon, Grib Vectors.

...

In Metview 4, the default behaviour is to always overlay fields from different sources, even if their meta-data, such as date/time, do not match. This is different from Metview 3, whose default behaviour was to only overlay data whose timestamps 'match'. In Metview 3, there was a separate icon, the Overlay Control icon, which could be dropped into a View icon to change the overlay settings. In Metview 4 this is simpler, with a Map Overlay Overlay  Control parameter directly in the Geographical View icon.

Cross Section Data, Average Data, Hovmoeller Data

These icons are currently restricted to returning a single frame (Metview 3 could, for instance, return a set of cross sections if there were multiple parameters or times in the input data). This feature is in the process of being implemented, and further documentation will be available specifically for the 4.4 release of Metview, which contains further small revisions to the interface.

Display Window Contents

The Display Window's Contents drawer was an advanced feature which enabled the quick fine-tuning of a plot. This feature is not currently enabled in Metview 4, although it is planned to be in the future.

Macro

Metview's macro language now handles missing values in its data in a more consistent and useful way. Previously, functions such as integrate() returned a 'missing value indicator' if all its input values were missing. This was not easy to test for, and computations could use the result incorrectly without realising it. Now, all such functions return a nil variable when their inputs are invalid. Macros which do not test for this condition will fail if they try to use a nil variable in a computation. Example code:

...