Diana User Guide: File formats |  Previous: Vertical crossection functions |  Next: Batch plotting |  Index

Description and specification of supported file formats in Diana

Object files

Weather objects (fronts, symbols, areas etc.) are stored in object files which will normally have the time as extension on the form .yyyymmddhhmm. An example of such a file is given below:
Date=200510070900;

Object=Front;
Type=Warm front;
LongitudeLatitude=
-9.02711,59.8912,
-3.86701,62.8109,
5.02399,65.9834;
RGBA=255,0,0,255;
!
Object=Symbol;
Type=Fog;
Size=10;
LongitudeLatitude=
1.86341,66.0907;
RGBA=128,128,0,255;
!
Object=Symbol;
Type=Low pressure;
Size=10;
LongitudeLatitude=
0,82.2265;
RGBA=255,0,0,255;
!
Object=Symbol;
Type=Texts;
Text=F~9;
Size=10;
LongitudeLatitude=
0.532281,75.0545;
RGBA=0,0,0,255;
!


LABEL anno=<text="Surface analysis for 2005-10-07 09 UTC"> tcolour=red bcolour=black fcolour=white:200 polystyle=both halign=left valign=top font=Helvetica fontsize=12

Observations in BUFR format

Diana supports reading observations in BUFR format with support of standard WMO and rdb templates. More informations on wich parameters that are decoded can be found on https://diana.wiki.met.no/doku.php?id=diana_bufr

Observations in ascii format

An simple example an observation ascii file is given below:

[COLUMNS
Date:d      Time:t:"some text"     Lon:lon     Lat:lat      RRR:r   Station:s   Icon:image]

[DATA]
2004-11-20  12:00:00               10.86     59.55        0.4      "Dear home" wbkz_green
2004-11-20  12:00:00               10.51     59.89        0.1      Home        wbkz_red
2004-11-20  12:00:00                9.99     59.19        6.3      Somewhere   wbkz_white

DeltaTime - special parameter showing the difference between nowtime and obstime. When adding DeltaTime in COLUMNS, DeltaTime will be calculated for every replot.
[COLUMNS
Date:d      Time:t     Lon:lon     Lat:lat DeltaTime:r]

[DATA]
2004-11-20  12:00:00  10.86     59.55
2004-11-20  12:10:00  10.51     59.89

Header

CommandExampleDescription
UNDEFINED[UNDEFINED NaN,Inf] NaN and Inf are treated as undefined values
SKIP_DATA_LINES[SKIP_DATA_LINES 3] Skip first 3 data lines
LABEL[LABEL text="Label text"] Syntax: see Labels
SEPARATOR[SEPARATOR ;] Character used to separate the data colomns. Default separator is space
COLUMNS[COLUMNS Date:d Time:t:"some text" Lon:r Lat:r] name:type or name:type:tooltip
DATA[DATA] Start of data section

Column types

Column typeDescription
r Real number
i Integer number
s String
d Date (yyyy-mm-dd)
t Time (HH:MM:SS)
year yyyy
month mm
day dd
hour HH
time MM
lat Latitude in degrees
lon Longitude in degrees
dd Wind direction in degrees <0,360]
ff Wind speed in m/s
ffk Wind speed in knots
image Name of xpm, must be defined in setup

Time

Header

The header information can be given: The last to alternatives are used when plotting asciifiels with a different format. An example of a headerfile and a seperate datafile is given below:

Headerfile:
[SKIP_DATA_LINES 1]
[SPLIT_CHAR ;]
[COLUMNS 
;DEPARTMENT:s;DEPT_NO:s;MUNICIPALITY:s;MUNI_NO:s;ST_NAME:s;STNR:s;UTM_E:s;UTM_N:s;AMSL:s;LAT_DEC:lat;LON_DEC:lon;WMO_NO:s]
[DATA]

Datafile:
DEPARTMENT;DEPT_NO;MUNICIPALITY;MUNI_NO;ST_NAME;STNR;UTM_E;UTM_N;AMSL;LAT_DEC;LON_DEC;WMO_NO
-999;-1;;-1;TESTSTASJON 86;99986;-999;-999;-999;-999;-999;-999
-999;-1;;-1;TROLL I ANTARKTIS;99990;-999;-999;1277;-72.0167;2.5333;89504
-999;-1;;-1;KATTERJAKK;202000;-999;-999;516;68.4167;18.1667;02020
-999;-1;;-1;NIKKALUOKTA;203600;-999;-999;466;67.85;19.0167;02036
-999;-1;;-1;GALLIVARE;204900;-999;-999;358;67.1333;20.6333;02049
If there are some header lines in the datafiles. use the the command [SKIP_DATA_LINES X] to skip the X first lines of the data files.

Alternatively, the header information can be given in the setupfile:

Setupfile:
PROD=ascii:Stations
file="http://klapp.oslo.dnmi.no/metnopub/production/metno?re=16&ct=text/plain&nod=-999&del=semicolon"
headerinfo=[SKIP_DATA_LINES 1]
headerinfo=[SEPARATOR ;]
headerinfo=[COLUMNS 
headerinfo=;DEPARTMENT:s;DEPT_NO:s;MUNICIPALITY:s;MUNI_NO:s;ST_NAME:s; \
STNR:s;UTM_E:s;UTM_N:s;AMSL:s;LAT_DEC:lat;LON_DEC:lon;WMO_NO:s]
headerinfo=[DATA]

Map ascii files

This is a simple ascii map format, used to plot lines.
An example of such a file is given below:
#FIR
69.8  30.82
70.37 31.72
71    30
71.33 28
71.33 25
70    15
65.75 7
-999.999 -999.999
65.75 7
65    6.1
63    4
62    5
62    7.5
62    12.2
-999.999 -999.999
65    6.1
65    6.5
65    7.5
65    8.33
65    12.23
-999.999 -999.999

 Diana User Guide: File formats |  Previous: Vertical crossection functions |  Next: Batch plotting |  Index