head	1.1;
access;
symbols;
locks;
comment	@# @;


1.1
date	2010.12.10.23.35.33;	author strandwg;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@#!/bin/sh
#
# Run this script to drive F90 codes to calculate various POP diagnostics
#
if [ $# -eq 0 ] ; then
   echo "Usage: do_ocn_diagnostics (-s file|-t|-z) list of files"
   echo "Options:"
   echo "Any combination or all of the following:"
   echo "-s : Do sea level change calculation - requires base state file argument"
   echo "-t : Do various channel/basin transports"
   echo "-z : Do various zonal quantities"
   echo ""
   echo "All options require a list of files - specified with -f option"
   echo "Input files can be either single-field format, history files, or mix of both"
   exit 1
fi
#
# Parse arguments
#
tflag=off
zflag=off
basefile=
while getopts tzs: opt
do case "$opt" in
   t) tflag=on;;
   z) zflag=on;;
   s) basefile="$OPTARG";;
   \?)          # unknown flag
      echo >&2 \
      "Usage: $0 (-s file|-t|-z) -f list of files"
       exit 1;;
  esac
done
shift `expr $OPTIND - 1`
filelist=$*
echo "-s: "$basefile" -t: "$tflag" -z: "$zflag" files: "$filelist@
