-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_UMIST.sh
executable file
·52 lines (38 loc) · 1.45 KB
/
build_UMIST.sh
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
#!/bin/bash
echo "---------------------------------------------"
arg=$1
# This script is used to build the krome code compatible with the UMIST rate16 chemical network.
# Copy the UMIST rate16 network to the krome tools directory
cp -r umist2krome_custm.py krome/tools/
if [ -z $arg ]
then
echo "No chemical network specified as bash argument."
echo "Please specify the network."
echo "Example: ./build_UMIST.sh umist_rate16"
echo "---------------------------------------------"
exit 1
fi
if [ $arg == 'umist_rate16' ]; then
echo "umist rate16 network selected."
cp -r umist_rate16.rates krome/tools/
else
echo $arg "is not a present chemical network."
fi
# Navigate to correct krome directory
cd krome/tools
# Build the UMIST rate16 network in KROME format
pwd
echo ">> Building the UMIST rate16 network in KROME format."
python umist2krome_custm.py $arg
# Add shielding to the H2 reaction (deactivate the H2 photodissociation reaction)
sed -i '/,H2,,H,H,,,.*user_xi/s/$/ * 0/' network_umist.dat
# Copy the network to the networks directory
cp -r network_umist.dat ../networks/
echo "UMIST rate16 network has been converted to the correct format."
echo "KROME will now be built with the UMIST rate16 network."
echo "---------------------------------------------"
echo ""
# Load the krome module
cd ../
python krome -n networks/network_umist.dat -iRHS -noSinkCheck -noRecCheck -noTlimits -unsafe -skipODEthermo -skipJacobian
# -shielding R14