source: palm/trunk/SCRIPTS/nc2vdf @ 1104

Last change on this file since 1104 was 1068, checked in by maronga, 12 years ago

last commit documented

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1#!/bin/ksh
2#--------------------------------------------------------------------------------#
3# This file is part of PALM.
4#
5# PALM is free software: you can redistribute it and/or modify it under the terms
6# of the GNU General Public License as published by the Free Software Foundation,
7# either version 3 of the License, or (at your option) any later version.
8#
9# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License along with
14# PALM. If not, see <http://www.gnu.org/licenses/>.
15#
16# Copyright 1997-2012  Leibniz University Hannover
17#--------------------------------------------------------------------------------#
18#
19# Current revisions:
20# -----------------
21#
22# Former revisions:
23# -----------------
24# $Id: nc2vdf 1068 2012-11-26 10:15:04Z raasch $
25#
26# 1067 2012-11-26 10:13:14Z maronga
27# Code put under GNU GPL
28#
29# Description:
30# ------------
31# Starting script for nc2vdf. The script does only work on hicegate2, bicegate2,
32# uv as well as on the server at imuk.
33#------------------------------------------------------------------------------#
34
35    check_muk=false
36    check_hlrn=false
37    check_workstation=false
38    sys="unknown"
39
40
41    echo "*** checking hostname..."
42    if [ $(expr "$HOSTNAME" : ".*muk.uni-hannover.de") -gt 0 ]
43    then
44       check_muk=true
45    fi
46
47    if [ $(expr "$HOSTNAME" : ".*hicegate2") -gt 0 ]
48    then
49       check_hlrn=true
50    fi
51    if [ $(expr "$HOSTNAME" : ".*bicegate2") -gt 0 ]
52    then
53       check_hlrn=true
54    fi
55    if [ $(expr "$HOSTNAME" : ".*huv") -gt 0 ]
56    then
57       check_hlrn=true
58    fi
59    if [ $(expr "$HOSTNAME" : ".*buv") -gt 0 ]
60    then
61       check_hlrn=true
62    fi
63#    if [ $(expr "$HOSTNAME" : "") -eq 1 ] ### insert $HOSTNAME of your workstation here if you are not running vapor on one of the systems above
64#    then
65#       check_workstation=true
66#    fi
67
68
69
70    if [ $check_muk == "true" ]
71    then
72       sys="IMUK"
73       . /muksoft/packages/vapor/2.1.0/bin/vapor-setup.sh
74    fi
75
76    if [ $check_hlrn == "true" ]
77    then
78       sys="HLRN"
79       . /usr/share/modules/init/ksh
80       module load vapor
81       module load ncl
82    fi
83   
84    if [ $check_workstation == "true" ]
85    then
86       sys="workstation"
87    fi
88
89    if [ $sys == "unknown" ]
90    then
91       echo "+++ unknown system."
92       #exit 0
93    else
94       echo "*** nc2vdf will execute at $sys"
95    fi
96
97    if which nc2vdf.ncl >/dev/null; then
98       ncl $PALM_BIN/nc2vdf.ncl "inputfile= \"$1\""
99    else
100       echo "  +++ nc2vdf.ncl not found."
101    fi
Note: See TracBrowser for help on using the repository browser.