-
Notifications
You must be signed in to change notification settings - Fork 0
/
computer_botan.R
109 lines (93 loc) · 4.56 KB
/
computer_botan.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Copyright 2021-2023 Louis Héraut (louis.heraut@inrae.fr)*1,
# Éric Sauquet (eric.sauquet@inrae.fr)*1
#
# *1 INRAE, France
#
# This file is part of Explore2 R toolbox.
#
# Explore2 R toolbox is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Explore2 R toolbox is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Explore2 R toolbox.
# If not, see <https://www.gnu.org/licenses/>.
# Main script that regroups all command lines needed to interact with
# this toolbox. Choose your parameters before executing all the script
# (RStudio : Ctrl+Alt+R) or line by line.
# ___ __ _ _
# |_ _| _ _ / _| ___ _ _ _ __ __ _ | |_ (_) ___ _ _ ___
# | | | ' \ | _|/ _ \| '_|| ' \ / _` || _|| |/ _ \| ' \ (_-<
# |___||_||_||_| \___/|_| |_|_|_|\__,_| \__||_|\___/|_||_|/__/ _____
# If you want to contact the author of the code you need to contact
# first Louis Héraut who is the main developer. If it is not possible,
# Éric Sauquet is the main referent at INRAE to contact.
#
# Louis Héraut : <louis.heraut@inrae.fr>
# Éric Sauquet : <eric.sauquet@inrae.fr>
#
# See the 'README.md' file for more information about the utilisation
# of this toolbox.
# ___ _
# / __| ___ _ __ _ __ _ _ | |_ ___ _ _
# | (__ / _ \| ' \ | '_ \| || || _|/ -_)| '_|
# \___|\___/|_|_|_|| .__/ \_,_| \__|\___||_|
## 1. INFO ________ |_| ______________________________________________
# Work path
computer_work_path = '/home/louis/Documents/bouleau/INRAE/project/AEAG_project/AEAG_toolbox'
# Library path for package dev
dev_lib_path = '/home/louis/Documents/bouleau/INRAE/project/'
## 2. INPUT DIRECTORIES ______________________________________________
### 2.1. Data ________________________________________________________
computer_data_path =
'/home/louis/Documents/bouleau/INRAE/data/hydrologie/'
obs_hydro_format = "_HYDRO_QJM.txt"
### 2.2. Variables ___________________________________________________
# Name of the directory that regroups all variables information
CARD_path = file.path(dev_lib_path,
"CARD_project",
"CARD")
# Name of the tool directory that includes all the functions needed to
# calculate a variable
init_tools_dir = '__tools__'
# Name of the default parameters file for a variable
init_var_file = '__default__.R'
### 2.3. Resources ___________________________________________________
resources_path = file.path(computer_work_path, 'resources')
logo_dir = 'logo'
icon_dir = 'icon'
### 2.4. Shapefile ________________________________________________
computer_shp_path =
'/home/louis/Documents/bouleau/INRAE/data/map'
# Path to the shapefile for france contour from 'computer_data_path'
france_shp_path = 'france/gadm36_FRA_0.shp'
# Path to the shapefile for basin shape from 'computer_data_path'
bassinHydro_shp_path = 'bassinHydro/bassinHydro.shp'
# Path to the shapefile for sub-basin shape from 'computer_data_path'
regionHydro_shp_path = 'regionHydro/regionHydro.shp'
# Path to the shapefile for station basins shape from 'computer_data_path'
entiteHydro_shp_path = c('entiteHydro/BV_4207_stations.shp', 'entiteHydro/3BVs_FRANCE_L2E_2018.shp')
entiteHydro_coord = c('L93', 'L2')
river_shp_path = 'river/CoursEau_FXX.shp'
# piezo
entitePiezo_shp_path = "entitePiezo_niveau1_extension/entitePiezo_niveau1_extension.shp"
## 3. OUTPUT DIRECTORIES _____________________________________________
### 3.0. Info ________________________________________________________
today = format(Sys.Date(), "%Y_%m_%d")
now = format(Sys.time(), "%H_%M_%S")
### 3.1. Results _____________________________________________________
resdir = file.path(computer_work_path, 'results')
today_resdir = file.path(computer_work_path, 'results', today)
now_resdir = file.path(computer_work_path, 'results', today, now)
### 3.2. Figures ____________________________________________________
figdir = file.path(computer_work_path, 'figures')
today_figdir = file.path(computer_work_path, 'figures', today)
now_figdir = file.path(computer_work_path, 'figures', today, now)
### 3.3. Tmp ________________________________________________________
tmpdir = "tmp"