setenv  <synchfile>    <path name> or "NONE"
    setenv  <basefile>     <path name>
    setenv  <infile>       <path name>
    setenv  <matrixfile>   <path name>
    setenv  <outfile>      <path name>
    mtxblend <and respond to the prompts>
where basefile, infile, matrixfile, outfile, and the optional synchfile are the logical names of the base data, input data, input sparse-matrix transform, output data, and synchronization-control files.


The MTXBLEND program reads in a sparse-matrix transform file that does regridding from one grid (say IN_GRID) to another grid (say BASE_GRID), and performs a masked-merge of data for a user-specified time step sequence from the basefile (on grid BASE_GRID) and transformed data from the infile (on grid IN_GRID), under the control of data-availability from the synchfile.

There are two normal modes of use for MTXBLEND:

All variables in the basefile must be present in the infile, and all time steps of these varaibles for the user-specified time step sequence must be available from both of these files, and of the synchfile, if present. The output grid, the transform-output grid of the matrixfile, and the grid of the basefile must match. The transform-input grid and the grid of the infile must also match.

Requires Fortran-90 for compilation.

Before you run the program, you need to assign logical names to the physical file names of both files and to the GRIDDESC file, according to Models-3 conventions, using the operation

    "setenv <lname> <pname>"
The program will prompt you for the logical names you have chosen for the input and output files.

If you want to run this program in batch mode (from a script), the recommended way to develop the script is to run the program once interactively noting the pattern of responses to prompts which generate the particular execution you want. The pattern of responses then becomes either a command-input file which you may redirect into the program in the script, or may become a "here-document" fed into the execution by the script. One such script, to merge data from a UK 10-kilometer gridded emissions file with data from a Euorpean 36-kilometer gridded emissions file, is given below:

#  Script to run /env/proj/ppar/smoke/Run.mtxblend for the 
#  INNOGY UK108_25X28 test case
limit stacksize unlimited
limit memoryuse unlimited
#	Directory for executables:
setenv  BIN   /env/proj/ppar/IRIX6n32f90
setenv  DATA  /env/data/coats/EU
setenv INGRID       UK10_84X130
setenv BASEGRID     EU36_39X42

setenv MATRIX_FILE /env/data/coats/EU/MTX.${INGRID}.${BASEGRID}.ncf
setenv IN_DATA     /env/data/smoke/ge_dat/94ag.${INGRID}.ncf
setenv BASE_DATA   /env/data/smoke/ge_dat/innogydat/94ag.${BASEGRID}.ncf
setenv OUT_DATA   "/env/data/coats/EU/94mrg.${BASEGRID}.ncf -v"
unsetenv LOGFILE
set UI=/tmp/mtxblend.$$
echo "Yes, continue with program"   >& $UI
echo "NONE"                         >> $UI          #  no synch file
echo "MATRIX_FILE"                  >> $UI          # output grid name
echo "IN_DATA"                      >> $UI          # new input file name
echo "BASE_DATA"                    >> $UI          # old input file name
echo ""                       >> $UI          # default starting date
echo ""                       >> $UI          # default starting time
echo ""                       >> $UI          # default time step
echo ""                       >> $UI          # default number of records
echo "OUT_DATA"               >> $UI          # output file name
echo '------------------------------------------------------------------'
echo '------------------------------------------------------------------'
echo "UI command-line input:"
cat ${UI}
echo '------------------------------------------------------------------'

time ${BIN}/mtxblend < ${UI}

set foo=$status

echo '------------------------------------------------------------------'
rm ${UI}
if ( $foo != 0 )  echo "ERROR $foo on program "

exit ( $foo )

See Also:

Previous: M4FILTER


Up: Related Programs

To: Models-3/EDSS I/O API: The Help Pages