Project

General

Profile

« Previous | Next » 

Revision e949bb4d

Added by Benoit Parmentier over 8 years ago

debugging accuracy, adding missing parameters in layers production

View differences:

climate/research/oregon/interpolation/global_run_scalingup_mosaicing.R
382 382
    #note that three tiles did not produce a residuals surface!!! find out more later, join the output
383 383
    #to df_raste_tile to keep track of which one did not work...
384 384
    #lf_accuracy_residuals_raster <- as.character(unlist(lapply(1:length(list_create_accuracy_residuals_raster_obj),FUN=function(i,x){unlist(extract_from_list_obj(x[[i]]$list_pred_res_obj,"raster_name"))},x=list_create_accuracy_residuals_raster_obj))) 
385
    lf_accuracy_residuals_raster <- lapply(1:length(list_create_accuracy_residuals_raster_obj),FUN=function(i,x){as.character(unlist(extract_from_list_obj(x[[i]]$list_pred_res_obj,"raster_name")))},x=list_create_accuracy_residuals_raster_obj)
385
    lf_accuracy_residuals_testing_raster <- lapply(1:length(list_create_accuracy_residuals_raster_obj),FUN=function(i,x){as.character(unlist(extract_from_list_obj(x[[i]]$list_pred_res_obj,"raster_name")))},x=list_create_accuracy_residuals_raster_obj)
386 386
    
387 387
    #Plot as quick check
388 388
    #r1 <- raster(lf_mosaic[[1]][1]) 
......
448 448
    #note that three tiles did not produce a residuals surface!!! find out more later, join the output
449 449
    #to df_raste_tile to keep track of which one did not work...
450 450
    #lf_accuracy_residuals_raster <- as.character(unlist(lapply(1:length(list_create_accuracy_residuals_raster_obj),FUN=function(i,x){unlist(extract_from_list_obj(x[[i]]$list_pred_res_obj,"raster_name"))},x=list_create_accuracy_residuals_raster_obj))) 
451
    lf_accuracy_residuals_data_s_raster <- lapply(1:length(list_create_accuracy_residuals_raster_obj),FUN=function(i,x){as.character(unlist(extract_from_list_obj(x[[i]]$list_pred_res_obj,"raster_name")))},x=list_create_accuracy_residuals_raster_obj)
451
    lf_accuracy_residuals_training_raster <- lapply(1:length(list_create_accuracy_residuals_raster_obj),FUN=function(i,x){as.character(unlist(extract_from_list_obj(x[[i]]$list_pred_res_obj,"raster_name")))},x=list_create_accuracy_residuals_raster_obj)
452 452
    
453 453
  }
454 454
  
......
578 578
      mosaic_method <- "use_edge_weights" #this is distance from edge
579 579
      out_suffix_tmp <- paste(interpolation_method,"kriged_residuals","data_day_v",day_to_mosaic[i],out_suffix,sep="_")
580 580
      #lf_tmp<-list.files(pattern="*kriged_residuals.*.tif",full.names=T)
581
      lf_tmp <- lf_accuracy_residuals_raster[[i]]
581
      lf_tmp <- lf_accuracy_residuals_testing_raster[[i]]
582 582
      #lf_accuracy_residuals_raster[[i]]
583 583
      #debug(mosaicFiles)
584 584
      mosaic_obj <- mosaicFiles(lf_tmp,
......
597 597
                                tmp_files=tmp_files,
598 598
                                data_type=data_type,
599 599
                                scaling=scaling,
600
                                vales_range=values_range)
600
                                values_range=values_range)
601 601
      #Took 11 to 12 minues for one day and 28 tiles in region 4
602 602
      list_mosaic_obj[[i]] <- mosaic_obj
603 603
    }      
......
608 608
      mosaic_method <- "use_edge_weights" #this is distance from edge
609 609
      out_suffix_tmp <- paste(interpolation_method,"kriged_residuals","data_day_s",day_to_mosaic[i],out_suffix,sep="_")
610 610
      #lf_tmp<-list.files(pattern="*kriged_residuals.*.tif",full.names=T)
611
      lf_tmp <- lf_accuracy_residuals_raster[[i]]
611
      lf_tmp <- lf_accuracy_residuals_training_raster[[i]]
612 612
      #lf_accuracy_residuals_raster[[i]]
613 613
      #debug(mosaicFiles)
614 614
      mosaic_obj <- mosaicFiles(lf_tmp,

Also available in: Unified diff