BEMOL - Grid concatenator and processor for # grids


Description
bemol is a program that re-assembles model output files that are stored in # grids.
# grids are briefly explained in this document and this presentation

The averaging algorithm used by bemol is described in this PDF document.

Usage
bemol

-src source-file(s)
accepts from 1 to 40 RPN standard files.
-dst output-file
destination RPN standard file
-core grid-core-file
destination RPN standard file that contains only the "core" (regularly spaced) portion of the grid
-coarse coarse-grid-file
destination RPN standard file that contains spatially averaged fields
-nbits nbits
Number of bits used for compacting standard files (eg. 12, 16, 24, 32). When nbits = 32, IEEE encoding is used.
-avg average-factor
Averaging factor (2, 3, 4...). Computed automatically if not given. Under automatic mode, the average factor is computed as the ratio between grid spacing at the edges of the grid compared to the spacing in the middle. This ratio is typically 4.
-ig3coarse ig3coarse
The ig3coarse and ig3core options allow the user to force the ig3 value that will be used to define the deformation axes (>> and ^^). By default, on # grids ig3=0 and ig4=0.

By default ig3=1 will be used for core grids, ig3=avg for coarse grids. Using different IG3 allow the user to test different averaging combinations while being able to view them with programs like xrec.

-ig3core ig3core
-compress [auto / yes / no] (default: auto) Switch to activate / deactivate the Lorenzo compression algorithm introducted in the RPN standard files in 2005.

If set to auto :
If the source record is compressed, the output is compressed
if the source record is not compressed, the output is not compressed

If set to yes :
Forces the compression of the output records

If set to no :
Does not compresses the output records

bemol can produce the 3 different files on the same run
bemol_2000 -src 20020612.fst -dst dst/20020612.fst -core core/20020612.fst -coarse coarse/20020612.fst

It can also output all the fields in the same file
bemol_2000 -src 20020612.fst -dst dst/20020612.fst -core dst/20020612.fst -coarse dst/20020612.fst

or you can use any combinations of the three.

Here are typical values for a  sample climatic run.
Source file :
dm1978010100_00000240p, 319x250, E32, 2254920 bytes
dst.fst, 319x250, R16, 1138448 " "
core.fst, 135x178, R16, 357344 " "
coarse.fst 200x99, R16, 298040 " " (7 fold reduction)