-
Notifications
You must be signed in to change notification settings - Fork 1
/
lats4d.sh
executable file
·71 lines (66 loc) · 2.14 KB
/
lats4d.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
#
# Simple sh(1) script to start GrADS and LATS4D, exiting from GrADS
# upon completion.
#
# Revision history:
#
# 29dec1999 da Silva First crack.
# 05jan1999 da Silva Minor mod.
# 04oct2005 Todling Added pointer for lats4d.gs in the build
# 10may2006 da Silva Auto detection of install dir
# 15Nov2008 da Silva Added gradsdap, simplified; renamed
# lats4d --> lats4d.sh
#
#-------------------------------------------------------------------------
# Use full patch names if you wish
gradsbin="../../opengrads/Contents/opengrads"
lats4dgs="./lats4d.gs"
if [ $#0 -lt 1 ]; then
echo " "
echo "NAME"
echo " lats4d - file conversion and subsetting utility"
echo " "
echo "SYNOPSIS"
echo " lats4d [-nc] [-hdf] option(s)"
echo " "
echo "DESCRIPTION"
echo " lats4d is a command line interface to GrADS"
echo " and the lats4d.gs script. It starts either"
echo " gradshdf or gradsnc depending on the -hdf/-nc"
echo " option specified, runs lats4d.gs, and exits"
echo " from GrADS upon completion. "
echo " "
echo " For additional information on LATS4D enter: lats4d -h"
echo " "
echo "OPTIONS"
echo " -nc for producing GRIB or NetCDF files"
echo " -hdf for producing GRIB or HDF-SDS files (default)"
echo " -dods for reading OPeNDAP URLs with gradsdods (v1.9)"
echo " -dap for reading OPeNDAP URLs with gradsdap (v2.0)"
echo " option(s) for a list of lats4d options enter: lats4d -h"
echo " "
echo "IMPORTANT"
echo " You must specify the input file name with "
echo " the \"-i\" option."
echo " "
echo "SEE ALSO "
echo " http://opengrads.org/wiki/index.php?title=LATS4D"
echo " "
exit 1
fi
if [ "$1" = "-nc" ]; then
gradsbin="gradsnc"
shift
elif [ "$1" = "-hdf" ]; then
gradsbin="gradshdf"
shift
elif [ "$1" = "-dods" ]; then
gradsbin="gradsdods"
shift
elif [ "$1" = "-dap" ]; then
gradsbin="gradsdap"
shift
fi
echo $gradsbin -blc \'run $lats4dgs -q $@ \'
eval $gradsbin -blc \'run $lats4dgs -q $@ \'