Direct call of Bongo routines - 11.10.02

Bongo and Fortran code

A Bongo command file (default extension .bon) is simply a text file, where a sequence of commands (and their own parameters) is written by means of a text editor or also by a piece of fortran code like the following:


    open(10,'myfile.bon',status=new)
    call maxmin (vect1,xmi,xma)
    call maxmin (vect2,ymi,yma)
    write(10,*)'% my Bongo command file'
    write(10,*)'% Bologna Oct. 16, 2002'
    write(10,*)'rgb 1'
    write(10,*)'digits 0 0'
    write(10,5)xmi,xma,ymi,yma
5   format('limits ',4i4)
    write(10,*)'lticks 5 5'
    name='/home/mydir/input.dat'
    write(10,4)name
4   format('data ',a)
     ·
     ·
    write(10,*)'id xy'
    close(10)
    stop
    end
The code on the left side writes
on disk the file myfile.bon.
Myfile.bon can plot off-line
the data in input.dat by Bongo:


  % my Bongo command file
  % Bologna Oct. 16, 2002
  rgb 1
  digits 0 0
  limits [xmi xma ymi yma]
  lticks 5 5
  data /home/mydir/input.dat
   ..
   ..
   ..
  id xy

In spite of the above simplicity, in some situation it may be better to make direct calls to the routines Bongo uses too, collected in the file plotps.f. In such a case the user must prepare, before calls, all parameters any called routine needs (this is the second work the parser in Bongo makes, the first one beeing just the parsing of the command line).

The parameters are described in detail in the list of the plotps.f routines, but it must be remembered that all the routines contain the following fortran commands:
implicit real*8 (a-h,o-z)
INCLUDE 'common.bgo'
INCLUDE 'common.plt'

like in the example. Any calling program should include the same commands.

In user's /etc/profile file the line export BGODIR=/home/bongo should be included, /home/bongo beeing, on the author's computer, the directory which contains the bongo executable (if any) AND the .plt and .bgo files. User should change this to his/her preferred path/dir.
Sometimes the error 'CONFIG file non found' appears at the start. If you are sure that the file bconfig.plt is in the place defined by BGODIR, try for that file (and also for modivga.plt) a chmod 777 (or 666).

All the stuff needed to call Bongo routines directly from fortran code is within the tar file lancio.tar which can be downloaded also from the main Bongo page.

On opening (i.e. tar xvf lancio.tar ), the 'tar' file creates the directory "lancio/" (it means "launch" in italian) with plotps.f , the routines, two test fortran programs, prova.f and prova1.f, all the service files ( .plt and .bgo), two output postscript file (the plots) bongo.ps (gif version) and bongo2.ps (gif version) and a README with also the g77 command the author uses. The two .out files are numerical outputs created by the polynomial Least Squares fitting routine (POLY) and by the statistical routines (XYSTAT,SSTAT), respectively.


Last Updated: