| Diana User Guide: Setup file | Previous: Shortcut keys | Next: Field functions | Index | ![]() |
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:
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 key | Description |
| yyyy | Year |
| yy | Year (yy>50 => 19yy, yy<50 => 20yy) |
| mm | Month |
| dd | Day |
| HH | Hour |
| MM | Minute |
| M | Minute (M*10) |
| XX | HH=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 |
| IMAGE | geo 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) |
| EDIT | define 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 |
| Key | Value |
| 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) |
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=Z | define new bitmap font |
| font=X type=scalable name=Y | define new scalable font font |
| BITMAPFONT=X | use bitmap font named X as default bitmap font |
| SCALEFONT=X | use scalable font named X as default scaleable font |
| METSYMBOLFONT=X | use font named X as default font containing meteorological symbols |
| Key | Value |
| 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 |
NAME=R,G,B[,A]
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
NAME=P1,P2,P3 # defines a palette of 3 patterns found under patternpath
# (see IMAGE_GALLERY above)
solid= 1111111111111111 # solid line
dash= 1111000011110000 # half on, half off
| Key | Value |
| manualcommands= | is name of file with printer-specific commands (postscript) |
| printcommand= | typically: lpr -h -{hash}{numcopies} -P {printer} {filename} |
| {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 |
| Key | Value |
| file= | path to file containing quick menu item |
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)
| Field plot type | Comment |
| CONTOUR | isolines and/or shading between isolines |
| WIND | WMO wind |
| WIND_COLOUR | WMO wind coloured by any other field |
| WIND_TEMP_FL | FlightLevel chart, wind and T |
| VECTOR | a vector arrow |
| VECTOR_COLOUR | vector arrow coloured by any other field |
| DIRECTION | direction |
| DIRECTION_COLOUR | direction (true north) coloured by any other field |
| ALPHA_SHADE | translucency shading |
| BOX_ALPHA_SHADE | translucency shading in grid boxes |
| BOX_PATTERN | patterns in grid boxes |
| ALARM_BOX | Alarm colour in grid boxes |
| FILL_CELL | Fills each grid cell with a color according to the given 'values' and 'palettecolours' vectors |
| VALUE | Prints 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.
line.interval Specifies the interval for plot
types contour and fill_cell.
line.values Specifies a comma-separated list of
levels for plot types contour
and fill_cell.
Note: The value list is only used
if line.interval is 0 and
log.line.values is empty.
log.line.values Similar
to line.values, but specifies levels which will
be repeated with a factor of 10. E.g., 1,2.5,5
will expand to 1,2.5,5,10,25,50,....
Note: The value list is only used
if line.interval is 0.
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.
| Comment | Example | |
| name | Name of vertical coordinate | |
| vc_type | defines which functions can be used | pressure, hybrid, atmospheric, oceandepth |
| levelprefix | E | |
| levelsuffix | hPa | |
| index | Use the index (1,2,3,..), not the value (0.99815, 0.99362,...) | true |
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
Examples:
name=my_name group=Surface
name=pressure_levels group=pressure
name=pressure_levels(members) group=pressure_ensemble
| Key | Value | Comment |
| Default_Filetype= | fimex, etc. | Type of field source |
| filegroup= | group name | |
| archivefilegroup= | group name | Only used in archive mode |
| m= | name | Model name |
| t= | netcdf, ncml, grib, etc. | File format |
| config= | /usr/share/fimex/cdmGribReaderConfig.xml | Parameter and axis definitions, used by fimex |
| f= | filename | file name, ? and * allowed |
| proj4string= | "+proj=stere +lat_ts=60 ..." | This projection overwrites the projection in the datasource |
| turnwavedirection | true/false | Different models define wave direction different, possible to turn the direction |
| vectorprojectionlonlat | true/false | If "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. |
| r | name of reprojection | The reprojection should be defined in FIMEX_SETUP section |
| time | validtime | Timestamp in filename is validtime, not referencetime |
| CLEAR_FILES | Delete all models in current file group | |
| CLEAR_FILEGROUP | Delete current file group |
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
| Key= | Value | Comment |
| name= | Name of option | Must be unique |
| type= | reprojection | The 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 |
# 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
| Key | Value | Comment |
| type= | synop | Exception: Datatype ascii is not defined in setup, but in the ascii file |
| parameters= | Wind,TTT,TdTdTd | List 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
| Key | Value | Comment |
| PROD= | plottype : name appearing in dialog | Could 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 "/".
name=X file=Y
where X is the name of the priority list as shown in menues and Y
is the filename.
name="Priority list", file=/metno/local/diana/etc/priList.txt
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
| Criteria | Description |
| TTT>0 plot | Plot 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 |
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
| Definition | Description |
| datatype=Lightning | This 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. |
| Key | Value |
| 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] |
name=X file=Y [ type=auto|text|html|xml font=auto|fixed ]
| Key | Value |
| 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 |
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.
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
map=NAME file=FILEPATH type=pland|triangles|lines_simple_text|shape
The different types available are:
To add a map with varying resolution (depending on zoom factor):
map=NAME type=normal|triangles|lines_simple_text|shape
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
| Key(s) | Value |
| name=X file=Y | X=name of product as appearing in menues, Y=path to datafiles |
| archive_name=X file=Y | Same as above, but only applies when Diana is in Archive mode |
product="PRODNAME"
<product-specification>
end.product
where the product-specification is like this:
| Key(s) | Value |
| local_save_dir= | where to save product locally [~/.diana/work] |
| prod_save_dir= | where to save sendable products |
| input_dir= | where to fetch stored components |
| combine_input_dir= | where to fetch stored components when combining products |
| input_field_config= | XML file needed to read the input file |
| template_file= | NetCDF file used to make the output file |
| field= | filenamepart:"Nametag", plot:"name_of_plot", unit:"unit", vcoord:"vertical_coordinate", vlevel:"vertical_level", tool:"standard+classes+numbers" |
| objects= | Objects-Nametag |
| comments= | Comments-Nametag |
| local_idents= | identies to choose from when editing locally [comma separated list] |
| prod_idents= | identies to choose from when editing sendable products [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 |
| 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] |
| 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] |
Example:
product="Z"
local_save_dir= ${HOME}/.diana/work
template_file=z_template.nc
field= filenamepart:geopotential_height_pl, plot:Z, vcoord:pressure, vlevel:700
local_idents= TEST
end.product
Example:
# observations
bufr.temp= $(OPDATA5)/obs_dec/rdb/temp/temp_[yyyymmddHH].bufr
#models
m=MEPS_det_vc t=netcdf \
f=$(OPDATA4)/meps/meps_det_vc_2_5km_[yyyymmddTHH]Z.nc
m=ICON t=netcdf f=$(OPDATA4)/icon/icon_[yyyymmddTHH]Z.nc \
s=$(share_diana_dir)/products/vprof-ec.txt
tdk=tdk_from_tk_rh(air_temperature_pl,relative_humidity_pl)
vp_air_temperature_celsius=convert_unit(air_temperature_pl,celsius)
Example:
m=MEPS_det_vc t=netcdf \
f=$(OPDATA4)/meps/meps_det_vc_2_5km_[yyyymmddTHH]Z.nc
m=ICON t=netcdf f=$(OPDATA4)/icon/icon_[yyyymmddTHH]Z.nc \
predefined_cs=$(share_diana_dir)/products/vcdata.hirlam8.kml
Vertical crossection
computation/conversion functions
Example:
rh = rh_from_th_q(air_potential_temperature_ml,specific_humidity_ml)
ff_normal = normal(x_wind_ml, y_wind_ml)
q =identity(specific_humidity_ml)
Example:
name=Vind plot=WIND(ff_tangential,ff_normal) colour=blue
name=VindNSEW plot=WIND(x_wind,y_wind) colour=green
name=Temp(C) plot=CONTOUR(tc) colour=red line.interval=1.
Example:
m=MyWave_wam4_SPC f=$(OPDATA4)/MyWavewam_4km/MyWave_wam4_SPC_[yyyymmddTHHZ].nc t=netcdf
| Diana User Guide: Setup file | Previous: Shortcut keys | Next: Field functions | Index | ![]() |