GDDIAG problem within GEMPAK


I need to subtract two vector quantities within GFUNC and I notice that the logfile says that only scalars are allowed within the operand. The problem with that is that the resultant quantity needs to remain a vector since the last step is to use a dot product within my expression. How do I get around this seemingly difficult dilemma within GDDIAG? My last recourse if nothing can be done is to use another computer language like C or Fortran to do the calculations and then import the calculated fields into my GEMPAK file. I have listed below my output for this one parameter.
# Calculate term 3A (dot product of Theta GRAD Tendency [Frontogenesis]
#                    and Theta-w GRAD)
$GEMEXE/gddiag<<EOF>> $logfile

GFUNC    = dot(quo(sub(GRAD(THTA)^${dtplus}/${gdatplus}00F000,GRAD(THTA)^${dtmin
GRDNAM   = trm3A^${dt}/${gdat}00F000

Thank you for your help,
Chris Melick
Christopher J. Melick
Ph.D. Student, Atmospheric Science
Department of Soil, Env, and Atmos Sciences
University of Missouri-Columbia
302 ABNR Building
Columbia, MO 65211

(573)-239-3999  cell
(573)-882-7739  work