
#include "common.h"
#include "ocean.h"

#if PROTOTYPE_ALLOWED
void main(int argc, char *argv[])
#else
void main(argc, argv)
int argc;
char *argv[];
#endif
{
   double sigma, T = 40.0, S = 40.0, P = 10000.0;

   if (argc != 4)
   {
      printf("\n USAGE: svan <salinity> <temperature> <pressure>");
      printf("\n EXAMPLE: svan 40.0 40.0 10000.0\n");
   }
   else
   {
      S = atof(argv[1]);
      T = atof(argv[2]);
      P = atof(argv[3]);
   }
   printf("\n specific volume anomaly = %f cl/t", SVAN(S, T, P, &sigma));
   printf("\n         density anomaly = %f kg/m**3", sigma);
   printf("\n for S = %g (PSS-78), T = %g deg C, P = %g dbar\n\n", S, T, P);
    /* Recall that the function returns specific volume anomaly
       in units of 1.e-8 m3/kg.
    */
}
