Revision b40d219c
Added by Benoit Parmentier over 8 years ago
climate/research/oregon/interpolation/global_run_scalingup_mosaicing.R | ||
---|---|---|
82 | 82 |
#30) list_models : if NULL use y~1 formula #PARAM 29 |
83 | 83 |
#31) layers_option: mosaic to create as a layer from var_pred (e.g. TMax), res_training, res_testing, ac_testing |
84 | 84 |
#32) tmp_files: if TRUE keep temporary files generated during mosaicing |
85 |
#33) use_int: if TRUE, use int32 in the final output
|
|
85 |
#33) data_type: if NULL, use Float32, other possibilities are gdal based in the final output
|
|
86 | 86 |
#34) scaling: scaling factor to multiply the original variable before conversation to int |
87 |
#35) values_range: valid range for predicted values and mosaic e.g. -100,100 |
|
87 | 88 |
|
88 | 89 |
###OUTPUT |
89 | 90 |
# |
... | ... | |
173 | 174 |
#list_models <- paste(var_pred,"~","1",sep=" ") #if null then this is the default... |
174 | 175 |
layers_option <- list_param_run_mosaicing_prediction$layers_option #PARAM 27 |
175 | 176 |
tmp_files <- list_param_run_mosaicing_prediction$tmp_files #PARAM 28 |
176 |
use_int <- list_param_run_mosaicing_prediction$use_int #PARAM 29
|
|
177 |
data_type <- list_param_run_mosaicing_prediction$data_type #PARAM 29
|
|
177 | 178 |
scaling <- list_param_run_mosaicing_prediction$scaling |
179 |
values_range <- list_param_run_mosaicing_prediction$values_range |
|
178 | 180 |
|
179 | 181 |
################################################################# |
180 | 182 |
####### PART 1: Read in data and process data ######## |
... | ... | |
484 | 486 |
out_suffix=out_suffix_tmp, |
485 | 487 |
out_dir=out_dir, |
486 | 488 |
tmp_files=tmp_files, |
487 |
use_int=use_int, |
|
488 |
scaling=scaling) |
|
489 |
data_type=data_type, |
|
490 |
scaling=scaling, |
|
491 |
values_range=values_range) |
|
489 | 492 |
#runs in 15-16 minutes for 3 dates and mosaicing of 28 tiles... |
490 | 493 |
list_mosaic_obj[[i]] <- mosaic_obj |
491 | 494 |
} |
... | ... | |
511 | 514 |
out_suffix=out_suffix_tmp, |
512 | 515 |
out_dir=out_dir, |
513 | 516 |
tmp_files=tmp_files, |
514 |
use_int=use_int, |
|
515 |
scaling=scaling) |
|
517 |
data_type=data_type, |
|
518 |
scaling=scaling, |
|
519 |
values_range=values_range) |
|
516 | 520 |
##Took 29 minutes for 28 tiles and one date...!!! |
517 | 521 |
list_mosaic_obj[[i]] <- mosaic_obj |
518 | 522 |
} |
... | ... | |
542 | 546 |
out_suffix=out_suffix_tmp, |
543 | 547 |
out_dir=out_dir, |
544 | 548 |
tmp_files=tmp_files, |
545 |
use_int, |
|
546 |
scaling) |
|
549 |
data_type=data_type, |
|
550 |
scaling=scaling, |
|
551 |
vales_range=values_range) |
|
547 | 552 |
#Took 11 to 12 minues for one day and 28 tiles in region 4 |
548 | 553 |
list_mosaic_obj[[i]] <- mosaic_obj |
549 | 554 |
} |
... | ... | |
571 | 576 |
out_suffix=out_suffix_tmp, |
572 | 577 |
out_dir=out_dir, |
573 | 578 |
tmp_files=tmp_files, |
574 |
use_int=use_int, |
|
575 |
scaling=scaling) |
|
579 |
data_type=data_type, |
|
580 |
scaling=scaling, |
|
581 |
values_range=values_range) |
|
576 | 582 |
|
577 | 583 |
list_mosaic_obj[[i]] <- mosaic_obj |
578 | 584 |
#Took 11 to 12 minues for one day and 28 tiles in region 4 |
Also available in: Unified diff
adding valid range parameter for mosaicing function script