Diana User Guide: Batch plotting |  Previous: File formats |  Index

Batch plotting of Diana-products

Use a separate program, bdiana, to batch plot Diana products. This is a command line program controlled by a separate input file (in addition to the normal setup file for Diana). bdiana can plot all map products in Diana, vertical cross sections, vertical profiles and wave spectrum plots. Please run the program without any parameters to see the commandline options.

Time control

The plot time is initially set with the command line argument TIME="YYYY-MM-DD hh:mm:ss". In addition the time can be modified in the input file with the commands settime, addhour and addminute (see documentation below)

Input file

Please run the program with -example in the command line to get a complete example of an input file. If you are trying out diana for the first time, a good idea could be to send this text to a file (bdiana -example > bdiana.input) - this is a good starting point for making your own input file.
The example file contains plot commands, various choices for output format and some examples of job control with lists and loops. All syntax is described in the comments.

Plot settings

Area (Those marked with * can only be used in bdiana)

Examples:
AREA name=Atlant
AREA name=Atlant rectangle=4.0e+06:8.0e06:4.0e+06:6.0e06
AREA proj4string="+proj=ob_tran +o_proj=eqc +lon_0=0 +o_lat_p=25 +x_0=5.14744e+06 +y_0=4.03549e+06 +a=6371000.0 +b=6371000.0" rectangle=4.0e+06:8.0e06:4.0e+06:6.0e06

ExplanationOption w/default valueValues
Area by namename=AtlantArea defined in setup file
projection*proj4string="+proj=.."
rectangle*rectangle=x1:x2:y1:y2in proj coordinates

Maps (Those marked with * can only be used in bdiana)
ExplanationOption w/default valueValues
Background colourbackcolour=blackAll colours
Force area*xylimit=x1,x2,y1,y2Set new corner values
Force area*xypart=x1%,x2%,y1%,y2%Set new corner values as percent of width/height
Map namemap=Euro1maps defined in setup file
Plot contour linecontour=ONON | OFF
contour colourcont.colour=blackAll colours
contour linewidthcont.linewidth=1
contour linetypecont.linetype=solidlinetypes defined in setup file
contour zordercont.zorder=00,1,2 (lowest, Auto, Highest)
Plot filled landland=ONON | OFF
land colourland.colour=blackAll colours
land zorderland.zorder=00,1,2 (lowest, Auto, Highest)
Plot latlon linelatlon=ONON | OFF
latlon colourlatlon.colour=blackAll colours
latlon linewidthlatlon.linewidth=1
latlon linetypelatlon.linetype=solidlinetypes defined in setup file
latlon zorderlatlon.zorder=00,1,2 (lowest, Auto, Highest)
Plot frameframe=ONON | OFF | 2 | 3 (ON and OFF are equivalent to 1 and 0;
2 fills the frame with the background colour, 3 fills the frame with the background colour and draws a border)
frame colourframe.colour=blackAll colours
frame linewidthframe.linewidth=1
frame linetypeframe.linetype=solidlinetypes defined in setup file
frame zorderframe.zorder=00,1,2 (lowest, Auto, Highest)

Labels (Those marked with * can only be used in bdiana)
Example Explanation
LABEL data options ask all plots for annotation string and text colour
LABEL text="some text" options simple text
LABEL anno=<...> options more complex annotations

General options (used for the whole label)
Option Explanation
tcolour text colour
bcolour border colour
fcolour fill colour
polystyle fill area and or draw border -fill/border/none/both
halign horizontal alignment - right/left/center
valign vertical alignment -top/bottom/center
xoffset ratio (offset)/(frame width)-left if center or right aligned, right if left aligned
yoffset ratio (offset)/(frame height)- down if center or top aligned, up if bottom aligned
xratio ratio (annotation width)/(frame width) -scales annotation when zooming in/out
yratio ratio (annotation height)/(frame height) -scales annotation when zooming in/out
marginratio (distance to border of label)/(frame height)
font
fontsize
facefont face
yclinewidthborder width
plotrequested if true, annotations aligned rel. to frame (not window)

Complex annotations

One LABEL may consist of many anno statements. One anno may consist of many elements and options. Each element and option are written in <...>. Syntax: anno=<..><...><...> (no space between elements/options) The elements are plotted side by side vertically.

Elements
Option SyntaxExplanation
box <box, options><..><..></box> box is recursive, and may contain other elements even box


vertical - horizontal,pstyle,fcolour,bcolour,tcolour
image <image=pic.png,options> size
text <text="Testing testing",options> Quotation marks are only needed when the text contains space, font,fontsize,face
symbol <symbol=....,options> size
table <table,options> All fieldPlots and satPlots are asked for a table, if they have, it is plotted

