
#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 P = 10000.0, LAT = 30.0;

   if (argc != 3)
   {
      printf("\n USAGE: depth <pressure> <latitude>");
      printf("\n ASSUMES: standard ocean T = 0.0 deg C and S = 35 (PSS-78)");
      printf("\n EXAMPLE: depth 10000.0 30.0\n");
   }
   else
   {
      P = atof(argv[1]);
      LAT = atof(argv[2]);
   }
   printf("\n depth = %f m at P = %g dbar, %g degrees latitude\n\n",
      p_depth(P, LAT), P, LAT);
}
