forked from USF-IMARS/wv-land-cover
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmit_py.sh
More file actions
executable file
·53 lines (41 loc) · 1.6 KB
/
Copy pathsubmit_py.sh
File metadata and controls
executable file
·53 lines (41 loc) · 1.6 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
#!/bin/bash
#SBATCH --job-name ="wv2_classification_py"
#SBATCH --nodes=1
#SBATCH --mem-per-cpu=20480
#SBATCH --time=1:00:00
#SBATCH --array=0-611%20
##-611%30
##SBATCH --array=0-611%20
## Can submit up to 10,000 jobs at once, but only 512 will run concurrently
# Python code to check processing time:
# starttime = datetime.today()
# LogMsg('Image: %s' %(info.srcfn))
## Setup input arguments & file locations
images1=`ls $WORK/tmp/NSF/raw/*.[nN][tT][fF]`
met=`ls $WORK/tmp/NSF/raw/*.[xX][mM][lL]`
output_dir1=/work/m/mjm8/output/Ortho/NSF_SWTX/
rrs_out=/work/m/mjm8/output/Rrs/NSF_SWTX/
class_out=/work/m/mjm8/output/DT/NSF_SWTX/
# Setup Matlab arguments (dt 0 = Rrs, no DT or rrs; dt 1 = Rrs, DT & rrs; dt 2 = DT, Rrs & rrs | filt=moving-window filter)
dt=2
crd_sys=EPSG:4326
filt=2
loc='NSF_SWTX'
## Run Python code
images1a=($images1)
image=${images1a[$SLURM_ARRAY_TASK_ID]}
python /work/m/mjm8/progs/pgc_ortho.py -p 4326 -c ns -t UInt16 -f GTiff --no_pyramids $image $output_dir1
## Run Matlab code
#module add apps/matlab/r2013b
module add apps/matlab/r2017a
input_img_basename=$(basename "${image%.[nN][tT][fF]}")
echo $input_img_basename
image2="$output_dir1${input_img_basename}_u16ns4326.tif"
echo $image2
met=($met)
met=${met[$SLURM_ARRAY_TASK_ID]}
matlab -nodisplay -nodesktop -r "WV_Processing('$image2','$input_img_basename','$met','$crd_sys','$dt','$filt','$loc','$SLURM_ARRAY_TASK_ID','$rrs_out','$class_out')"
#### Calculate Total Time
# endtime = datetime.today()
# td = (endtime-starttime)
# LogMsg("Total Processing Time: %s\n" %(td))