-
Notifications
You must be signed in to change notification settings - Fork 6
/
build_RAP_smoke.bash
executable file
·90 lines (77 loc) · 1.8 KB
/
build_RAP_smoke.bash
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
#! /bin/bash
EXECrap="$1"
if [[ -z "$1" ]] ; then
echo 'Syntax: build_RAP_smoke.sh /path/to/RAP/exec' 1>&2
exit 1
fi
set -xue
mkdir -p "$EXECrap"
pushd "$EXECrap"
EXECrap=$( pwd -P )
popd
set +xu
if [[ -d /lfs1 ]] ; then
where=jet
module purge
module load intel
module load szip
module load hdf5
module load netcdf
elif [[ -d /scratch1 ]] ; then
where=hera
module purge
module load intel
module load szip
module load hdf5
module load netcdf
else
# Assume WCOSS Cray
where=wcoss_cray
module purge
module load intel
module load NetCDF-intel-haswell/4.2
module load HDF5-serial-intel-haswell/1.8.9
fi
set -xu
pushd prep-chem/fires_ncfmake/
make clean
if [[ "$where" == jet ]] ; then
./mk-wrf-jet
elif [[ "$where" == hera ]] ; then
./mk-wrf-hera
else
./mk-wrf-wcoss-cray
fi
cp -fp "fires_ncfmake.x" $EXECrap/rap_fires_ncfmake
popd
pushd prep-chem/cycle_netcdf/
make clean
if [[ "$where" == jet ]] ; then
./mk-wrf-jet
elif [[ "$where" == hera ]] ; then
./mk-wrf-hera
else
./mk-wrf-wcoss-cray
fi
cp -fp "cycle_netcdf.x" $EXECrap/cycle_netcdf.exe
popd
pushd prep-chem/Prep_smoke_FRP/bin/build/
make clean
if [[ "$where" == jet || "$where" == hera ]] ; then
./mk-wrf
else
./mk-wrf-wcoss
fi
cp -fp ../prep_chem_sources_RADM_WRF_FIM_.exe $EXECrap/rap_prep_chem_sources
popd
pushd process-obs/RAP-Smoke/src/
make clean
make
cp -fp FRE_BBM_RAP_v4.exe "$EXECrap/rap_smoke_FRE_BBM_RAP"
cp -fp merge_FRP_RAP_v3.exe "$EXECrap/rap_smoke_merge_FRP_RAP"
cp -fp proc_J01_FRP_RAP_v3.exe "$EXECrap/rap_smoke_proc_J01_FRP_RAP"
cp -fp proc_MODIS_FRP_RAP_v3.exe "$EXECrap/rap_smoke_proc_MODIS_FRP_RAP"
cp -fp proc_NPP_FRP_RAP_v3.exe "$EXECrap/rap_smoke_proc_NPP_FRP_RAP"
set +xue
echo Success. Please enjoy your new executables in $EXECrap
exit 0