From BAWiki

Basic Information

Name of Program



V 2.x


June 1999


finite difference method
numerical model TRIM-2D
numerical model TRIM-3D
extraction of data

Short Description of Functionality

The shell-script TRIMKACH is a postprocessor for the numerical models TRIM-2D and TRIM-3D. It permanently looks for resultfiles. If it finds at least one file, the suitable extraction-program will be started, either TR2KACHEL or TR3KACHEL. They will extract bathymetry, index-arrays and model results inside of rectangular tiles and optionally delete the results of the overall area. This deletion is recommended in order to reduce the diskspace used by the model results. Only the smaller extracted resultfiles remain. Furthermore you can start TRIMKACH before the model has terminated execution. TRIMKACH is able to extract data while the model is still running and producing new results.


Input-Files for extracting TRIM-2D-data:

  1. general input data (filetype tr2kachel.dat)
  2. on SGI a batch-file of type tr2kachel.qsub
  3. bathymetry and TRIM-2D-index-arrays (filetype tr2.topo.bin.ind)
  4. model results (filetype tr2.result)

Input-Files for extracting TRIM-3D-data:

  1. general input data (filetype tr3kachel.dat)
  2. on SGI a batch-file of type tr3kachel.qsub
  3. bathymetry and TRIM-2D-index-arrays (filetype tr2.topo.bin.ind)
  4. TRIM-3D-index-arrays (filetype tr2.topo.bin.i3d)
  5. (optional) model results (filetype tr3.result)


Output-Files after extraction of TRIM-2D-data:

  1. bathymetry and TRIM-2D-index-arrays for the tile(s) (filetype tr2.topo.bin.ind)
  2. model results for the tile(s) (filetype tr2.result)
  3. informative printer file (filetype tr2kachel.sdr)
  4. (optional) trace of program execution (filetype tr2kachel.trc)

Output-Files after extraction of TRIM-3D-data:

  1. bathymetry and TRIM-2D-index-arrays for the tile(s) (filetype tr2.topo.bin.ind)
  2. TRIM-3D-index-arrays for the tile(s) (filetype tr2.topo.bin.i3d)
  3. (optional) model results for the tile(s) (filetype tr3.result)
  4. informative printer file (filetype tr3kachel.sdr)
  5. (optional) trace of program execution (filetype tr3kachel.trc)


At first you have to start to copy trimkach.[ext] and some input files into the working directory. Then you are able to edit the input files and to adapt the specified parameters in trimkach.[ext]. The extension [ext] can be "SGI" or "hp". An important parameter is TRIM23 which decides whether TRIMKACH processes 2D- or 3D-data. The parameter LOESCH should be handled with care. After setting LOESCH="LOESCHEN" and successful extraction of data the overall resultfiles are deleted. The user should watch the processing in the beginning because wrong parameters do not stop the script.

Similar to a "daemon" the shell-script starts a process whenever it finds a result file. Opposite to a "daemon" TRIMKACH can be stopped automatically. There are two ways to terminate the script:

  1. the product of WARTE_S * MAXSUCH determines the runtime in seconds;
  2. LETZTE_RES contains a string with the time of the last TRIM-2D- or TRIM-3D-result that should be processed.

A short help is available executing "trimkach.[ext] h" on the commandline.

Program(s) to run before this Program


Program(s) to run after this Program


Additional Information


UNIX-commands AWK

Additional software


Original Version

P. Schade


P. Schade



back to Program Descriptions