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. Time information in filenames/filepaths may be used as time filters. Files like temp2006052206.rdb may be written tempyyyymmddHH.rdb in order to extract the time information. Parentheses may be skipped if none of the keys below appear in the filename.
  7. Redefinitions of variables outside all sections will be ignored, while redefinitions within sections are possible.

    Time keyDescription
    yyyyYear
    yyYear (yy>50 => 19yy, yy<50 => 20yy)
    mmMonth
    ddDay
    HHYear
    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
METNOFIELDFILE_PARAMETERS Defines field parameters used in the met.no field file format
NETCDF_PARAMETERS NetCDF field parameters used in the NetCDF files
FIELD_COMPUTE defines common (for all sources) field computations
FIELD_PLOT defines fields for visualisation with default plot options
FIELD_FILES lists files or other sources for field data
OBSERVATION_FILES defines available observations for plotting
OBSERVATION_PRIORITY_LISTS defined priority lists for observation plotting
OBSERVATION_CRITERIA definitions of criterias for plotting observations
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_CROSSECTION_FILES list of sources for vertical cross sections
VERTICAL_CROSSECTION_PARAMETERS available parameter definitions 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
UFFDA met.no specific: Menu specification for interactive collocation of AVHRR training data.

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 METNOFIELDFILE_PARAMETERS

met.no specific: field parameters used in met.no field file format.
met.no FIELD FILE parameters
 Syntax:
   Multilevel:               param_name=param_number
   Surface and single level: param_name=param_number,vertical_coord,level
   Additinal parameters for both types:
        prod= produce_number
        grid= grid_number
        dtype= data_type  ..... usually:  1=analysis
                                          2=forecast
                                          3=initialized analysis
                                          4=parameter fields (constant during forecast)
        level= level_value
        idnum= idnum_value   (level2 in met.no FieldFile descriptions)
    


Example:

    mslp=58,2,1000
    z=1  u=2  v=3
    

Section NETCDF_PARAMETERS

Parameters

Syntax:

    diana_name = netcdf_name
    
Example:
       ice.concentration=sea_ice_concentration
       salt=sea_water_salinity
    
Connects the name of variable used in diana with the local variable-name used in the NetCDF-files. To find the variable-names in a NetCDF-file, use 'ncdump -h '.

Vertical coordinates

If not specified, the values of the attributes "standard_name" and "units" of the variables with attribute "axis="Z"" is used.

Syntax:

    vertical_coordinate=A:B,C:D
Where A is the name appearing in the dialog, B is the "standard_name" from the Netcdf files, C is "suffix" or "prefix", and D is name of the suffix/prefix (units)

Example:

    vertical_coordinate=Depth:depth,suffix:m

IMPORTANT NOTES

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
LAYERPrints three numbers vertically in each grid cell


Example:

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

field=WIND
      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
      bordercolour=blue rel.size=0.8 values=4,5,6,7,8,9 palettecolours=green,yellow,yellow,orange,black,black
      plot=FILL_CELL(icing.sum)
end.field

field=ICING-SUM-LAYER
      bordercolour=blue rel.size=0.8 label.size=1.0
      plot=LAYER(icing.height, icing.bottom, icing.top)
end.field
    

Section FIELD_FILES

list of files or other sources of field data.
KeyValueComment
Default_Filetype=MetnoFieldFile, NetCDF, etc.Type of field Source
filegroup=group name
archivefilegroup=group nameOnly used in archive mode
m=nameModel name
t=MetnoFieldFile, NetCDF, etc.Type of field Source
f=filenamefile name, ? and * allowed
g=88:1234:Namefor MetnoFieldfiles: prod:grid:Name
CLEAR_FILESDelete all models in current file group
CLEAR_FILEGROUPDelete current file group

Example:
filegroup=HIRLAM20km
m=HIRLAM.20KM.00  t=MetnoFieldFile f=/opdata/hirlam20/grdn00.dat  f=/opdata/hirlam20/grdnm00.dat  f=/opdata/hirlam20/grdni00.dat

filegroup=HIRLAM4km
m=HIRLAM.4KM.00  t=MetnoFieldFile f=/opdata/explam/grdqh00.dat
m=HIRLAM.4KM.12  t=MetnoFieldFile f=/opdata/explam/grdqh12.dat

filegroup=ice
m=ice_sst t=NetCDF f=/disk1/tmp/iceSST.nc
    
Redefine models:
FileGroup=HIRLAM4km
m=HIRLAM.4KM.00  t=MetnoFieldFile f=/disk1/grdqh00.dat
m=HIRLAM.4KM.12  t=MetnoFieldFile f=/disk1/grdqh12.dat
    
Define new models in existing file group:
FileGroup=HIRLAM4km
CLEAR_FILES
m=MY_MODEL_00  t=MetnoFieldFile f=/disk1/grdqh00.dat
m=MY_MODEL_12  t=MetnoFieldFile f=/disk1/grdqh12.dat
    
Delete file group:
FileGroup=HIRLAM4km
CLEAR_FILEGROUP
    

Section OBSERVATION_FILES

defines available observations for plotting.
KeyValueComment
PROD=data type : name appearing in menu
metnoobs= filenamemet.no observation format, filename may include time information
bufr=filename bufr format, filename may include time information
ascii=filename ascii format, filename may include time information
timerange=min,max Files include data from time range [time-min,time+max] (minutes)
current=scale Plotting arrow with feathers, not wind. Scale = one full feather.


Example:

     PROD=synop:Surf
     bufr=/opdata/obs_dec/rdb/syno/surf[yyyymmddHH]*.rdb
     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 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=X proj=Y grid=Z area=A
    
where X is the name of the projection/area as shown in menues. To define one of the functionkeys from F5 to F8 as accelerator for an area: add any of [F5],[F6],[F7],[F8] at the end of the name.

The keywords proj, grid and area can have the following values:
ProjGridAreacomment
pstereographicxp,yp,an,fi,projection-latitudex1,x2,y1,y2 (in gridunits)Polar Stereographic
pstereo_60xp,yp,an,fix1,x2,y1,y2 (in gridunits)Polar Stereographic 60 degrees north
mercatorwest,south,x_inc(km),y_inc(km),ref_lat(deg)x1,x2,y1,y2 (in x_inc/y_inc units)Mercator
geographicwest,south,lon_inc(deg),lat_inc(deg)x1,x2,y1,y2 (in lon_inc/lat_inc units)Geographic
spherical_rotwest,south,lon_inc(deg),lat_inc(deg),lon_eq,lat_eqx1,x2,y1,y2 (in lon_inc/lat_inc units)Spherical Rotated
undefined0:0:0:0use area from field or satellite
undefined1:0:0:0leave area unchanged

Examples:
 name=Data-area, proj=undefined, grid=0:0:0:0
 name=Europa, proj=pstereo_60, grid=115:148:237:0:0:0, area=51:181:45:134
 name=S.hemisphere, proj=pstereographic, grid=11851:11851:11850:180:-60:0, area=1:23701:1:23701
    

Section MAP_TYPE

define maps for Diana. Use lines of this type:
 map=NAME file=FILEPATH type=normal|triangles
    
to add a single map. The types normal and triangles are met.no specific formats - the latter containing precalculated triangles for filled land areas.

To add a map with varying resolution (depending on zoom factor):

 map=NAME type=normal|triangles
 limit=X(in km) file=FILEPATH
 limit=Y(in km) file=FILEPATH
 ... etc
    
where the limit in km defines the limiting resolution for use of this particular file. A line containing a new map=X marks the end of this definition. You may also add standard plot information inside such a block (See plot settings documentation in the batch diana section). Example:
 map=Gshhs-Auto type=triangles
 limit=10  file=/metno/local/maps/gshhs_25.map
 limit=2.5 file=/metno/local/maps/gshhs_5.map
 limit=0.5 file=/metno/local/maps/gshhs_1.map
 limit=0.1 file=/metno/local/maps/gshhs_0.2.map
 limit=0   file=/metno/local/maps/gshhs_0.1.map
 contour=on cont.colour=black cont.linetype=solid cont.linewidth=1
 land=on land.colour=flesh
    

Section OBJECTS

list of sources for meteorological objects (fronts, symbols etc).
Contains lines of this type:
Key(s)Value
name=X file=YX=name of product as appearing in menues, Y=path to datafiles
archive_name=X file=YSame as above, but only applies when Diana is in Archive mode

The "path to datafiles" is given as dirpath/prodname and the datafiles themselves must have names like dirpath/prodname.YYYYMMDDhhmm, where YYYYMMDDhhmm is the timespecification.

Section EDIT

define products for the editing tools. Each product is defined inside a subsection:
 product="PRODNAME"
   <product-specification>
 end.product
    
