#!/bin/csh -f
echo "Content-type: text/html"
echo ""

setenv HD jgofsdir

set tmp=$PATH_INFO
setenv OBJ $tmp:r
setenv FULLOBJ $OBJ
setenv QS ""
unsetenv PATH_INFO

if ( "$QUERY_STRING" != "" ) then
  setenv QS "`$HD/htmlbin/bin/htmlesc '$QUERY_STRING'`"
  setenv FULLOBJ "$OBJ($QS)"
endif

cat << XXSTUFFXX
<h1>$OBJ -- Transformations</h1>

<h2>Mathematical transformation</h2>

Enter a formula below, using the variables listed and either altering
one variable or creating a new one; e.g.,<p>
<tt>rho=28.5-0.2*temp+0.7*(sal-35)</tt><p>

Available operators are <tt>sin, cos, exp, ln, log10, int, +, -, *, /,
^</tt> and, of course, <tt>=</tt>. You can enter multiple formulae,
separated by commas. Do not include any blank spaces. Hit return when
finished.


<form action="/jg/mathopt${tmp}?${QS}" method="POST">
<input name="formula" type="text" size="80"></form><p>

Available variables are:<p>
XXSTUFFXX
$HD/bin/listvar ${OBJ}
echo "</form>"

