-
Notifications
You must be signed in to change notification settings - Fork 17
/
cron_job.sh
executable file
·60 lines (47 loc) · 1.15 KB
/
cron_job.sh
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
#!/bin/bash
#Job name
#$ -N cronjob
echo `date`
echo `date` >> /home/carya/SoilMoisture/process_log.txt
# Run download job
cd /home/carya/SoilMoisture/
python 01_download_data.py "[email protected]" "[email protected]"
#Compare MODIS data to process log, and process any new data.
for i in data/MODIS/MY*hdf; do
echo $i
if grep -Fxq $i process_log.txt
then
continue
else
echo processing $i
Rscript 02_Extract_Data.R -i $i
echo $i >> process_log.txt
fi
done
#Compare GPM data to process log, and process any new data.
for i in data/GPM/3*1day.tif; do
echo $i
if grep -Fxq $i process_log.txt
then
continue
else
Rscript 02_Extract_Data.R -i $i
echo $i >> process_log.txt
fi
done
#Compare SMAP data to process log, and process any new data.
for i in data/SMAP/SM*5; do
echo $i
if grep -Fxq $i process_log.txt
then
continue
else
Rscript 02_Extract_Data.R -i $i
echo $i >> process_log.txt
fi
done
Rscript 03_plot_time_series.R
Rscript 04_Data_ReOrganizing.R
Rscript 05_soil_moisture_model_v003.R
Rscript 06_particle_filter_v001.R
convert -delay 50 -loop 0 example/gif/Forecast_PF_plot*.png web/plots/animatePF.gif