where the product-specification is like this:
Key(s)Value
drawtools=comma separated list of drawing tools [Analyse,Sigkart]
save_dir=where to save product locally [./work]
input_dir=where to fetch stored components
combine_input_dir=where to fetch stored components when combining products
input_products=other products to pick components from
field=Field-Nametag, fieldname, met.no-field-specification
objects=Objects-Nametag
comments=Comments-Nametag
local_idents=identies to choose from when editing locally [comma separated list]
database_idents=identies to choose from when editing in product database [comma separated list]
combine_ident=Final-ID, ID1, ID2, .. final combine-identity with list of identies to combine. You may have several of these.
combine_borders=name of file containing borderlines used when combining
database="mysqlservername databasename portnumber"
name_in_database=which productname to use in database
time_start_early=show warning if production starts before specified time, limit given as hour:minute (-=before,+=after product) [+00:00]
time_start_late=show warning if production starts after specified time, limit given as hour:minute (-=before,+=after product) [+03:00]
grid=for field editing, specify field grid [producer,grid,nx,ny,gridtype,gridspec[6]]
grid.minimizepossibly minimize grid to remove undefined values along border
commandfile=annotations to show when editing
standard_symbolsize=normal size of met. objects in this product [30]
complex_symbolsize=normal size of sigkart objects in this product [6]
frontlinewidth=line width of fronts in this product [8]
arealinewidth=line width of areas in this product [4]

Section VERTICAL_PROFILE_FILES

list of sources for sounding data.


Example:

# prognostic data
m=HIRLAM.20KM.00   f=/opdata/hirlam20/vp20km00.dat
m=HIRLAM.20KM.12   f=/opdata/hirlam20/vp20km12.dat
# observations
#bufr.temp=  /opdata/obs_dec/rdb/temp/temp[yyyymmddHH].rdb
#bufr.pilot=  /opdata/obs_dec/rdb/pilo/pilo[yyyymmddHH].rdb
metnoobs.temp=  /opdata/obs_dec/temp??.dat*
metnoobs.amdar= /opdata/obs_dec/amte??.dat*
metnoobs.pilot= /opdata/obs_dec/pilo??.dat*
    

Section VERTICAL_CROSSECTION_FILES

list of sources for vertical cross sections.


Example:

m=HIRLAM.20KM.00  f=/opdata/hirlam20/vc20km00.dat
m=HIRLAM.20KM.12  f=/opdata/hirlam20/vc20km12.dat
    

Section VERTICAL_CROSSECTION_PARAMETERS

available parameter definitions for vertical cross sections.


Example:

# atmospheric model parameters
u=2 v=3 tk=4 q=9 rh=10 omega=13 th=18 etadot=11 w=12 turbulence=94
# ocean model parameters
ucurr=302 vcurr=303 salt=307 seatemp=308
# possibly computed in program vcdata (horizontal computations in fields)
vorticity=-1 divergence=-2 ug=-3 vg=-4 pv=-5
    

Section VERTICAL_CROSSECTION_COMPUTATIONS

available computed parameters for vertical cross sections.

Vertical crossection computation/conversion functions
Example:

tc=TC_FROM_TH(th)
rh=RH_FROM_TH_Q(th,q)
q=Q_FROM_TK_RH(tk,rh)
ff_tangent=FF_TANGENTIAL(u,v)
ff_normal=FF_NORMAL(u,v)
    

Section VERTICAL_CROSSECTION_PLOTS

available visualisations of vertical cross sections.


Example:

name=TH        plot=CONTOUR(th) colour=blue line.interval=4.
name=Temp(C)   plot=CONTOUR(tc) colour=red  line.interval=4.
name=Vind_NSEW plot=WIND(ff_east_west,ff_north_south) colour=black
name=VT+OMEGA  plot=VT+OMEGA(ff_tangent,omega)   colour=darkgreen vector.unit=1.
    

Section SPECTRUM_FILES

list of sources for wave spectra visualisation.


Example:

m=WAM.50KM.00  f=/opdata/wave/wamspec00.dat
m=WAM.50KM.12  f=/opdata/wave/wamspec12.dat
    

Section UFFDA

met.no specific: Menu specification for interactive collocation of AVHRR training data.
Contains lines of this type:
Key(s)Value
mailto=mailing address for sending UFFDA messages
class=X desc=YX="name of UFFDA class", Y="description of class"

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