-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrunit_v50
executable file
·171 lines (135 loc) · 5.57 KB
/
runit_v50
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
#! /bin/csh -f
# C-shell script to run CR_EBI_SOLVER
date; set timestamp; set echo
set BASE = $cwd
set STEM = $BASE
set EXDIR = ${BASE}/BLD
set EXEC = cr_ebi_solver
#Define the gas, aerosol and aqueous components in MECHNAME
#setenv GC_NAME CB05TUCL
#setenv AE_NAME AE5
#setenv AQ_NAME AQ
#setenv GC_NAME SAPRC07TC
#setenv GC_NAME SAPRC07TIC
#setenv GC_NAME CB05TUCL
setenv GC_NAME RACM2
setenv AE_NAME AE6
setenv AQ_NAME AQ
#path for mechanism RXCM.EXT and RXDT.EXT files
#set REP = ${STEM}/mechanisms
#set REP = /home/hwo/cmaq-v5.0/AE6_based_HAPS_mechanism
#set REP = /home/hwo/tools/csv_to_nml-file
#set MECH = saprc07tc_xya_isoprene_v4_v50
#set REP = /home/hwo/cmaq-v5.0/mechanisms
set REP = /home/${USER}/CCTM_git_repository/MECHS
#set REP = /home/hwo/tools/mech_processor
#set MECH = saprc07tc_ae6_aq
#set MECH = saprc07tc_xya_isoprene_v5-zero_NO2EX
#set MECH = saprc07tc_xya_isoprene_v5_v50
#set MECH = cb05tucl_ae6_aq
set MECH = racm2_ae6_aq
#set MECH = saprc07tb_ae6_aq
#uses CMAQ version 5.0 of these include files for gas phase
#chemistry
setenv RXCMN_FL ${REP}/${MECH}/RXCM.EXT
setenv RXDAT_FL ${REP}/${MECH}/RXDT.EXT
if( ! ( -e ${RXCMN_FL} ) )then
\ls ${RXCMN_FL}
exit()
else if ( ! ( -e ${RXDAT_FL} ) )then
\ls ${RXDAT_FL}
exit()
endif
set echo
# using templates for CMAQ version 5.0
#setenv TMPLDIR ${STEM}/template_May_06_2011
#setenv DEGRADE_CODES ${STEM}/degrade_codes_serial
#setenv TMPLDIR ${STEM}/template_Aug_30_2011
setenv TMPLDIR ${STEM}/template_June_01_2012
setenv DEGRADE_CODES ${STEM}/degrade_codes_serial-mod_2
#creation program source code uses IOAPI 3.1 modules if src_ioapi equals 31
set src_ioapi_31 = "T"
if( ${src_ioapi_31} == "T" )then
setenv SRCDIR ${STEM}/src_May_17_2011
else
setenv SRCDIR ${STEM}/src_Oct_19_2010
endif
# output directory
set day = ` date "+%b-%d-%Y" `
set OUTDIR = ${BASE}/output/EBI_V501-${MECH}_${day}
setenv OUTDIR ${BASE}/output/EBI_V501-${MECH}_${day}
setenv COPYRT_FLAG N
setenv CVS_HDR_FLAG N
setenv ALL_MECHS F # obsolete option
setenv PAR_NEG_FLAG F # True for CB4 and CB05 but false for SAPRC99/07T
setenv DEGRADE_SUBS F # include calls for HAPs degrade routines
# below option is a possible solution based on work by Golam Sawar if the
# mechanism includes excited NO2. The user employs it at their own risk
# and should check the EBI solver's accuracy against the Gear or Rosenbrock solver
setenv NO2EX_CYCLE F # modify group one solution to include excited NO2
#Set the below compound names within the mechanism
# Mechanism SAPRC99 CB4
# # or SAPRC07 # CB05 #
# or RACM2 #
setenv MECH_NO NO # NO # NO # Mechanism name for nitric oxide
setenv MECH_NO2 NO2 # NO2 # NO2 # Mechanism name for nitrogen dioxide
setenv MECH_NO2EX NO2EX # NO2EX # NO2S # Mechanism name for excited nitrogen dioxide
setenv MECH_O3 O3 # O3 # O3 # Mechanism name for ozone
setenv MECH_O3P O3P # O3P # O # Mechanism name for ground state oxygen atom
setenv MECH_O1D O1D # O1D2 or O1D # O1D # Mechanism name for excited state oxygen atom
setenv MECH_OH HO # HO or OH or HO # OH # Mechanism name for hydroxyl radical
setenv MECH_HO2 HO2 # HO2 # HO2 # Mechanism name for hydroperoxy radical
setenv MECH_HONO HONO # HONO # HONO # Mechanism name for nitrous acid
setenv MECH_HNO4 HNO4 # HNO4 # PNA # Mechanism name for peroxynitric acid
setenv MECH_PAN PAN # PAN # PAN # Mechanism name for peroxy acetyl nitrate
setenv MECH_C2O3 ACO3 #CCO_O2 or MECO3 or ACO3 # C2O3 # Mechanism name for peroxy acetyl radical
setenv MECH_NO3 NO3 # NO3 # NO3 # Mechanism name for nitrate radical
setenv MECH_N2O5 N2O5 # N2O5 # N2O5 # Mechanism name for dinitrogen pentoxide
rm cr_ebi_solver
#########################################################
unalias rm
set is_sol = `uname -n | grep sol | wc -l`
set is_terra = `uname -n | grep sol | wc -l`
if ($is_sol) then
setenv WDX_LIB "/home/wdx/lib_sol/x86_64/ifc"
setenv WDX_SRC "/home/wdx/lib/src"
setenv NETCDF "netcdff"
setenv netcdf "netcdf"
else if($is_terra)then
setenv WDX_LIB "/home/wdx/lib/x86_64/ifc"
setenv WDX_SRC "/home/wdx/lib/src"
setenv NETCDF "netcdf"
setenv netcdf "netcdf"
else
setenv WDX_LIB "/home/${USER}/tools"
setenv WDX_SRC "/home/${USER}/tools/wdx_lib_src"
setenv NETCDF "netcdf"
setenv netcdf "intel_netcdf"
endif
if( -e ./BLD ) then
echo "Removing old BLD directory"
/bin/rm -rf ./BLD
endif
mkdir BLD
cp makefile ./BLD/Makefile
#cp Makefile ./BLD
cd BLD
make
cd ..
set echo
##########################################################
if( -e $OUTDIR ) then
echo "Removing old solver files"
/bin/rm -f ${OUTDIR}/*.[f,F]
else
mkdir -p $OUTDIR
\cp -f ${REP}/${MECH}/RXCM.EXT $OUTDIR/.
\cp -f ${REP}/${MECH}/RXDT.EXT $OUTDIR/.
# cp ${REP}/${MECH}/GC_SPC.EXT $OUTDIR/.
endif
#mkdir $OUTDIR
$EXDIR/$EXEC
if( $DEGRADE_SUBS == "T" )then
cp ${DEGRADE_CODES}/*.[f,F] ${OUTDIR}/.
endif
exit()