source: palm/trunk/SCRIPTS/nc2vdf @ 1067

Last change on this file since 1067 was 1067, checked in by maronga, 9 years ago

updates in nc2vdf and associated files

  • 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# Code put under GNU GPL
22#
23# Former revisions:
24# -----------------
25# $Id: nc2vdf 1067 2012-11-26 10:13:14Z maronga $
26#
27# Description:
28# ------------
29# Starting script for nc2vdf. The script does only work on hicegate2, bicegate2,
30# uv as well as on the server at imuk.
31#------------------------------------------------------------------------------#
32
33    check_muk=false
34    check_hlrn=false
35    check_workstation=false
36    sys="unknown"
37
38
39    echo "*** checking hostname..."
40    if [ $(expr "$HOSTNAME" : ".*muk.uni-hannover.de") -gt 0 ]
41    then
42       check_muk=true
43    fi
44
45    if [ $(expr "$HOSTNAME" : ".*hicegate2") -gt 0 ]
46    then
47       check_hlrn=true
48    fi
49    if [ $(expr "$HOSTNAME" : ".*bicegate2") -gt 0 ]
50    then
51       check_hlrn=true
52    fi
53    if [ $(expr "$HOSTNAME" : ".*huv") -gt 0 ]
54    then
55       check_hlrn=true
56    fi
57    if [ $(expr "$HOSTNAME" : ".*buv") -gt 0 ]
58    then
59       check_hlrn=true
60    fi
61#    if [ $(expr "$HOSTNAME" : "") -eq 1 ] ### insert $HOSTNAME of your workstation here if you are not running vapor on one of the systems above
62#    then
63#       check_workstation=true
64#    fi
65
66
67
68    if [ $check_muk == "true" ]
69    then
70       sys="IMUK"
71       . /muksoft/packages/vapor/2.1.0/bin/vapor-setup.sh
72    fi
73
74    if [ $check_hlrn == "true" ]
75    then
76       sys="HLRN"
77       . /usr/share/modules/init/ksh
78       module load vapor
79       module load ncl
80    fi
81   
82    if [ $check_workstation == "true" ]
83    then
84       sys="workstation"
85    fi
86
87    if [ $sys == "unknown" ]
88    then
89       echo "+++ unknown system."
90       #exit 0
91    else
92       echo "*** nc2vdf will execute at $sys"
93    fi
94
95    if which nc2vdf.ncl >/dev/null; then
96       ncl $PALM_BIN/nc2vdf.ncl "inputfile= \"$1\""
97    else
98       echo "  +++ nc2vdf.ncl not found."
99    fi
Note: See TracBrowser for help on using the repository browser.