Project

General

Profile

« Previous | Next » 

Revision 5c1400ca

Added by Benoit Parmentier over 11 years ago

downloading North America tiles, continued

View differences:

climate/research/oregon/interpolation/download_and_produce_MODIS_LST_climatology.R
116 116
}
117 117

  
118 118
## Run function:
119

  
119
list_tiles_modis <- c("h09v03,h10v03,h11v03,h12v03,h13v03,h14v03") #tiles for Northenr America, Northern US...
120 120
#list_tiles_modis <- c("h10v04,h11v04,h12v04,h13v04,h14v04,h07v06") #tiles for Northenr America, Northern US...
121 121
#list_tiles_modis <- c("h12v04,h13v04,h14v04,h07v06") #tiles for Northenr America, Northern US...
122 122
#list_tiles_modis <- c("h11v08,h11v07,h12v07,h12v08,h10v07,h10v08") #tile for Venezuela and surrounding area
......
128 128
#list_tiles_modis <- c("h09v09,h10v09,h11v09,h12v09,h13v09,h14v09")
129 129
#list_tiles_modis <-c("h30v10,h31v10,h32v10,h30v11,h31v11") #list("Queensland")
130 130

  
131
#script_path<-"/home/parmentier/Data/IPLANT_project/env_layers_scripts/"
132
#modis_download_script <- file.path(script_path,"modis_download_05142013.py") # LST modis download python script
133
#clim_script <- file.path(script_path,"climatology_05142013.py") # LST climatology python script
134
#grass_setting_script <- file.path(script_path,"grass-setup.R")
135
#var="TMAX"
136
#start_year = "2001"
137
#end_year = "2010"
131
script_path<-"/home/parmentier/Data/IPLANT_project/env_layers_scripts/"
132
modis_download_script <- file.path(script_path,"modis_download_05142013.py") # LST modis download python script
133
clim_script <- file.path(script_path,"climatology_05142013.py") # LST climatology python script
134
grass_setting_script <- file.path(script_path,"grass-setup.R")
135
var="TMAX"
136
start_year = "2001"
137
end_year = "2010"
138 138
#end_year = "2002"
139 139

  
140 140
#path on Jupiter
141 141

  
142
#hdfdir =  '/data/project/layers/commons/modis/MOD11A1_tiles' #destination file where hdf files are stored locally after download.
142
hdfdir =  '/data/project/layers/commons/modis/MOD11A1_tiles' #destination file where hdf files are stored locally after download.
143 143
#hdfdir =  '/home/parmentier/Data/IPLANT_project/MOD11A1_tiles'
144
#download=0
145
#clim_calc=1
146
#out_suffix_modis="_05302013"
144
download=1
145
clim_calc=0
146
out_suffix_modis="_05312013"
147 147

  
148
#list_param_download_clim_LST_script <- list(list_tiles_modis,start_year,end_year,hdfdir,
149
#                                 var,grass_setting_script,modis_download_script, clim_script,
150
#                                 download,clim_calc,out_suffix_modis)
151
#names(list_param_download_clim_LST_script)<-c("list_tiles_modis","start_year","end_year","hdfdir",
152
#                                   "var","grass_setting_script","modis_download_script","clim_script",
153
#                                   "download","clim_calc","out_suffix_modis")
148
list_param_download_clim_LST_script <- list(list_tiles_modis,start_year,end_year,hdfdir,
149
                                var,grass_setting_script,modis_download_script, clim_script,
150
                                download,clim_calc,out_suffix_modis)
151
names(list_param_download_clim_LST_script)<-c("list_tiles_modis","start_year","end_year","hdfdir",
152
                                  "var","grass_setting_script","modis_download_script","clim_script",
153
                                  "download","clim_calc","out_suffix_modis")
154 154
#debug(download_calculate_MODIS_LST_climatology)
155 155
#clim_production_obj <-mclapply(1:2, list_param=list_param_download_clim_LST_script, download_calculate_MODIS_LST_climatology,mc.preschedule=FALSE,mc.cores = 2) #This is the end bracket from mclapply(...) statement
156
#clim_production_obj <-lapply(1:2, list_param=list_param_download_clim_LST_script, download_calculate_MODIS_LST_climatology) #,mc.preschedule=FALSE,mc.cores = 2) #This is the end bracket from mclapply(...) statement
156
no_tiles <- length(unlist(strsplit(list_tiles_modis,",")))  # transform string into separate element in char vector
157
clim_production_obj <-lapply(1:no_tiles, list_param=list_param_download_clim_LST_script, download_calculate_MODIS_LST_climatology) #,mc.preschedule=FALSE,mc.cores = 2) #This is the end bracket from mclapply(...) statement
157 158

  
158 159
#download_calculate_MODIS_LST_climatology(1,list_param_download_clim_LST_script)
159
#source(file.path(script_path,"covariates_production_temperatures_05302013.R"))
160
#source(file.path(script_path,"covariates_production_temperatures_05312013.R"))
160 161
### END OF SCRIPT

Also available in: Unified diff