Versions Compared

Key

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

...

Geopoints is an ASCII format which can be generated 'by hand', or could be the result of a Metview computation. For example, the Observation Filter icon can return a geopoints variable as the result of filtering BUFR data (see Observation filtering and plotting Example). Several geopoints variables can be contained within a Geopointset variable (currently supported by Macro and Python only, not by the user interface or the plotting).

The Metview Macro language has a number of functions available for the input, output, handling and operating on geopoints. Geopoints can be visualised with Metview and can be customised using symbol visual definitions - see Symbol Plotting. Metview can also convert between Geopoints and GRIB - see Geopoints To Grib and Grib To Geopoints.

...

The format does not care about the alignment of columns, it just requires that there is at least one whitespace character between entries. The elements that must be present are an initial line tagged with the keyword #GEO, a line tagged with the keyword #DATA and the data points themselves. There can also be an optional section for meta-data, which must start with #METADATA - see section below for details. The lines in-between the header and the data sections are for human-readable information only and are not used in the interpretation of the file. All formats apart from the Standard format require an additional line in the header section to specify the format; this line must start with #FORMAT followed by the name of the format being used.

...

Currently the level, date and time can only be used for filtering (or can be extracted into  Vector variables for other uses). They must be present in the file but you can specify any dummy value if you do not intend to use them.

Storing and retrieving meta-data

A geopoints file can have a section of meta-data key-value pairs in its header before the #DATA section, as illustrated here:

Code Block
languagepowershell
#GEO
PARAMETER = 12030
#METADATA
param=temperature
date=20130804
time=1200
level=0.2
#lat	long	level	date	time	value
#DATA
55.01   8.41    0.2     20130804  1200  294.4
54.33   8.60    0.2     20130804  1200  296.9

Here, four pieces of meta-data are stored. They can be set and queried in the Macro (or Python) language, like this:

Code Block
data = read('geopoints_with_metadata.gpt')
md = metadata(data)
print(md)
print(md['level'])

Output:

Code Block
(date:20130804,level:0.2,param:temperature,time:1200)
0.2

Meta-data can also be set by passing a definition like this:

Code Block
gpt_new = set_metadata(gpt, (mykey1:'val1', mykey2: 5))


Operations between geopoints and fieldsets

...