Project

General

Profile

« Previous | Next » 

Revision 8bb1a487

Added by Benoit Parmentier over 11 years ago

run TMIN predictions year 2000 Venezuela

View differences:

climate/research/oregon/interpolation/master_script_temp.R
10 10
#STAGE 5: Output analyses-visualization of results for specific dates...
11 11
#
12 12
#AUTHOR: Benoit Parmentier                                                                       
13
#DATE: 04/01/2013                                                                                 
13
#DATE: 04/02/2013                                                                                 
14 14

  
15 15
#PROJECT: NCEAS INPLANT: Environment and Organisms --TASK#363, TASK$568--   
16 16

  
......
48 48

  
49 49
#####SCRIPT USED FOR THE PREDICTIONS: Source all scripts here to avoid confusion on versions being run!!!!
50 50

  
51
#source(file.path(script_path,"master_script_temp_03282013.R")) #Master script can be run directly...
51
#source(file.path(script_path,"master_script_temp_04022013.R")) #Master script can be run directly...
52 52

  
53 53
#CALLED FROM MASTER SCRIPT:
54 54

  
55 55
#/home/parmentier/Data/IPLANT_project/Venezuela_interpolation/Venezuela_01142013/climatology_03192013.py
56 56
source(file.path(script_path,"covariates_production_temperatures_03212013.R"))
57
source(file.path(script_path,"Database_stations_covariates_processing_function_03242013.R"))
57
source(file.path(script_path,"Database_stations_covariates_processing_function_03272013.R"))
58 58
source(file.path(script_path,"GAM_fusion_analysis_raster_prediction_multisampling_03272013.R"))
59 59
source(file.path(script_path,"results_interpolation_date_output_analyses_03272013.R"))
60
#source(file.path(script_path,"results_covariates_database_stations_output_analyses_03272013.R"))
60
#source(file.path(script_path,"results_covariates_database_stations_output_analyses_04012013.R"))
61 61

  
62 62
#FUNCTIONS CALLED FROM GAM FUSION ANALYSIS RASTER PREDICTION ARE FOUND IN...
63 63

  
64 64
source(file.path(script_path,"sampling_script_functions_03122013.R"))
65
source(file.path(script_path,"GAM_fusion_function_multisampling_03192013.R")) #Include GAM_CAI
65
source(file.path(script_path,"GAM_fusion_function_multisampling_04022013.R")) #Include GAM_CAI
66 66
source(file.path(script_path,"GAM_fusion_function_multisampling_validation_metrics_03272013.R"))
67 67

  
68 68
############ STAGE 1: LST Climatology ###############
......
75 75
############ STAGE 2: Covariate production ################
76 76

  
77 77
##Paths to inputs and output
78
#var<-"TMIN"
79
var<-"TMAX"
78
var<-"TMIN"
80 79
in_path <- "/home/parmentier/Data/IPLANT_project/Venezuela_interpolation/Venezuela_01142013/input_data/"
81 80
out_path<- "/home/parmentier/Data/IPLANT_project/Venezuela_interpolation/Venezuela_01142013/output_data/"
82 81

  
......
117 116

  
118 117
#Setting up input argurments for script function...
119 118
#set up earlier
120
var <- "TMAX"           # name of the variables to keep: TMIN, TMAX or PRCP --already set up earlier
119
#var <- "TMIN"           # name of the variables to keep: TMIN, TMAX or PRCP --already set up earlier
121 120

  
122
infile_covariates<-"covariates__venezuela_region__VE_01292013.tif" #this is an output from covariate script and used in stage 3 and stage 4
123
#infile_covariates<-"covariates__venezuela_region_TMIN__VE_03192013.tif" #covariates stack for TMIN
121
#infile_covariates<-"covariates__venezuela_region__VE_01292013.tif" #this is an output from covariate script and used in stage 3 and stage 4
122
infile_covariates<-"covariates__venezuela_region_TMIN__VE_03192013.tif" #covariates stack for TMIN
124 123

  
125 124
CRS_locs_WGS84<-CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +towgs84=0,0,0") #Station coords WGS84: same as earlier
126 125
infile1<- "outline_venezuela_region__VE_01292013.shp"      #This is the shape file of outline of the study area                                                      #It is an input/output of the covariate script
......
128 127

  
129 128
#specific to this stage
130 129
db.name <- "ghcn"       # name of the Postgres database
131
range_years<-c("2010","2011") #right bound not included in the range!!
132
range_years_clim<-c("2000","2011") #right bound not included in the range!!
130
range_years<-c("2000","2001") #right bound not included in the range!!
131
range_years_clim<-c("1981","2011") #right bound not included in the range!!
133 132
infile2<-"/home/layers/data/climate/ghcn/v2.92-upd-2012052822/ghcnd-stations.txt"                              #This is the textfile of station locations from GHCND
134 133
in_path <- "/home/parmentier/Data/IPLANT_project/Venezuela_interpolation/Venezuela_01142013/input_data/"
135
out_prefix<-"_365d_GAM_fus5_all_lstd_03282013d"                #User defined output prefix
134
out_prefix<-"_365d_GAM_fus5_all_lstd_04022013"                #User defined output prefix
136 135
qc_flags_stations<-c("0","S")    #flags allowed for screening after the query from the GHCND??
137 136

  
138 137
#list of 12 parameters for input in the function...
......
211 210

  
212 211
############## STAGE 5: OUTPUT ANALYSES ##################
213 212

  
214
#source(file.path(script_path,"results_interpolation_date_output_analyses_03052013.R"))
213
#source(file.path(script_path,"results_interpolation_date_output_analyses_03272013.R"))
215 214
#Call as function...
216 215

  
217 216
###############   END OF SCRIPT   ###################

Also available in: Unified diff