-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_geocat_ancil
executable file
·35 lines (27 loc) · 1.12 KB
/
setup_geocat_ancil
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
#!/usr/bin/env bash
#
# This script will grab all the geocat ancillary data you need and build up
# the usual data/ folder in the current directory.
set -e
echo "Placing Geocat ancillary in ${PWD}/data..."
mkdir -p data/crtm data/instrument_data data/sfc_data data/plod/lit_end data/navigation
CAL_FILE=geocat_cal_v0_4.tar
NAV_FILE=geocat_nav_v0_2.tar.gz
PFA_FILE=geocat_pfaast_luts_v0_2.tar
SFC_FILE=geocat_sfc_data_v0_2.tar.gz
echo "Downloading the ancillary bundles, this may take a while..."
wget -q ftp://ftp.ssec.wisc.edu/pub/geocat/calibration/${CAL_FILE}
wget -q ftp://ftp.ssec.wisc.edu/pub/geocat/navigation/${NAV_FILE}
wget -q ftp://ftp.ssec.wisc.edu/pub/geocat/pfaast/${PFA_FILE}
wget -q ftp://ftp.ssec.wisc.edu/pub/geocat/surface_data/${SFC_FILE}
echo "Extracting the ancillary bundles in place..."
tar xf ${CAL_FILE} -C ./data/instrument_data
tar xf ${NAV_FILE} -C ./data/navigation
tar xf ${PFA_FILE} -C ./data/plod/lit_end
tar xf ${SFC_FILE} -C ./data/sfc_data
rm ${CAL_FILE}
rm ${NAV_FILE}
rm ${PFA_FILE}
rm ${SFC_FILE}
cp -r ${CRTM}/coeffs/* data/crtm/.
echo "Geocat ancillary directory ${PWD}/data set up successfully!"