library(lumpR)
bulk_density
bulk_density=0.4
1-(bulk_density/2.85)
bulk_density=1.2
1-(bulk_density/2.85)
setwd("E:/till/uni/crns/vJFC/0_compartments/soil_physics/hexland_tracks/raw")
source("E:/till/uni/crns/vJFC/0_compartments/soil_physics/hexland_tracks/raw/generate_hexland_soil_phys.R", echo=TRUE)
source("E:/till/uni/crns/vJFC/0_compartments/soil_physics/hexland_tracks/raw/generate_hexland_soil_phys.R", echo=TRUE)
source("E:/till/uni/crns/vJFC/0_compartments/soil_physics/hexland_tracks/raw/generate_hexland_soil_phys.R", echo=TRUE)
source("E:/till/uni/crns/vJFC/0_compartments/SM_distribution/hexland_tracks/raw/generate_hexland_soil_moisture.R", echo=TRUE)
source("E:/till/uni/crns/vJFC/0_compartments/SM_distribution/hexland_tracks/raw/generate_hexland_soil_moisture.R", echo=TRUE)
material_codes
source("E:/till/uni/crns/vJFC/0_compartments/SM_distribution/homogenous_10x1/raw/generate_soil_moisture.R", echo=TRUE)
source("E:/till/uni/crns/vJFC/0_compartments/SM_distribution/homogenous_10x1/raw/generate_soil_moisture.R", echo=TRUE)
source("E:/till/uni/crns/vJFC/0_compartments/SM_distribution/homogenous_10x1/raw/generate_soil_moisture.R", echo=TRUE)
source("E:/till/uni/crns/vJFC/0_compartments/soil_physics/hexland_tracks/raw/generate_hexland_soil_phys.R", echo=TRUE)
dest_dir
src_dir
patternfile_tracks
dest_dir = sub(dirname(dest_dir_marker), pattern = "patterns/([^/]*)", replacement = "soil_physics/\\1")  #destination directory to store the outputs
dest_dir
dest_dir_marker
src_dir
dest_dir = "../../../soil_physics/hexland_tracks_0/pre_processed"
dest_dir
src_dir  = sub(dirname(dest_dir), pattern = "/pre_processed)", replacement = "/raw")  #destination directory to get the inputs the outputs
src_dir
getwd()
dest_dir
codefile = "../../hexland_tracks_0/raw/codes.txt" #codes and properties for the classes in the patternfile
dest_dir = "../../hexland_tracks_0/pre_processed"
source("E:/till/uni/crns/vJFC/0_compartments/soil_physics/hexland_tracks/raw/generate_hexland_soil_phys.R", echo=TRUE)
#Hexland_tracks_0
patternfile = "../../../patterns/hexland_tracks/pre_processed/pattern.shp" #file holding (hexagonal) pattern (with tracks)
patternfile
dest_dir
#Hexland_tracks_0
patternfile = "../../../patterns/hexland_tracks/pre_processed/pattern.shp" #file holding (hexagonal) pattern (with tracks)
patternfile
dest_dir = sub(dirname(patternfile), pattern = "patterns/([^/]*)", replacement = "SM_distribution/\\1")  #destination directory to store the outputs
dest_dir
#Hexland_tracks_0
patternfile = "../../../patterns/hexland_tracks/pre_processed/pattern.shp" #file holding (hexagonal) pattern (with tracks)
dest_dir = sub(dirname(patternfile), pattern = "patterns/([^/]*)", replacement = "SM_distribution/\\1")  #destination directory to store the outputs
dest_dir = sub(dest_dir, pattern = "hexland_tracks", replacement = "hexland_tracks_0")  #destination directory to store the outputs
dest_dir
patternfile
paste0(sub(dirname(patternfile), pattern = "patterns/([^/]*)", replacement = "soil_physics/\\1"), "/soil_physics_3D.nc")  #destination directory to store the outputs
dest_dir
dest_dir
bd_grid = paste0(sub(dirname(dest_dir), pattern = "SM_distribution/([^/]*)", replacement = "soil_physics/\\1"), "/soil_physics_3D.nc")  #destination directory to store the outputs
bd_grid
paste0(sub(dirname(patternfile), pattern = "patterns/([^/]*)", replacement = "soil_physics/\\1"), "/soil_physics_3D.nc")  #destination directory to store the outputs
dest_dir
dest_dir
dirname(dest_dir)
bd_grid = paste0(sub(dest_dir, pattern = "SM_distribution/([^/]*)", replacement = "soil_physics/\\1"), "/soil_physics_3D.nc")  #destination directory to store the outputs
bd_grid
patternfile = "../../../patterns/hexland_tracks/pre_processed/pattern.shp" #file holding (hexagonal) pattern (with tracks)
dest_dir = sub(dest_dir, pattern = "hexland_tracks", replacement = "hexland_tracks_0")  #destination directory to store the outputs
dest_dir = sub(dirname(patternfile), pattern = "patterns/([^/]*)", replacement = "SM_distribution/\\1")  #destination directory to store the outputs
bd_grid = paste0(sub(dest_dir, pattern = "SM_distribution/([^/]*)", replacement = "soil_physics/\\1"), "/soil_physics_3D.nc")  #destination directory to store the outputs
dest_dir
dest_dir
patternfile = "../../../patterns/hexland_tracks/pre_processed/pattern.shp" #file holding (hexagonal) pattern (with tracks)
dest_dir = sub(dest_dir, pattern = "hexland_tracks", replacement = "hexland_tracks_0")  #destination directory to store the outputs
dest_dir = sub(dirname(patternfile), pattern = "patterns/([^/]*)", replacement = "SM_distribution/\\1")  #destination directory to store the outputs
bd_grid = paste0(sub(dest_dir, pattern = "SM_distribution/([^/]*)", replacement = "soil_physics/\\1"), "/soil_physics_3D.nc")  #destination directory to store the outputs
dest_dir
#Hexland_tracks_0
patternfile = "../../../patterns/hexland_tracks/pre_processed/pattern.shp" #file holding (hexagonal) pattern (with tracks)
#Hexland_tracks_0
patternfile = "../../../patterns/hexland_tracks/pre_processed/pattern.shp" #file holding (hexagonal) pattern (with tracks)
dest_dir = sub(patternfile, pattern = "hexland_tracks", replacement = "hexland_tracks_0")  #destination directory to store the outputs
dest_dir = sub(dirname(dest_dir), pattern = "patterns/([^/]*)", replacement = "SM_distribution/\\1")  #destination directory to store the outputs
bd_grid = paste0(sub(dest_dir, pattern = "SM_distribution/([^/]*)", replacement = "soil_physics/\\1"), "/soil_physics_3D.nc")  #destination directory to store the outputs
dest_dir
bd_grid
source("E:/till/uni/crns/vJFC/0_compartments/SM_distribution/hexland_tracks/raw/generate_hexland_soil_moisture.R", echo=TRUE)
