-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathprocess-stack.sh
More file actions
executable file
·87 lines (69 loc) · 2.12 KB
/
process-stack.sh
File metadata and controls
executable file
·87 lines (69 loc) · 2.12 KB
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
#!/usr/bin/env bash
#################################################################
#
# Process a stack of S1 scenes.
#
# Scenes and orbits must be available in data_swath[nr].in files
# created by prepare_data.sh. Processing of coherence and inter-
# ferograms are conducted in individual SLURM jobs for each
# scene pair.
#
# Usage: process_stack.sh [config file]
#
################################################################
if [ $# -eq 0 ]; then
echo
echo "Usage: process_stack.sh config_file [supermaster]"
echo
elif [ ! -f $1 ]; then
echo
echo "Cannot open $1. Please provide a valid config file."
echo
else
echo
echo "- - - - - - - - - - - - - - - - - - - -"
echo " Starting STACK processing ..."
echo "- - - - - - - - - - - - - - - - - - - -"
echo
config_file=$1
source $config_file
echo "Config file: $config_file"
OSARIS_PATH=$( pwd )
echo "GSP directory: $OSARIS_PATH"
work_PATH=$base_PATH/$prefix/Processing
# Path to working directory
output_PATH=$base_PATH/$prefix/Output
# Path to directory where all output will be written
log_PATH=$base_PATH/$prefix/Log
# Path to directory where the log files will be written
mkdir -p $work_PATH/Stack
cd $work_PATH/raw
echo "SWATH2PROC: $SAR_sensor"
printf '%s\n' "${swath_to_process[@]}"
echo $swath_to_process
for swath in ${swaths_to_process[@]}; do
echo "SWATH: $swath"
echo - - - - - - - - - - - - - - - -
echo "Launching SLURM batch jobs"
echo
echo "Processing logs will be written to $log_PATH"
echo "Use tail -f [logfile] to monitor the SLURM tasks"
echo
slurm_jobname="$slurm_jobname_prefix-stack"
sbatch \
--ntasks=10 \
--output=$log_PATH/GSP-%j-stack \
--error=$log_PATH/GSP-%j-stack \
--workdir=$work_PATH \
--job-name=$slurm_jobname \
--qos=$slurm_qos \
--account=$slurm_account \
--partition=$slurm_partition \
--mail-type=$slurm_mailtype \
$OSARIS_PATH/lib/PP-stack.sh \
data_swath$swath.in \
$config_file \
$OSARIS_PATH/$gmtsar_config_file \
$OSARIS_PATH
done
fi