Diana User Guide: Setup file |  Previous: Shortcut keys |  Next: Field functions |  Index

Setup file

The setup file contains information about: Each individual user can edit his/her setup file, and to a certain degree customise the program to their needs.

The setup file is organized in sections. A section is defined by a <SSS> </SSS> pair, where SSS is the name of the section.
Example: <BASIC> ... </BASIC> contains the 'BASIC' section.

Common structures in all sections:
KEYWORD Turns on/off feature
KEY=VALUE Defines keyword with value
KEY=V1,V2,V3 Defines keyword with list of values
KEY=V11:V12:V13,V21:V22 Defines keyword with list of lists of values
KEY=VALUE KEY=V1,V2,V3 ... Combinations of key-defines

Other features:

  1. Refer to environment/shell variable XX with ${XX}
    Example: ${HOME} will be expanded to the home-path
  2. Define local variables with XX=yy (outside all sections), and refer to them with $(XX)

    Example: Add ROOT=/metno/local in a separate line outside all sections. All occurrences of $(ROOT) in later lines will be expanded to /metno/local
  3. Long lines may be split up by using '\'. Add a '\' (and newline) where you want to split a line.
  4. Include another file with %include "filename". Included file inherits section at the point of inclusion. File must start and end with the same section. Files may be nested.
  5. Use keyword CLEAR to clear all previous definitions for a specific section. Only valid within a section. Useful in local files which include the official setupfile.
  6. Redefinitions of variables outside all sections will be ignored, while redefinitions within sections are possible.
  7. Time information in filenames/filepaths may be used as time filters. Files like temp2006052206.bufr may be written temp[yyyymmddHH].bufr in order to extract the time information. Parentheses may be skipped if none of the keys below appear in the filename.

    Time keyDescription
    yyyyYear
    yyYear (yy>50 => 19yy, yy<50 => 20yy)
    mmMonth
    ddDay
    HHHour
    MMMinute
    MMinute (M*10)
    XXHH=XX/2, XX=0,2...=>MM=0, XX=1,3...=>MM=30

Sections in use, preferably in this order:
BASIC contains various filepaths, and definitions for the system language
FONTS contains definitions for the fonts used in visualisation
LABELS lists the default plot commands for data labels and annotations on the map
IMAGE_GALLERY contains file paths to static raster images and simple vector patterns used in visualisations
COLOURS defines available colours with name and rgba values
PALETTES defines available colour palettes with name and list of colour values
FILLPATTERNS defines available palettes of patterns
LINETYPES defines available line stippling patterns with name and binary representation
PRINTING system specific print commands
QUICKMENUES lists common (for all users) quick menues
FIELD_COMPUTE defines common (for all sources) field computations
FIELD_PLOT defines fields for visualisation with default plot options
FIELD_VERTICAL_COORDINATES defines prefix/suffix of vertical levels etc
FIELD_GROUPS defines translations of field group names
FIELD_FILES lists files or other sources for field data
FIMEX_SETUP options to fimexreader, for example reprojection of fields
OBSERVATION_PLOTTYPES defines available plottypes
OBSERVATION_FILES defines available observations for plotting
OBSERVATION_PRIORITY_LISTS defined priority lists for observation plotting
OBSERVATION_CRITERIA definitions of criterias for plotting observations
OBSERVATION_POPUP_SPEC define parameters and layout for observation popup window
IMAGEgeo images (satellite, radar) defined with file sources, available channels etc.
TEXT_INFORMATION_FILES list of files for the text viewer in Diana
MAP_AREA define available projections and standard areas
MAP_TYPE list of available maps
OBJECTS list of sources for meteorological objects (fronts, symbols etc)
EDITdefine products for the editing tools
VERTICAL_PROFILE_FILES list of sources for sounding data
VERTICAL_PROFILE_COMPUTATIONS available computed parameters for sounding data
VERTICAL_CROSSECTION_FILES list of sources for vertical cross sections
VERTICAL_CROSSECTION_COMPUTATIONS available computed parameters for vertical cross sections
VERTICAL_CROSSECTION_PLOTS available visualisations of vertical cross sections
SPECTRUM_FILES list of sources for wave spectra visualisation

Section BASIC

