forked from NOAA-GSL/GSL-prep-chem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_HRRR_smoke.bash
executable file
·87 lines (76 loc) · 1.82 KB
/
build_HRRR_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
#! /bin/bash
EXEChrrr="$1"
if [[ -z "$1" ]] ; then
echo 'Syntax: build_HRRR_smoke.sh /path/to/HRRR/exec' 1>&2
exit 1
fi
set -xue
mkdir -p "$EXEChrrr"
pushd "$EXEChrrr"
EXEChrrr=$( 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" $EXEChrrr/hrrr_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" $EXEChrrr/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 $EXEChrrr/hrrr_prep_chem_sources
popd
pushd process-obs/HRRR-Smoke/src/
make
cp -fp FRE_BBM_HRRR_v4.exe "$EXEChrrr/hrrr_smoke_FRE_BBM_HRRR"
cp -fp merge_FRP_HRRR_v3.exe "$EXEChrrr/hrrr_smoke_merge_FRP_HRRR"
cp -fp proc_J01_FRP_HRRR_v3.exe "$EXEChrrr/hrrr_smoke_proc_J01_FRP_HRRR"
cp -fp proc_MODIS_FRP_HRRR_v3.exe "$EXEChrrr/hrrr_smoke_proc_MODIS_FRP_HRRR"
cp -fp proc_NPP_FRP_HRRR_v3.exe "$EXEChrrr/hrrr_smoke_proc_NPP_FRP_HRRR"
set +xue
echo Success. Please enjoy your new executables in $EXEChrrr
exit 0