Project

General

Profile

« Previous | Next » 

Revision 0bddce86

Added by Adam Wilson about 12 years ago

Script now runs except ncap2 is missing from the nco module

View differences:

climate/procedures/Pleiades.R
1 1
#### Script to facilitate processing of MOD06 data
2 2

  
3 3
setwd("/nobackupp1/awilso10/mod06")
4
library(rgdal)
5
library(raster)
4 6

  
5 7
## get MODLAND tile information
6 8
tb=read.table("http://landweb.nascom.nasa.gov/developers/sn_tiles/sn_bound_10deg.txt",skip=6,nrows=648,header=T)
......
43 45
tile="h11v08"   #can move this to submit script if needed
44 46
script="/u/awilso10/environmental-layers/climate/procedures/MOD06_L2_process.r"
45 47
#write.table(paste("--verbose ",script," date=",notdone," tile=\"",tile,"\"",sep=""),file="notdone.txt",row.names=F,col.names=F,quote=F)
46
write.table(paste("--verbose ",script," date=",notdone[1:30],sep=""),file="notdone.txt",row.names=F,col.names=F,quote=F)
48
#write.table(paste("--verbose ",script," date=",notdone[1:30],sep=""),file="notdone.txt",row.names=F,col.names=F,quote=F)
49
write.table(notdone[1:30],file="notdone.txt",row.names=F,col.names=F,quote=F)
47 50

  
48 51
save(fs,alldates,gridfile,td,file="allfiles.Rdata")
49 52

  
53
## run script
54
cat(paste("
55
#! /bin/bash
56
source ~/moduleload
57
source ~/.bashrc
58
Rscript --verbose --vanilla /u/awilso10/environmental-layers/climate/procedures/MOD06_L2_process.r date=$1
59
#Rscript --verbose --vanilla rtest
60
",sep=""),file="MOD06_process2")
61
system("chmod +x MOD06_process2")
62

  
63
cat(paste("
64
library(rgdal)
65
GDALinfo
66
",sep=""),file="rtest")
67

  
68

  
50 69
## Submission script
51 70

  
52 71
cat(paste("
......
76 95
## export a few important variables
77 96
  export NNODES=32
78 97
  export R_LIBS=\"/u/awilso10/R/x86_64-unknown-linux-gnu-library/2.15/\"
79
## load modules
80
#  module load gcc comp-intel/2012.0.032 netcdf mpi-sgi/mpt.2.06r6 hdf4 udunits R nco
81 98
## Run the script!
82 99
## current version not parallelizing across nodes!
83
  TMPDIR=$TMPDIR Rscript --verbose --vanilla /u/awilso10/environmental-layers/climate/procedures/MOD06_L2_process.r date=20000403
100
#  TMPDIR=$TMPDIR Rscript --verbose --vanilla /u/awilso10/environmental-layers/climate/procedures/MOD06_L2_process.r date=20000403
84 101

  
85 102
WORKLIST=notdone.txt
86
EXE="Rscript"
103
#EXE=\"Rscript\"
104
EXE="./MOD06_process2"
87 105
LOG=log/log_DataCompile.log
106
MQUEUE=/nobackupp4/pvotava/software/share/mqueue-eg/mqueue/mqueue
88 107

  
89
TMPDIR=$TMPDIR mpiexec -np $NNODES  /nobackupp4/pvotava/software/share/mqueue-eg/mqueue/mqueue -l $WORKLIST -p $EXE -v -v -v --random-starts 2-4 --work-analyze #> $LOG
90
#mpiexec -np 2  /nobackupp4/pvotava/software/share/mqueue-eg/mqueue/mqueue -l testrun.txt -p $EXE -v -v -v  #> $LOG
91
#TMPDIR=$TMPDIR mpiexec -np $NNODES  /nobackupp4/pvotava/software/share/mqueue-eg/mqueue/mqueue -l $WORKLIST -p $EXE -v -v -v #> $LOG
108
TMPDIR=$TMPDIR mpiexec -np $NNODES $MQUEUE -l $WORKLIST -p $EXE -v -v -v --random-starts 2-4 --work-analyze #> $LOG
92 109
exit 0
93 110
",sep=""),file="MOD06_process")
94 111

  
......
98 115

  
99 116
## check queue status
100 117
system("/u/scicon/tools/bin/node_stats.sh")
101
system("/u/scicon/tools/bin/qtop.pl 479343")
118
system("/u/scicon/tools/bin/qtop.pl 492352")
102 119

  
103 120
## Submit it (and keep the pid)!
104 121
system("qsub MOD06_process")
122
system("/u/scicon/tools/bin/pdsh_gdb -j 493281 -d tmp -s -u awilso10")
105 123

  
106 124
## work in interactive mode
107 125
# system("qsub -I -l walltime=2:00:00 -lselect=2:ncpus=16:model=san -q devel")

Also available in: Unified diff