contains various filepaths, and definitions for the system language
KeyValue
docpath=path to this documentation (default doc)
obsPlotFilePath=path to files describing symbol and synop plot
qserver=path to coserver program
imagepath=main path to static images
amdarStationList=path to list of amdar stations used in vertical profiles
languagepaths=path to gui language files (default lang:${QTDIR}/translations)
setenv=set environment variables (variable,value,overwrite)
language=system language to use ((default en)

Section FONTS

contains definitions for the fonts used in visualisation.
Definitions:
    font:        Family name
    type:        Bitmap (screen fonts with postscript equivalent) |
                 Scaleable (truetype rendered as polygons)
    name:        X-fontdefinitions for bitmap fonts, name of fontfile for scaleable fonts
    face:        NORMAL | ITALIC | BOLD | BOLD_ITALIC (for scaleable fonts)
    postscript : For bitmap fonts, postscript-equivalent name (for postscript output)
    
Key(s)Meaning
fontpath=path to font files (default fonts)
font=X type=bitmap name=Y postscript=Zdefine new bitmap font
font=X type=scalable name=Ydefine new scalable font font
BITMAPFONT=Xuse bitmap font named X as default bitmap font
SCALEFONT=Xuse scalable font named X as default scaleable font
METSYMBOLFONT=Xuse font named X as default font containing meteorological symbols

Section LABELS

lists the default plot commands for data labels and annotations on the map.

Section IMAGE_GALLERY

contains file paths to static raster images and simple vector patterns used in visualisations.
KeyValue
basicpath=main image path
markerpath=main path to small images used as markers on the map
marker=additional path to a marker
patternpath=path to patterns used in filled areas/fields

Section COLOURS

defines available colours with name and rgba values (0 to 255).
 NAME=R,G,B[,A]
    

Section PALETTES

defines available colour palettes with name and list of colour values (0 - 255) or names as defined in section COLOURS.
 NAME=R1:G1:B1[:A1],R2:G2:B2[:A2],...Rn:Gn:Bn[:An]  # colour palette with n items
 NAME=RED,YELLOW,BLUE                               # colour palette with 3 items
    

Section FILLPATTERNS

defines available palettes of patterns.
 NAME=P1,P2,P3    # defines a palette of 3 patterns found under patternpath
                  # (see IMAGE_GALLERY above)
    

Section LINETYPES

defines available line stippling patterns with name and binary representation.
 solid=   1111111111111111   # solid line
 dash=    1111000011110000   # half on, half off
    

Section PRINTING

system specific print commands.
KeyValue
manualcommands=is name of file with printer-specific commands (postscript)
printcommand=typically: lpr -h -{hash}{numcopies} -P {printer} {filename}

where
{hash}simply a '#'
{numcopies}will be expanded to number of paper copies
{printer}will be expanded to name of printer
{filename}will be expanded to output filename

Section QUICKMENUES

lists common (for all users) quick menues. Add lines containing:
KeyValue
file=path to file containing quick menu item

Section FIELD_COMPUTE

defines common (for all sources) field computations.

Field computation/conversion functions
Example:

tc=tc.plevel_th(th)
the=the.alevel_tk_q_p(tk,q,p)
dz.500-1000=subtract(z:level=500hPa,z:level=1000hPa)
ff10m=vector.abs(u10m,v10m)
accumprecip.12h=accum.diff.forecast.hour(accumprecip,-12,0)
field3=add(field1,field2)
field4=multiply(field1,9.8067)
    

Section FIELD_PLOT

defines fields for visualisation with default plot options.
Field plot typeComment
CONTOURisolines and/or shading between isolines
WINDWMO wind
WIND_COLOURWMO wind coloured by any other field
WIND_TEMP_FLFlightLevel chart, wind and T
VECTORa vector arrow
VECTOR_COLOURvector arrow coloured by any other field
DIRECTIONdirection
DIRECTION_COLOURdirection (true north) coloured by any other field
ALPHA_SHADEtranslucency shading
BOX_ALPHA_SHADEtranslucency shading in grid boxes
BOX_PATTERNpatterns in grid boxes
ALARM_BOXAlarm colour in grid boxes
FILL_CELLFills each grid cell with a color according to the given 'values' and 'palettecolours' vectors
VALUEPrints the values of the fields (max 5 fields)

Plot Options
In addition to the plot type, plot options may be specified for each plot. These will be used as default plot options when using the plot. The available plot options are numerous, and a complete list is not available.

The three different plot options describing line values are connected as described below.

Fieldgroups
The plots are sorted into fieldgroups according to fieldgroup given in the plot definition, or the vertical/ensemble-axis if no group name is given

Examples:

field=MSLP
      colour=blue linetype=solid linewidth=1 line.interval=5.
      plot=CONTOUR(mslp)
end.field

field=WIND
      fieldgroup=Surface 
      colour=red linetype=solid linewidth=1 rel.size=1. density=AUTO
      plot=WIND(u,v)
end.field

loop [P1]=500,700,850
field=DZ([P1]-1000)
      colour=red linetype=solid linewidth=1 line.interval=40.
      plot=CONTOUR(dz.[P1]-1000)
end.field

loop [P1]=500,700,850,500,300
loop [P2]=1000,1000,1000,850,700
field=DZ([P1]-[P2])
      colour=red linetype=solid linewidth=1 line.interval=40.
      plot=CONTOUR(dz.[P1]-[P2])
end.field

field=ICING-SUM-COLOR
      density=4 line.values=4,5,6,7,8,9 palettecolours=gyyorr
      plot=FILL_CELL(icing.sum)
end.field

field=ICING-SUM-LAYER
      bordercolour=blue vector.unit=0.8 label.size=1.6
      colours=black,black,blue minvalue=0
      plot=Value(icing.top.scaled, icing.bottom.scaled, icing.height.scaled)
end.field

loop [MM]=0.1,0.5,1.0,2.5,5.0,7.5,10,15,20,25,30,40,50,100
field=Probability_Precip>[MM]mm/6h
     fieldgroup="EPS probability"
     colour=red line.interval=10. units=0.01
     plot=CONTOUR(prob_accumprecip.6h>[MM]mm)
end.field

    

Special case:
One can define two plots with the same name, one with pressure levels, and one with some other vertical coordinate. In that case, vc_type must be given.

field=T
      vc_type=pressure
      plot=CONTOUR(air_temperature_pl)
end.field
field=T
      vc_type=other
      plot=CONTOUR(air_temperature_ml)
end.field
The keyword pressure is recognized, while the other vc_type can be anything.

Section FIELD_VERTICAL_COORDINATES

CommentExample
nameName of vertical coordinate
vc_typedefines which functions can be usedpressure, hybrid, atmospheric, oceandepth
levelprefixE
levelsuffixhPa
indexUse the index (1,2,3,..), not the value (0.99815, 0.99362,...)true
Examples:
       name=atmosphere_hybrid_sigma_pressure_coordinate_1 vc_type=hybrid levelprefix=E.
       name=atmosphere_sigma_coordinate vc_type=atmospheric
       name=pressure vc_type=pressure levelsuffix=hPa
       name=flightlevel vc_type=pressure levelprefix=FL
       name=depth vc_type=oceandepth levelsuffix=m
    

Special case: flightlevel
Pressure levels are translated to flightlevels

Section FIELD_GROUPS

Translations of the group names, both the automatic generated names and the names given in the plot definitions

Examples:

name=my_name group=Surface
name=pressure_levels group=pressure
name=pressure_levels(members) group=pressure_ensemble
    

Section FIELD_FILES

list of files or other sources of field data.
KeyValueComment
Default_Filetype=fimex, etc.Type of field source
filegroup=group name
archivefilegroup=group nameOnly used in archive mode
m=nameModel name
t=netcdf, ncml, grib, etc.File format
config=/usr/share/fimex/cdmGribReaderConfig.xml Parameter and axis definitions, used by fimex
f=filenamefile name, ? and * allowed
proj4string="+proj=stere +lat_ts=60 ..."This projection overwrites the projection in the datasource
turnwavedirectiontrue/falseDifferent models define wave direction different, possible to turn the direction
vectorprojectionlonlattrue/falseIf "true", assume that vector fields are along lon-lat grid; if not specified or something else than "true", vector fields are assumed to be along the model grid.
rname of reprojectionThe reprojection should be defined in FIMEX_SETUP section
timevalidtimeTimestamp in filename is validtime, not referencetime
CLEAR_FILESDelete all models in current file group
CLEAR_FILEGROUPDelete current file group

Examples:

filegroup=MEPS
m=MEPS_prob t=netcdf \
  f=meps_lagged_6_h_prob_2_5km_[yyyymmddTHH]Z.nc
m=meps_lagged_6_h_his t=grbml \
  config=AromeEPSGribReaderConfig.xml \
  f=meps_lagged_6_h_his_2_5km_[yyyymmddTHH]Z.grbml

filegroup=Radar
  m=radar_yrwms t=netcdf time=validtime \
  f=yrwms-nordic.mos.pcappi-0-dbz.noclass-clfilter-novpr-clcorr-block.nordiclcc-1000.[yyyymmddTHHMM]00Z.nc

    
Reprojection
m=LL02_GLDI t=fimex format=grib config=${DIANADIR}/share/fimex/CommonGribReaderConfig.xml f=$(DATA)/24/sam/data/data/S/REDA/Diana/LL02_GLDI_[yyyymmddHH]* r=LL02_GLDI
    

Section FIMEX_SETUP

Options to fimexreader, for example reprojection of fields. All keys must be defined.
Key=ValueComment
name=Name of optionMust be unique
type=reprojectionThe only option type yet.
projstring="+proj=latlon +R=6371229 +no_defs"This projection overwrites the projection in the datasource. Note the "" signs.
xAxisValues="-179.75,-179.5,...,179.75"Used by the fimex interpolator, see fimex dokumentation. Note the "" signs.
yAxisValues="-80.75,-80.5,...,80.75"-"- Note the "" signs.
xAxisUnit=degree_east...-"-
yAxisUnit=degree_north...-"-
method=nearestneighbor...Interpolation method, used by fimex interpolator

Examples:
  # valid interpolation types, method = nearestneighbor, bilinear,bicubic, forward_max, forward_min, forward_mean, forward_median, forward_sum, coord_nearestneighbor, coord_kdtree
  name=gfs0p25 type=reprojection projString="+proj=latlon +R=6371229 +no_defs" xAxisValues="-179.75,-179.5,...,179.75" yAxisValues="-80.75,-80.5,...,80.75" xAxisUnit=degree_east yAxisUnit=degree_north method=bilinear
  name=LL02_GLDI type=reprojection projString="+proj=latlon +R=6371000 +no_defs" xAxisValues="-179.75,-179.5,...,179.75" yAxisValues="-80.75,-80.5,...,80.75" xAxisUnit=degree_east yAxisUnit=degree_north method=nearestneighbor
    

Section OBSERVATION_PLOTTTYPES

defines the available plottypes.
KeyValueComment
type=synopException: Datatype ascii is not defined in setup, but in the ascii file
parameters= Wind,TTT,TdTdTdList of parameters that will appear in the dialog
misc=tempPrecision,unit_ms List of checkboxes that will appear in the dialog
vertical_levels=700,850,925,1000 Used for the pressure and ocean plottypes


Example:

       type=pressure \
       parameters=Pos,dd,ff,TTT,TdTdTd,PPPP,Id,Date,Time,HHH,QI,QI_NM,QI_RFF \
       misc=markerboxVisible,asFieldButton,orientation,parameterName,criteria \
       vertical_levels=10,30,50,70,100,150,200,250,300,400,500,700,850,925,1000
    

DeltaTime - special parameter showing the difference between nowtime and obstime. When adding DeltaTime to parameters, DeltaTime will be calculated for every replot.

       parameters=Pos,dd,ff,TTT,TdTdTd,PPPP,Id,Date,Time,HHH,QI,QI_NM,QI_RFF,DeltaTime
    

Section OBSERVATION_FILES

defines available observations for plotting.
KeyValueComment
PROD=plottype : name appearing in dialogCould be several plottypes for each datatype
bufr=filename bufr format, filename may include time information
ascii=filename or URL ascii format, filename may include time information
headerfile=filename or URL Ascii format only. The header of the ascii files can be added in a seperate file.
timerange=min,max Files include data from time range [time-min,time+max] (minutes)
synoptic=true/false For synoptic data types, only one datafile will be read (synop, metar, temp)
current=scale Plotting arrow with feathers, not wind. Scale = one full feather.


Example:

     PROD=synop:Synop
     PROD=list:Synop
     bufr=/opdata/obs_dec/rdb/syno/surf[yyyymmddHH]*.bufr
     timerange=-30,30
    

Bufr data need Bufr tables to unpack data. To specify the path for the Bufr tables, set the environmental variable BUFR_TABLES
Example:

    export BUFR_TABLES=/usr/local/etc/emos/bufrtables/
    
the path must end with "/".

Section OBSERVATION_PRIORITY_LISTS

list of files with priority list for observation plotting. Ascii files with one station id per line.
Add lines of this type:
 name=X file=Y
    
where X is the name of the priority list as shown in menues and Y is the filename.
Example:
 name="Priority list", file=/metno/local/diana/etc/priList.txt
    

Section OBSERVATION_CRITERIA

Definitions of predefined criterias for plotting observations. The criterias can be turned on/off and changed in the observation dialogue.

plottype = name of plot type
name = name of criterias
parameter <>= value plot/colour/colour total


Example:

    plottype=Synop
    name=Temperature
    TTT>0  plot
    TTT>10 red
    TTT>20 red total
    

CriteriaDescription
TTT>0 plotPlot the observation if TTT>0
TTT>10 red Plot the parameter TTT in red if TTT>10
TTT>20 red total Plot the entire observation in red if TTT>0
TTT plot Plot the observation if TTT is reported

Section OBSERVATION_POPUP_SPEC

Definitions of the text in the popup window. The popup window can be turned on/off in the observation dialogue. If this section has no definition for the selected datatype, the parameters selected in the dialogue will be shown.

datatype = name of observation type
free text and parameters marked with $ sign


Example:

    datatype=Lightning
    Lat $Lat Lon $Lon
    Maximum current $Pk
    $Ci 0=Cloud-Ground:1=Cloud-Cloud
    

DefinitionDescription
datatype=LightningThis popup text will be shown for the datatype Lightning
Lat $Lat Lon $Lon Lat 37.27 Lon -6.04
Maximum current $Pk Maximum current 0043
$Ci 0=Cloud-Ground:1=Cloud-Cloud If the value of the parameter Ci is 0, show Cloud-Ground, otherwise Cloud-Cloud.

Section IMAGE

geo images (satellite, radar) defined with file sources, available channels etc.
Each image product is defined with (on separate lines):
KeyValue
channels=list of available channel-combinations. Example: [ day_night 2+4 4+2 .. ]
image=main product name. Example: [NOAA]
sub.type=sub product name. Example: [Europa]
file= filter for product files. Example: [/data/noaa[yyyymmddHHMM]meu.mitiff]
The section is read sequentially, so a suite of products is often defined by a image= line, followed by several sub.type= and file= lines. Add channels= lines to change the available channels.

Section TEXT_INFORMATION_FILES

list of files with simple ascii-text (+ subset of html). Contents of files available in separate text viewer. Add lines of this type:
 name=X file=Y [ type=auto|text|html|xml font=auto|fixed ]
    
KeyValue
name=name as appearing in menu. mandatory
file=path to file. mandatory
type=auto means type is determined from filename extension
font=fixed means "courier"-type font

Section MAP_AREA

define available projections and standard areas. Add lines of this type:
 name=NAME proj4string="+proj=..." rectangle=x1:x2:y1:y2
    
To define one of the function keys from F5 to F8 as accelerator for an area: add any of [F5],[F6],[F7],[F8] at the end of the name.

Examples:
 name=Data-area proj4string=undefined
 name=Europa  proj4string="+proj=stere +lat_ts=60 +lat_0=90.0 +lon_0=0 +x_0=5.71849e+06 +y_0=7.37385e+06 +R=6.371e+06"  rectangle=2.50e+06:9.02e+06:2.20e+06:6.67e+06
     

Section MAP_TYPE

define maps for Diana. Use lines of this type to add a single map:
 map=NAME file=FILEPATH type=pland|triangles|lines_simple_text|shape
    
The different types available are: