Here is a checklist:
MXMD3 if the variable goes to file
MET_DOT_3D).
LOGICAL flag variable to the MCPL()
code for this variable (e.g., if it is new variable
"FOO" for MET_DOT_3D, the flag
variable would be named MD3FOO.
DATA statement
initializing that file's flag-variables.
SAVE statement
for flag-variables.
DATA
statement initializing the file's supported-variables
list (e.g., MD3LIST for MET_DOT_3D).
WNDWFLAG(GRID) is
used to implement this condition). If you need to add a
new logical variable for this purpose, make sure you
SAVE it.
MCPL_OUT, add a CKVBLE call
specifying the name, flag, type, units, and description
for the new variable (as well as the active-variables
counter and active-variables list for the file).
For the example above, that would be:
CALL CKVBLE( 'FOO', GD3FOO, M3REAL, 'dingbats',
& 'plings the Inghams',
& NMD3, ! active-varaibles counter
& MD3NAMES ) ! active-variables list
If there are physics-process-dependent conditions for the
variable, enclose this CKVBLE call within an
IF block for the appropriate logical variable.
Set the variable's flag to .FALSE. in the
ELSE-clauses for that condition (if any), and
for the file's initialization-clause.
MCPL_OUT, add
an IF block output-section for this variable,
using any extra flags if necessary. For best performance,
the output blocks should be in exactly the same order as
the CKVBLE calls for that file. For our
example:
IF ( MD3FOO .AND. WNDWFLAG( N ) ) THEN ! decouple va
CALL MMDDCPL( 1.0, MIX, MJX, MKX, VA, PSA,
& NCDOT( N ), NRDOT( N ), NLAYS,
& CDOT0( N ), RDOT0( N ), 1, RBUF )
IF ( .NOT. WRITE3( MD3FILE( N ), 'FOO',
& JDATE, JTIME, RBUF ) ) THEN
MESG = 'Could not write FOO to ' // MD3FILE( N )
CALL M3EXIT( 'MM5v2/MCPL', JDATE, JTIME, MESG, 2 )
END IF
END IF ! if md3vwind
FOO
to file MD3_VARS for our example above).
Back to MCPL() Contents