-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfigure
executable file
·93 lines (78 loc) · 2.82 KB
/
configure
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
#!/bin/bash
# This program will carry out the configuration of WRF-Chem, including
# 1) configuring the environmental variables
# 2) configuring WRF and WPS
# 3) setting up the namelist
mydir=`dirname $0`
myname=`basename $0`
cd $mydir
mydir=`pwd -P` # transform the directory from relative to absolute
namelistonly=false
envvaropts=""
while [ $# -gt 0 ]; do
case $1 in
--namelist-only)
namelistonly=true
;;
--override)
envvaropts="--override"
;;
esac
shift
done
if ! $namelistonly; then
# Run the environmental variable configuration
CONFIG/wrfenvvar $envvaropts
if [ $? -ne 0 ]; then
exit 1
fi
. $mydir/envvar_wrfchem.cfg # source the environmental variable file
# Run the WRF and WPS configurations
echo "You will now be asked to configure WRF by choosing your system's architecture and a nesting scheme"
echo "Remember that WRF-Chem requires distributed memory (dmpar) and cannot use shared memory (smpar)."
echo -n "Press ENTER to continue."
read usercont
cd ../WRFV3
./configure
echo "You will now be asked to configure WPS by choosing your system's architecture. Remember that WPS"
echo "can run in serial in most cases."
echo -n "Press ENTER to continue."
read usercont
cd ../WPS
./configure
cd $mydir
# Run the second configure program. Currently this just sets the meteorology path and the met type.
CONFIG/config
# Run the namelist program. Only print this message if doing the full configuration (otherwise I think the
# user knows that they are setting the namelists)
echo "Finally you can set up your namelists. The Python program about to be called will allow you to interactively"
echo "set the namelist options. It will ensure that any common options are matched between the WRF and WPS namelists."
echo "The resulting namelists will be placed in $mydir/CONFIG"
echo "and linked to the WRFV3/run, WPS, and NEI/src/v0x directories."
echo -n "Press ENTER to continue."
read usercont
fi
python CONFIG/autowrf_namelist_main.py
# Link the resulting namelists in each place needed (the fancy new NEI program will take
# the WPS namelist as well)
cd ../WRFV3/run
if [ -e namelist.input -o -L namelist.input ]; then
mv namelist.input namelist.input.autowrf-backup
fi
ln -s $mydir/CONFIG/namelist.input
cd ../../WPS
if [ -e namelist.wps -o -L namelist.wps ]; then
mv namelist.wps namelist.wps.autowrf-backup
fi
ln -s $mydir/CONFIG/namelist.wps
cd ../NEI/src/v04
if [ -e namelist.wps -o -L namelist.wps ]; then
mv namelist.wps namelist.wps.autowrf-backup
fi
ln -s $mydir/CONFIG/namelist.wps
cd ../v03
if [ -e namelist.wps -o -L namelist.wps ]; then
mv namelist.wps namelist.wps.autowrf-backup
fi
ln -s $mydir/CONFIG/namelist.wps
echo " Configuration complete! "