<table=name,options> All fieldPlots and satPlots are asked if they a table named "name", if they have, it is plotted

<table="HIRLAM.20KM.00 T.2M;255:75:75;;6 - 8;255:150:150;;4 - 6;255:215:215;;2 - 4;255:245:245;;0 - 2",options> Exactly this table plotted independent of data


title - if dropped, title from data.
title="" - no title


options:fcolour
arrow <arrow> All vector and observation plots are asked for a unit arrow length, if any, arrows are plotted

<arrow=1.3,feather=true,tcolour=red> Arrow of length 1.3 with feathers is plotted in red. Possible options: tcolour,feather
input

Fields (Those marked with * can only be used in bdiana)

      FIELD X Y  options #X:model
                         #Y:field

    

Example:

FIELD HIRLAM.20KM.00 MSLP colour=blue linetype=solid linewidth=1 

ExplanationOption w/default valueValues
colour of isolinecolour=blackcolour
line typelinetype=solidline type
line widthlinewidth=1number
line intervalline.interval=1
density of wind/vectorsdensity=01: all arrows are plotted
0 or auto: density automaticlly adjusts to fit the zoom level
Auto(2): density automaticlly adjusts to fit the zoom level, but more arrows are plotted
-1: auto, but all gridpoints are used to find best density, not only current rectangle. Ensures that all tiles have same density.
density of wind/vectorsdensity.factor=1density.factor=2 is equivalent to density=Auto(2)
unit (length) of vector
or size ov wind arrows
vector.unit=10
extreme typesextreme.type=NoneC/H, L/H
size of extreme labelsextreme.size=1
density of extreme labelsextreme.radius=1
value written on isolinevalue.label=1 0=no label/ 1=label
isoline smoothline.smooth=00=no smooth
field smmothfield.smooth=00=no smooth
show grid linesgrid.lines=0
show grid lines if numbers < max grid.lines.max=0
time offset rel. to main plot timehour.offset=0 hours
max time difference from main plot timehour.diff=0 hours
mask undef valuesundef.masking=00=off/1=on
mask colourundef.colour=whitecolour
mask line widthundef.linewidth=1
mask line typeundef.linetype=solidline type
size of isoline labelslabel.size=1
show zerolinezero.line=10=off/1=on
legend on/offtable=00=off/1=on
repeat coloursrepeat=00=off/1=on
palette from setup, colours or RGBApalettecolours=off palettecolours=some_palette
palettecolours=red,green,blue,white
palettecolours=255:255:255,100:100:100,200:200:200
use fill patterns defined in setuppatterns=off pattern=some_pattern
alpha shadingalpha=2550 - 255
isoline offsetbase=0number
skip isolines below minvalue=offoff,number
skip isolines above maxvalue=offoff,number
extra isolinescolour_2=offoff,colour
extra isolinesline.interval_2=1
extra isolineslinewidth_2=1
extra isolineslinetype_2=1
extra isolinesbase_2=1
extra isolinesminvalue_2=off
unitkelvin, celsius, hectopascal

Observations (Those marked with * can only be used in bdiana)
ExplanationOption w/default valueValues
plot typeplot=synop,metar,list,
data type data=synop,dribu,metar ...
parameterparameter=defined in ObsManager or ascii files
colourcolour=blackcolour
min. distance to nearest neigbourdensity=1
fontfont=Helvetica
faceface=normal
mark positionsimage=markers defined in setup
reading all obs., mixing different files moretimes=falsetrue/false
plot positions only, no parameters onlypos=falsetrue/false
name of file with priority list priority=filename
size of observationscale=1
all positions marked with x showpos=truetrue/false
temperature in integers tempprecision=false true/false
max time difference from main plot time timediff=60minutes
criteria criteria=criteria=TTT<0,blue;TTT>0,red

Geo Images (Those marked with * can only be used in bdiana)

      SAT X Y Z options #X: satellite/radar
                        #Y:file type
                        #Z:channels
    

Example:

SAT NOAA Europa 1+2+4 timediff=60 mosaic=0 cut=0.02 alphacut=0 alpha=1
ExplanationOption w/default valueValues
max time difference from main plot time timediff=60minutes
mosaic of several pictures mosaic=00/1
adjusting contrastcut=0.02
alpha shadingalpha=10-1
drop pixels with low alpha value alphacut=0 0-1
Legend on/offTable=10/1
colours to hidehide= coloours (comma separated)

