-
Notifications
You must be signed in to change notification settings - Fork 30
/
Gemenviron
296 lines (281 loc) · 8.5 KB
/
Gemenviron
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# Gemenviron file for GEMPAK
#
# Setting of the NAWIPS environment variable is critical to the proper
# operation of GEMPAK. It defines the installation directory of GEMPAK.
# There are two ways for this variable to be set:
# 1) Define the NAWIPS variable prior to sourcing this Gemenviron file.
# 2) Manually set it below.
if (! $?NAWIPS) then
setenv NAWIPS /home/gempak/GEMPAK7
endif
# Please configure the following definitions to reflect your system:
setenv EDEX_SERVER "edex-cloud.unidata.ucar.edu"
#
# Sets environment variables used in running GEMPAK
# UNIDATA Program Center 6/1/92 (PB)
# Revised 8/31/94 for GEMPAK 5.2
# Modified 12/95 for Gempak5.2.1/Nawips (Chiz)
# Modified 8/96 for Gempak5.4/NAWIPS (Chiz)
# Modified 10/00 for Gempak5.6/NAWIPS (Chiz)
# Modified 3/04 for Gempak5.7/NAWIPS (Chiz)
#---------------------------------------------------------------------
# The command
# source Gemenviron
#
# or the individual lines below, must be included in your .login or
# .cshrc file!
#---------------------------------------------------------------------
# <<CONFIGURE>>
# To build GEMPAK on your system, you should set the NAWIPS variable
# to the top level of the source distribution tree on your system (i.e. /home/gempak/NAWIPS/ or /home/gempak/GEMPAK7/
#
#
# Uncomment the following lines for using GCC compilers (Solaris/HP only)
# set USEGCC_SOL=1
# set USEGCC_HPUX=1
#
set USE_GFORTRAN=1
#set USE_PGI=1
#set USE_G77=1
#
# --------------------------------------------------------------------
# Make sure NAWIPS directory exists
#
if ( ! -d $NAWIPS ) then
echo "Can not find NAWIPS distribution."
echo 'Check Gemenviron NAWIPS definition ->' $NAWIPS
unsetenv NAWIPS
exit
endif
#try to determine operating system: command uname must be in path
setenv MAKEINC "Makeinc.common"
if($?NA_OS == 0) then
set TMP_OS=`uname -s | tr '[A-Z]' '[a-z]'`
switch ($TMP_OS)
case "aix":
setenv NA_OS "aix"
setenv OS_MAJOR `uname -v`
if ( $OS_MAJOR == 5 ) then
setenv AIX_NO_GEMPAK_SCANDIR 1
endif
breaksw
case hp-ux:
set OS_MAJOR=`uname -r | cut -f1,2 -d.`
if($OS_MAJOR == 'B.11') then
setenv XCFLAGS "-DSYSLOG_RETURNS_INT"
endif
if ( $?USEGCC_HPUX ) then
setenv NA_OS "hpux_gcc"
else
setenv NA_OS "hpux"
endif
breaksw
case irix64:
#setenv XCFLAGS "-o32"
case irix:
setenv NA_OS "irix"
breaksw
case osf1:
setenv NA_OS "osf"
uac p noprint # supress warnings in xw driver for unaligned access
breaksw
case sunos:
setenv MAKEINC "Makeinc.common_sol"
set OS_MAJOR=`uname -r | sed 's/\..*//'`
set HARDWARE=`uname -i | tr '[A-Z]' '[a-z]'`
setenv NA_OS "sunos"
if(($OS_MAJOR == 5)&&($?USEGCC_SOL)) then
setenv NA_OS "sol_gcc"
else
setenv NA_OS "sol"
endif
if(($NA_OS == 'sol')&&($HARDWARE == 'i86pc')) then
setenv NA_OS "x86"
endif
breaksw
case ultrix:
setenv NA_OS "ultrix"
breaksw
case linux:
setenv NA_OS "linux"
if ( $?USE_G77 ) then
setenv GEM_COMPTYPE "g77"
else if ( $?USE_GFORTRAN ) then
setenv GEM_COMPTYPE "gfortran"
# use backward compatible LD for FC5 and earlier
# setenv LDFLAGS '-Wl,--hash-style=both'
else if ( $?USE_PGI ) then
setenv GEM_COMPTYPE "pgi"
else
echo "Using default COMPTYPE g77"
setenv GEM_COMPTYPE "g77"
endif
#
if ( ! $?MACHTYPE ) then
# set the MACHTYPE
set MACHTYPE=`uname -m`
endif
set MACHTEST=`echo $MACHTYPE | grep -c "_64"`
if ( $MACHTEST > 0 ) then
setenv NA_OS "linux64"
endif
breaksw
case freebsd:
setenv NA_OS "freebsd"
breaksw
case darwin:
setenv NA_OS "darwin"
breaksw
case cygwin:
setenv NA_OS "cygwin"
breaksw
case default:
echo "trouble determining operating system configuration"
echo "OS reported $TMP_OS"
exit
endsw
else
switch ($NA_OS)
case x86:
setenv MAKEINC "Makeinc.common_sol"
endsw
endif
# --------------------------------------------------------------------
#
# GEMPAK directory:
#
setenv GEMPAK $NAWIPS/gempak
setenv GEMPAKHOME $NAWIPS/gempak
#
# CONFIGURATION directory
setenv CONFIGDIR $NAWIPS/config
#
# System environmental variables
#
setenv OS_ROOT $NAWIPS/os/$NA_OS
setenv OS_BIN $OS_ROOT/bin
setenv GEMEXE $OS_BIN
setenv OS_INC $OS_ROOT/include
setenv OS_LIB $OS_ROOT/lib
setenv GEMLIB $OS_LIB
#
# Remaining directories used by GEMPAK (leave as is):
#
setenv GEMPDF $GEMPAK/pdf
setenv GEMTBL $GEMPAK/tables
setenv GEMERR $GEMPAK/error
setenv GEMHLP $GEMPAK/help
setenv GEMMAPS $GEMPAK/maps
setenv GEMNTS $GEMPAK/nts
setenv GEMPARM $GEMPAK/parm
setenv GEMPTXT $GEMPAK/txt/programs
setenv GEMGTXT $GEMPAK/txt/gemlib
setenv NMAP_RESTORE $GEMNTS/nmap/restore
#
# MEL_BUFR environment
setenv MEL_BUFR $NAWIPS/extlibs/melBUFR/melbufr
setenv MEL_BUFR_TABLES $GEMPAK/tables/melbufr
#
#
# Add NAWIPS to the X applications resource path.
#
set xresources=""
if ( -d $NAWIPS/resource ) then
set xresources="$NAWIPS/resource/%N"
if ( $?XUSERFILESEARCHPATH ) then
setenv XUSERFILESEARCHPATH ${xresources}:${XUSERFILESEARCHPATH}
else
setenv XUSERFILESEARCHPATH $xresources
endif
endif
#
# Set PATH to include $OS_BIN and $PYHOME
#
setenv PATH ${PATH}:${OS_BIN}:${NAWIPS}/bin
#
# --------------------------------------------------------------------
# <<CONFIGURE>>
# Data directories, either real time or the Hurricane Bob sample data set:
#
# Case study data (hurricane Bob)
#
setenv TEST_DATA $GEMPAK/data
#
# Live data
#
setenv GEMDATA /data/ldm/gempak
setenv OBS $GEMDATA
#
# Location of meta files (generated with NC decide driver)
setenv NTRANS_META $GEMDATA/meta
#
# Location of text bulletins for use with NWX
setenv TEXT_DATA $GEMDATA/nwx
#
# Used by Nalarm (path component /nawips is added automatically by program).
# Write products into $GEMDATA/alarms/nawips for display.
setenv AFOS_ALARMS $GEMDATA/alarms/
#
# Location of SAT directory tree "Required!!"...must exist
#
setenv SAT $GEMDATA/images/sat
setenv RAD $GEMDATA/nexrad
setenv NEXCOMP $SAT/NEXRCOMP
#
#
# Below follow variables for data locations (site specific)
# These may be used in scripts etc., as well as $GEMTBL/config/datatype.tbl.
#
setenv LDMDATA /data/ldm
setenv GOES8 $SAT/GOES-8
setenv GOES9 $SAT/GOES-9
setenv SUPER_NATIONAL_IR $SAT/SUPER-NATIONAL/8km/IR
setenv NHEMMULTI_IR $SAT/NHEM-MULTICOMP/1km/IR
setenv MODEL $GEMDATA/model
#
# note HDS is mainted for historical reasons....
setenv HDS $MODEL
setenv MODEL_SND $GEMDATA/modsnd/gempak/bufr/model
setenv MODEL_SFC $GEMDATA/modsnd/gempak/bufr/model
setenv SAO $GEMDATA/surface
setenv UPA $GEMDATA/upperair
setenv RAW_SAO $LDMDATA/surface/sao
setenv RAW_SYN $LDMDATA/surface/syn
setenv RAW_UPA $LDMDATA/upperair
setenv NLDN $GEMDATA/nldn
setenv TORN_WARN $TEXT_DATA/watch_warn/TOR
setenv TSTRM_WARN $TEXT_DATA/watch_warn/SVR
setenv TEXT_WARN $TEXT_DATA/watch_warn
setenv RBKGPH $GEMDATA/redbook
setenv SIGWX $GEMDATA/sigwx
setenv SPDATA $GEMDATA
if($?HOME) then
setenv GRPHGD $HOME
else
setenv GRPHGD $GEMPAK
endif
#
# Print command and flags for systems
setenv LP "lp -c"
setenv LPFLAG "-d"
#
# getenv("OS") used by cfl_iret()
setenv OS $NA_OS
set ARCH = ""
if ( -d /awips2/python ) then
setenv PYHOME "/awips2/python"
set pv = `$PYHOME/bin/python -V |& cut -c8- | cut -d. -f1`
set pr = `$PYHOME/bin/python -V |& cut -c8- | cut -d. -f2`
setenv PYTHONPATH "${PYHOME}/lib/python${pv}.${pr}/site-packages:${NAWIPS}/scripts/python"
else
if($?PYTHONPATH) then
setenv PYTHONPATH "${NAWIPS}/scripts/python:${PYTHONPATH}"
else
setenv PYTHONPATH "${NAWIPS}/scripts/python"
endif
endif
if($?LD_LIBRARY_PATH) then
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${OS_LIB}
else
setenv LD_LIBRARY_PATH ${OS_LIB}
endif