Revision 5af36cdd
Added by Adam Wilson over 11 years ago
climate/procedures/Pleiades_MOD35.R | ||
---|---|---|
118 | 118 |
### qsub script |
119 | 119 |
cat(paste(" |
120 | 120 |
#PBS -S /bin/bash |
121 |
##PBS -l select=100:ncpus=8:mpiprocs=8
|
|
122 |
#PBS -l select=10:ncpus=8:mpiprocs=8 |
|
121 |
#PBS -l select=100:ncpus=8:mpiprocs=8 |
|
122 |
##PBS -l select=10:ncpus=8:mpiprocs=8
|
|
123 | 123 |
##PBS -l walltime=8:00:00 |
124 | 124 |
#PBS -l walltime=2:00:00 |
125 | 125 |
#PBS -j n |
... | ... | |
129 | 129 |
#PBS -q devel |
130 | 130 |
#PBS -V |
131 | 131 |
|
132 |
CORES=80 |
|
132 |
CORES=800
|
|
133 | 133 |
#CORES=160 |
134 | 134 |
|
135 | 135 |
HDIR=/u/armichae/pr/ |
136 |
# source $HDIR/etc/environ.sh
|
|
136 |
source $HDIR/etc/environ.sh |
|
137 | 137 |
source /u/awilso10/environ.sh |
138 | 138 |
source /u/awilso10/.bashrc |
139 | 139 |
IDIR=/nobackupp1/awilso10/mod35/ |
... | ... | |
146 | 146 |
mpiexec -np $CORES pxargs -a $WORKLIST -p $EXE -v -v -v --work-analyze 1> $LOGSTDOUT 2> $LOGSTDERR |
147 | 147 |
",sep=""),file=paste("mod35_qsub",sep="")) |
148 | 148 |
|
149 |
|
|
150 | 149 |
### Check the files |
151 | 150 |
system(paste("cat mod35_qsub",sep="")) |
152 | 151 |
system(paste("cat notdone.txt | head",sep="")) |
... | ... | |
160 | 159 |
####################################################### |
161 | 160 |
### Now submit the script to generate the climatologies |
162 | 161 |
|
162 |
|
|
163 | 163 |
tiles |
164 | 164 |
ctiles=c("h10v08","h11v08","h12v08","h10v07","h11v07","h12v07") # South America |
165 | 165 |
|
... | ... | |
170 | 170 |
cdone=data.frame(path="",tile="") #use this if you want to re-run everything |
171 | 171 |
cdone=data.frame(path=sapply(strsplit(basename( |
172 | 172 |
system("ssh lou 'find MOD35/summary -name \"MOD35_h[0-9][0-9]v[0-9][0-9].nc\"' ",intern=T)),split="_"),function(x) x[2])) |
173 |
cdone=data.frame(path=sapply(strsplit(basename( |
|
174 |
system("find summary -name \"MOD35_h[0-9][0-9]v[0-9][0-9].nc\"",intern=T)),split="_"),function(x) x[2])) |
|
173 | 175 |
cdone$tile=substr(basename(as.character(cdone$path)),1,6) |
174 | 176 |
print(paste(length(ctiles[!ctiles%in%cdone$tile]),"Tiles still need to be processed")) |
175 | 177 |
|
... | ... | |
187 | 189 |
### qsub script |
188 | 190 |
cat(paste(" |
189 | 191 |
#PBS -S /bin/bash |
190 |
#PBS -l select=20:ncpus=8:mem=94
|
|
191 |
#PBS -l walltime=3:00:00
|
|
192 |
#PBS -l select=40:ncpus=8:mem=94
|
|
193 |
#PBS -l walltime=2:00:00
|
|
192 | 194 |
#PBS -j n |
193 | 195 |
#PBS -m be |
194 | 196 |
#PBS -N mod35_climate |
195 |
#PBS -q normal |
|
197 |
#PBS -q devel |
|
198 |
##PBS -q normal |
|
196 | 199 |
##PBS -q ldan |
197 | 200 |
#PBS -V |
198 | 201 |
",if(delay) paste("#PBS -W depend=afterany:",job,sep="")," |
199 | 202 |
|
200 |
CORES=160
|
|
203 |
CORES=320
|
|
201 | 204 |
HDIR=/u/armichae/pr/ |
202 | 205 |
source $HDIR/etc/environ.sh |
203 | 206 |
source /pleiades/u/awilso10/environ.sh |
... | ... | |
230 | 233 |
################################################################# |
231 | 234 |
### copy the files back to Yale |
232 | 235 |
|
236 |
|
|
233 | 237 |
system("ssh lou") |
234 | 238 |
#scp `find MOD35/summary -name "MOD35_h[0-9][0-9]v[0-9][0-9].nc"` adamw@acrobates.eeb.yale.edu:/data/personal/adamw/projects/interp/data/modis/mod35/summary/ |
235 |
system("rsync -cavv `find summary -name \"MOD35_h[0-9][0-9]v[0-9][0-9]_mean.nc\"` adamw@acrobates.eeb.yale.edu:/data/personal/adamw/projects/interp/data/modis/mod35/summary/") |
|
239 |
system("rsync -cavv `find summary -name \"MOD35_h[0-9][0-9]v[0-9][0-9]_2009mean.nc\"` adamw@acrobates.eeb.yale.edu:/data/personal/adamw/projects/interp/data/modis/mod35/summary/") |
|
240 |
system("rsync -cavv `find summary -name \"MOD35_h[0-9][0-9]v[0-9][0-9].nc\"` adamw@acrobates.eeb.yale.edu:/data/personal/adamw/projects/interp/data/modis/mod35/summary/") |
|
241 |
|
|
242 |
|
|
243 |
system("gdalbuildvrt MOD35C6_2009.vrt summary/*2009mean.nc ") |
|
244 |
system("gdal_translate -stats -co \"COMPRESS=LZW\" -of GTiff MOD35C6_2009.vrt MOD35C6_2009.tif ") |
|
245 |
system("scp MOD35C6_2009.tif adamw@acrobates.eeb.24.177.10.190:/Users/adamw/Downloads/") |
|
236 | 246 |
exit |
237 | 247 |
|
238 | 248 |
|
Also available in: Unified diff
Separated daily products into a 'day' and 'night' cloudiness based on day flag