Skip to content
Snippets Groups Projects
Commit 46e82fb0 authored by clblatte's avatar clblatte
Browse files

opt data combine In/Out metsaan data

parent e6a1ca30
No related branches found
No related tags found
No related merge requests found
......@@ -28,13 +28,16 @@ Process_SQL_Query <- FALSE
### Export the defined columns from DB as CSV
Process_CSV_export_from_DB <- FALSE
### Create optimization data for Jupyter notebook
Process_opt_data <- TRUE
# ------------------------------------------------
# Define name of genereated Optimization CSV file
# ------------------------------------------------
outp_name <- "rslt_RCP26_FIN_V11"
outp_name <- "rslt_inoutmetsaan_V12"
......@@ -53,13 +56,13 @@ if(on_cPouta == TRUE) {
numCores <- detectCores()
numCores
inputFolder <- "/media/volume/outp_rcp26/simulated"
outputFolder <- "/media/volume/outp_rcp26"
inputFolder <- "/media/volume/combine_optdata_rcp26"
outputFolder <- "/media/volume/combine_optdata_rcp26"
} else {
# for Windows
inputFolder <- paste(path, "input_data/FIN/RCP0", sep = "/")
outputFolder <- paste(path, "output/MF_FIN/RCP0_test", sep = "/")
#inputFolder <- paste(path, "input_data/test_Keski_Suomi/rcp0", sep = "/")
outputFolder <- paste(path, "output/combine_MetsaanMSNFI", sep = "/")
}
......@@ -260,16 +263,19 @@ if(Process_CSV_export_from_DB == TRUE){
# Porcess: manipulate CSV data for optimization
# --------------------------------------------
# List all .csv in 'input'
csv_input <- list.files(outputFolder, pattern = ".csv$")
# Remove the ending ".db" from the list to create a database name
csv_names <- gsub(".csv", "", csv_input)
print("Start Preparing Data")
source(paste(path, "prepare_opt_data.R", sep = "/"))
if(Process_opt_data == TRUE){
# List all .csv in 'input'
csv_input <- list.files(outputFolder, pattern = ".csv$")
# Remove the ending ".db" from the list to create a database name
csv_names <- gsub(".csv", "", csv_input)
print("Start Preparing Data")
source(paste(path, "prepare_opt_data.R", sep = "/"))
}
......
This diff is collapsed.
File added
......@@ -232,7 +232,7 @@ print("*** %deciduous trees calculated ***")
# ---------------
# Calculed Carbon sink
# Calculed Carbon sink (NEW: based on Carbon_STORAGE_Update - see SQL query for DB extraction)
# ---------------
## split data into:
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment