#!/bin/ksh #--------------------------------------------------------------------------------# # This file is part of PALM. # # PALM is free software: you can redistribute it and/or modify it under the terms # of the GNU General Public License as published by the Free Software Foundation, # either version 3 of the License, or (at your option) any later version. # # PALM is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # PALM. If not, see . # # Copyright 1997-2014 Leibniz Universitaet Hannover #--------------------------------------------------------------------------------# # # Current revisions: # ----------------- # adapted for use on desktop machines # Former revisions: # ----------------- # $Id: nc2vdf 1310 2014-03-14 08:01:56Z heinze $ # # 1067 2012-11-26 10:13:14Z maronga # Code put under GNU GPL # # Description: # ------------ # Starting script for nc2vdf. The script does only work on hicegate2, bicegate2, # uv, on the imuk server. It can be adapted for use on any desktop machine. #------------------------------------------------------------------------------# check_muk=false check_hlrn=false check_workstation=false sys="unknown" line="" more $1 | grep "check_workstation" > tmp_mrun while read line do check_workstation=`echo $line | cut -d"=" -s -f2` done < tmp_mrun line="" more $1 | grep "WS_init" > tmp_mrun while read line do WS_init=`echo $line | cut -d"=" -s -f2` done < tmp_mrun line="" more $1 | grep "init_script" > tmp_mrun while read line do vapor_init_path=`echo $line | cut -d"=" -s -f2` done < tmp_mrun rm tmp_mrun echo "*** checking hostname..." if [ $(expr "$HOSTNAME" : ".*muk.uni-hannover.de") -gt 0 ] then check_muk=true fi if [ $(expr "$HOSTNAME" : ".*hicegate2") -gt 0 ] then check_hlrn=true fi if [ $(expr "$HOSTNAME" : ".*bicegate2") -gt 0 ] then check_hlrn=true fi if [ $(expr "$HOSTNAME" : ".*huv") -gt 0 ] then check_hlrn=true fi if [ $(expr "$HOSTNAME" : ".*buv") -gt 0 ] then check_hlrn=true fi if [ $check_muk == "true" ] then sys="IMUK" . /muksoft/packages/vapor/2.2.0/bin/vapor-setup.sh fi if [ $check_hlrn == "true" ] then sys="HLRN" . /usr/share/modules/init/ksh module load vapor module load ncl fi if [ $check_workstation == "True" ] then sys="workstation" if [ $WS_init == "True" ] then . $vapor_init_path fi if [ $WS_load == "True" ] then $WS_load_command fi fi if [ $sys == "unknown" ] then echo "+++ unknown system." #exit 0 else echo "*** nc2vdf will execute at $sys" fi if which nc2vdf.ncl >/dev/null; then ncl $PALM_BIN/nc2vdf.ncl "inputfile= \"$1\"" else echo " +++ nc2vdf.ncl not found." fi