Revision 2d784041
Added by Benoit Parmentier about 9 years ago
climate/research/oregon/interpolation/global_run_scalingup_mosaicing.R | ||
---|---|---|
16 | 16 |
#4) fix output folder for some of output files |
17 | 17 |
# |
18 | 18 |
|
19 |
### Before running, the gdal modules and other environment parameters need to be set if on NEX-NASA. |
|
20 |
### This can be done by running the following commands: |
|
21 |
# |
|
22 |
#source /nobackupp6/aguzman4/climateLayers/sharedModules2/etc/environ.sh |
|
23 |
#MODULEPATH=$MODULEPATH:/nex/modules/files |
|
24 |
#module load pythonkits/gdal_1.10.0_python_2.7.3_nex |
|
25 |
# |
|
26 |
# |
|
19 | 27 |
################################################################################################# |
20 | 28 |
|
21 | 29 |
### Loading R library and packages |
... | ... | |
51 | 59 |
|
52 | 60 |
function_mosaicing <-"global_run_scalingup_mosaicing_function_10282015.R" |
53 | 61 |
|
54 |
in_dir_script <-"/home/parmentier/Data/IPLANT_project/env_layers_scripts" #NCEAS UCSB |
|
55 |
#in_dir_script <- "/nobackupp8/bparmen1/env_layers_scripts" #NASA NEX
|
|
62 |
#in_dir_script <-"/home/parmentier/Data/IPLANT_project/env_layers_scripts" #NCEAS UCSB
|
|
63 |
in_dir_script <- "/nobackupp8/bparmen1/env_layers_scripts" #NASA NEX |
|
56 | 64 |
source(file.path(in_dir_script,function_mosaicing)) |
57 | 65 |
|
58 | 66 |
############################################ |
... | ... | |
61 | 69 |
#Data is on ATLAS: reg4 (South America) |
62 | 70 |
|
63 | 71 |
#in_dir <- "/data/project/layers/commons/NEX_data/mosaicing_data_test" #PARAM1 |
64 |
in_dir <- "/data/project/layers/commons/NEX_data/output_run10_1500x4500_global_analyses_pred_1992_10052015" #PARAM4 |
|
65 |
#in_dir <- "/nobackupp8/bparmen1/output_run10_1500x4500_global_analyses_pred_1992_10052015" #NEX
|
|
72 |
#in_dir <- "/data/project/layers/commons/NEX_data/output_run10_1500x4500_global_analyses_pred_1992_10052015" #PARAM4
|
|
73 |
in_dir <- "/nobackupp8/bparmen1/output_run10_1500x4500_global_analyses_pred_1992_10052015" #NEX |
|
66 | 74 |
|
67 | 75 |
in_dir_tiles <- file.path(in_dir,"tiles") |
68 | 76 |
#in_dir_tiles <- "/nobackupp8/bparmen1/output_run10_1500x4500_global_analyses_pred_1992_10052015/tiles" #North America |
... | ... | |
96 | 104 |
|
97 | 105 |
num_cores <- 6 #PARAM 12 |
98 | 106 |
|
99 |
infile_mask <- "/data/project/layers/commons/NEX_data/output_run10_1500x4500_global_analyses_pred_1992_10052015/r_mask_reg4.tif" |
|
100 |
#infile_mask <- "/nobackupp8/bparmen1/output_run10_1500x4500_global_analyses_pred_1992_10052015/r_mask_reg4.tif"
|
|
107 |
#infile_mask <- "/data/project/layers/commons/NEX_data/output_run10_1500x4500_global_analyses_pred_1992_10052015/r_mask_reg4.tif"
|
|
108 |
infile_mask <- "/nobackupp8/bparmen1/output_run10_1500x4500_global_analyses_pred_1992_10052015/r_mask_reg4.tif" |
|
101 | 109 |
|
102 | 110 |
#tb_accuracy_name <- file.path(in_dir,paste("tb_diagnostic_v_NA","_",out_suffix_str,".txt",sep="")) |
103 |
tb_accuracy_name <- "/data/project/layers/commons/NEX_data/output_run10_1500x4500_global_analyses_pred_1992_10052015/tb_diagnostic_v_NA_run10_1500x4500_global_analyses_pred_1992_10052015.txt" |
|
104 |
#tb_accuracy_name <- "/nobackupp8/bparmen1/output_run10_1500x4500_global_analyses_pred_1992_10052015/tb_diagnostic_v_NA_run10_1500x4500_global_analyses_pred_1992_10052015.txt"
|
|
111 |
#tb_accuracy_name <- "/data/project/layers/commons/NEX_data/output_run10_1500x4500_global_analyses_pred_1992_10052015/tb_diagnostic_v_NA_run10_1500x4500_global_analyses_pred_1992_10052015.txt"
|
|
112 |
tb_accuracy_name <- "/nobackupp8/bparmen1/output_run10_1500x4500_global_analyses_pred_1992_10052015/tb_diagnostic_v_NA_run10_1500x4500_global_analyses_pred_1992_10052015.txt" |
|
105 | 113 |
|
106 | 114 |
#python script and gdal on NEX NASA: |
107 |
#mosaic_python <- "/nobackupp6/aguzman4/climateLayers/sharedCode/"
|
|
108 |
#python_bin <- "/nobackupp6/aguzman4/climateLayers/sharedModules/bin"
|
|
115 |
mosaic_python <- "/nobackupp6/aguzman4/climateLayers/sharedCode/" |
|
116 |
python_bin <- "/nobackupp6/aguzman4/climateLayers/sharedModules2/bin"
|
|
109 | 117 |
#python script and gdal on Atlas NCEAS |
110 |
mosaic_python <- "/data/project/layers/commons/NEX_data/sharedCode" |
|
111 |
python_bin <- "/usr/bin" |
|
118 |
#mosaic_python <- "/data/project/layers/commons/NEX_data/sharedCode"
|
|
119 |
#python_bin <- "/usr/bin"
|
|
112 | 120 |
|
113 |
#algorithm <- "python" #if R use mosaic function for R, if python use modified gdalmerge script from Alberto Guzmann
|
|
114 |
algorithm <- "R" #if R use mosaic function for R, if python use modified gdalmerge script from Alberto Guzmann |
|
121 |
algorithm <- "python" #if R use mosaic function for R, if python use modified gdalmerge script from Alberto Guzmann |
|
122 |
#algorithm <- "R" #if R use mosaic function for R, if python use modified gdalmerge script from Alberto Guzmann
|
|
115 | 123 |
|
116 | 124 |
########################## START SCRIPT ############################## |
117 | 125 |
|
Also available in: Unified diff
testing mosaicing code with python option on NEX