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


MTXCPLE is the general purpose linear-operator-transform file-to-file/grid-to-grid conversion program using sparse matrices possibly constructed by programs MTXBUILD or MTXCALC.

The MTXCPLE program extracts all variables for a specified time step sequence from one I/O API file, infile, transforms them to a new grid using the specified transform matrix,, and writes them to a different I/O API file, outfile, under the optional control of a synchfile. Any combination of physical or virtual files is supported.

MTXCPLE is normally used with synchfile=NONE for file-transform operations. Other use of MTXCPLE with a synchfile is to fit into a system of coupled models exchanging data via the I/O API coupling mode, and extract/interpolate data either from a virtual file to a physical file, or vice versa.

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 UNIX csh command-line operation

    "setenv <lname> <pname>"
The program will prompt you for the logical names you have chosen for the input data file, the input matrix transform file, for the input and output grids, for the output file type, and for the time step sequence to process. The prompts have default responses indicated in square brackets [LIKE THIS], which can be accepted by hitting <RETURN>. The specification of starting date and time, target date and time, and number of time step records for the run follow Models-3 date and time conventions.

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 analysis 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 interpolate from a time-independent emissions file on one grid to an output emissions file on another grid is given below:

#  Script to run /env/proj/ppar/smoke/Run.mtxcple for the
#  INNOGY UK108_25X28 test case
#	Location of the executable:
setenv BIN    /env/proj/ppar/IRIX6n32f90
setenv DATA   /env/data/innogy/UK108_25X28/emep97/area/
setenv INDIR  /env/data/innogy/inventory/emep97/area/
setenv  FRACTIONS    ${DATA}/EU_coeffs.UK108_25X28
setenv  MATRIX_FILE  ${DATA}/EU_to_UK108_25X28.matrix.ncf
setenv  IN_DATA      ${INDIR}/emep_ann.1997.eu50.ncf
setenv  OUT_DATA     ${DATA}/emep_ann.1997.UK108_25X28.ncf
unsetenv LOGFILE
set UI=/tmp/mtxcple.$$
echo "Yes, continue with program"  > ${UI}
echo "NONE"                       >> ${UI}    #  do not use any synch-file
echo "MATRIX_FILE"                >> ${UI}    #  input sparse transform-matrix
echo "IN_DATA"                    >> ${UI}    #  input data file
echo "1997001"                    >> ${UI}    #  starting date
echo "0"                          >> ${UI}    #  starting time
echo "87600000"                   >> ${UI}    #  timestep
echo "1"                          >> ${UI}    #  number of output time steps
echo "1"                          >> ${UI}    #  output file type
echo "OUT_DATA"                   >> ${UI}    #  output data file
echo " "                          >> ${UI}
echo '------------------------------------------------------------------'
echo '------------------------------------------------------------------'
echo "UI command-line input:"
cat ${UI}
echo '------------------------------------------------------------------'

${BIN}/mtxcple < ${UI}
set errornum=${status}

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

exit ( ${errornum} )

See Also:

Previous: MTXCALC


Up: Related Programs

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