Objects (Those marked with * can only be used in bdiana)
ExplanationOptions w/default valueExample
File namefile file=/opdata/diana/Bakkeanalyse/DNMI-objects/DNMI_ANAdraw.200402110900
Product namenamename="DNMI Bakkeanalyse"
Product timetimetime=200402110300
Max. time differencetimediff=60timediff=90
Front line width*frontlinewidthfrontlinewidth=4
Symbol size*fixedsymbolsizefixedsymbolsize=16
Symbol filter*symbolfiltersymbolfilter=tekster
Object typestypes=front,symbol,area,annotypes=front,symbol

Trajectories (Those marked with * can only be used in bdiana)
ExplanationOption w/default valueValues
start positionslatitudelongitude=
colourcolour=blackcolour
line typelinetype=solidline type
line widthlinewidth=1number
no. of subpositionsnumpos=11,5,9
dist. between subpositions radius=50number
time marks on the trajectory timemarker=0
trajectory computed from field field=ex: field="HIRLAM.00 VIND.10M"

Plot settings for vertical cross sections

The data part of the plot command (VCROSS ... in VCROSS.PLOT) can be found by selecting the desired plot in diana, when "Apply" is selected, Diana will print the command in your terminal windows.
Detailed settings for the rest of the diagram are set inside the tags: #VCROSS.OPTIONS and #VCROSS.OPTIONS.END or alternatively directly in the VCROSS.PLOT section. Here is a complete list of these options, including default value:

Explanation Options w/default value Values
Show data text text=on on/off
Colour of data text textColour=black colour
Show frame w/values frame=on on/off
Frame colour frameColour=black colour
Frame line type frameLinetype=solid line type
Frame line width frameLinewidth=1 number
Show extended frame ExtFrame=off on/off
Mark level LevelMarks=on on/off
Numbers on levels LevelNumbers=on on/off
Show upper level UpperLevel=on on/off
Upper level line colour upperLevelColour=black colour
Upper level line type upperLevelLinetype=solidline type
Upper level line width upperLevelLinewidth=1 number
Show lower level LowerLevel=on on/off
Lower level colour lowerLevelColour=black colour
Lower level line type lowerLevelLinetype=solidline type
Lower level line width lowerLevelLinewidth=1 number
Show other levels OtherLevels=off on/off
Other levels colour otherLevelsColour=black colour
Other levels line type otherLevelsLinetype=solidline type
Other levels line width otherLevelsLinewidth=1 number
Show surface Surface=on on/off
Surface colour surfaceColour=black colour
Surface line type surfaceLinetype=solid line type
Surface line width surfaceLinewidth=1 number
Show grid x,y XYpos=off on/off
Grid x,y colour xyposColour=black colour
Geographic positions GeoPos=on on/off
Geographic position colour geoposColour=black colour
Vertical grid lines VerticalGridLines=off on/off
Vertical grid line colour vergridColour=black colour
Vertical grid line type vergridLinetype=solid line type
Vertical grid line width vergridLinewidth=1 number
Extrapolate to fixed P extrapolateFixedLevels=offon/off
Extrapolate to sea floorextrapolateToBottom=on on/off
Show pressure vertically pressureVertical=off on/off
Fixed horiz./vert. ratio keepVerHorRatio=onon/off
Horiz./vert. ratio verHorRatio=150 number
Default vertical area stdVerticalArea=off on/off
Min. vertical area minVerticalArea=0 0-100
Max. vertical area maxVerticalArea=100 0-100
Default horizontal area stdHorizontalArea=offon/off
Min. horizontal area minHorizontalArea=0 number
Max. horizontal area maxHorizontalArea=100 number
Background colour backgroundColour=white colour

Values:

Plot settings for vertical profiles

As for vertical cross sections detailed settings for plotting vertical profiles are set inside the tags: #VPROF.OPTIONS and #VPROF.OPTIONS.END, alternatively directly in the VPROF.PLOT section. Here is a complete list of these options, including default value:

Explanation Options w/default value Values
Temperature tttt=on on/off
Dew point tdtd=on on/off
Wind wind=on on/off
Vertical wind (model) vwind=off on/off
Relative humidity relhum=off on/off
Ducting ducting=off on/off
K-index kindex=on on/off
Significant wind (dd-ff)slwind=off on/off
Datacolours dataColour=blue,red, darkGreen,black,magenta, darkGray,darkRed,darkCyan, orange,darkMagenta colour list
Data line widths dataLinewidth=3,3,3,3,3,3,3,3,3number list
Wind arrows line widthswindLinewidth=1,1,1,1,1,1,1,1,1number list
Separate wind column windseparate=on on/off
Text text=on on/off
Geographic position in textgeotext=on on/off
Limits for vertical wind (-X,X) rvwind=0.01 number hPa/s
Limits for ducting (-X,0) rducting=400number
Set number of text lines for station and timelinetext=0 0=Not set
Background colour backgroundColour=white colour
Diagram type diagramtype=0 0=Amble 1=Exner(pi) 2=Pressure 3=ln(P)
The temperature lines angle vs. the verticaltangle=45 0-360
Pressure reach min pminDiagram=100 number
Pressure reach max pmaxDiagram=1050 number
Min temp. at 1000 hPa tminDiagram=-30 (C)
Max temp. at 1000 hPa tmaxDiagram=30 (C)
Temperature limits trangeDiagram=0 0=fixed 1=fixed.max-min 2=minimum
Show pressure lines plines=on on/off
Pressure lines at flight levelsplinesfl=off on/off
Pressure lines colour pColour=black colour
Pressure line type pLinetype=solid line type
Pressure lines width 1pLinewidth1=1 number
Pressure lines width 2pLinewidth2=3 number
Show temperature linestlines=on on/off
Temperature line step tStep=5 number
Temperature line colourtColour=black colour
Temperature line type tLinetype=solid line type
Temperature line width 1tLinewidth1=1 number
Temperature line width 2tLinewidth2=3 number
Show dry adiabat dryadiabat=on on/off
Dry adiabat steps dryadiabatStep=10 number
Dry adiabat colour dryadiabatColour=black colour
Dry adiabat line type dryadiabatLinetype=solidline type
Dry adiabat line widthdryadiabatLinewidth=1number
Show wet adiabat wetadiabat=on on/off
Wet adiabat steps wetadiabatStep=5 number
Wet adiabat colour wetadiabatColour=darkRedcolour
Wet adiabat line type wetadiabatLinetype=solidline type
Wet adiabat line widthwetadiabatLinewidth=1number
Wet adiabat P min wetadiabatPmin=300 number
Wet adiabat T min wetadiabatTmin=-50 number
Show mixing ratio mixingratio=on on/off
Mixing ratio line set mixingratioSet=1 0/1/2/3
Mixing ratio colour mixingratioColour=magentacolour
Mixing ratio line typemixingratioLinetype=longdashline type
Mixing ratio line widthmixingratioLinewidth=1number
Mixing ratio P minmixingratioPmin=300 number
Mixing ratio T minmixingratioTmin=-50 number
Show numbers for P labelp=on on/off
Show numbers for T labelt=on on/off
Show numbers for mixing ratiolabelq=on on/off
Show frame frame=on on/off
Frame colour frameColour=black colour
Frame line type frameLinetype=solid line type
Frame line width frameLinewidth=2 number
Text colour textColour=black colour
Show flight levels flevels=on on/off
Flight levels colour flevelsColour=black colour
Flight levels line typeflevelsLinetype=solid line type
Flight levels line width 1flevelsLinewidth1=1 number
Flight levels line width 2flevelsLinewidth2=3 number
Show FL label labelflevels=on on/off
Relative size of vertical axisrsvaxis=1 number
Text relative size rstext=1 number
P and T numbers relative sizerslabels=1 number
Wind column width relative sizerswind=1 number
Vertical wind width relative sizersvwind=1 number
Relative humidity width relative sizersrelhum=1number
Ducting width relative sizersducting=1number
Support lines for rel.hum., vert.wind. and ducting line typerangeLinetype=solid line type
Support lines for rel.hum., vert.wind. and ducting line widthrangeLinewidth=1 numbers
Show contrails cotrails=on on/off
Contrail colour cotrailsColour=cyan colour
Contrail line typecotrailsLinetype=solid line type
Contrail line widthcotrailsLinewidth=3number
Contrail P min cotrailsPmin=100 number
Contrail P max cotrailsPmax=700 number

X-server and Xvfb (bdiana 3.28 and earlier)

Releases of bdiana earlier than version 3.29 require an X-server to run. If bdiana is run on a machine with an active X-session, such as a workstation, it will automatically use this server. On machines without X or when running without the user being logged in, a different X-server needs to be set with the -display variable (host:display-no.screen-no). A good alternative on linux machines is Xvfb (X virtual framebuffer). For example:
          # Starting Xvfb with OpenGL support
          Xvfb :5 -screen 0 1280x1024x24 -ac 
	  
Here Xvfb is started so that display-no is 5 and screen-no is 0 on the machine hosting the Xvfb framebuffer. For Xvfb to run in the background even after logging out:
          # Xvfb as a background process
          nohup Xvfb :5 -screen 0 1280x1024x24 -ac &
	  
This is how you can use Xvfb with bdiana - given the above example:
          bdiana -input "bdiana.input" -display "host":5.0
	  

 Diana User Guide: Batch plotting |  Previous: File formats |  Index