Skip to content
Snippets Groups Projects
Commit 61ade41e authored by Jeremy Auclair's avatar Jeremy Auclair
Browse files

Merge branch 'main' of https://gitlab.cesbio.omp.eu/auclairj/modspa_pixel into main

parents 9c4eb620 afb66d82
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,9 @@ config/config_modspa_*
parameters/csv_files/params_samir_test_dev.csv
parameters/csv_files/params_samir_Sigpac_test.csv
# figures
*.png
# Byte-compiled, backup..
*__pycache__*
__pycache__/
......
No preview for this file type
......@@ -16,14 +16,15 @@ import shutil # file management
if __name__ == '__main__':
if len(sys.argv) == 1:
prog = os.path.basename(sys.argv[0])
print(' ',sys.argv[0],' [data selected]')
print(' ', sys.argv[0], ' [data selected]')
else:
currentdir = os.path.dirname(os.path.realpath(__file__))
source_file = currentdir + os.sep + 'config_modspa_' + sys.argv[1]+'.json'
if not os.path.exists(source_file) : source_file = currentdir + os.sep + sys.argv[1]
source_file = currentdir + os.sep + 'config_modspa.' + sys.argv[1]+'.json'
if not os.path.exists(source_file):
source_file = currentdir + os.sep + sys.argv[1]
dest_file = currentdir + os.sep + 'config_modspa.json'
print('source file:', source_file)
print('destination file:', dest_file)
......
Installing the conda environnment
Installing the conda environment
=================================
If you have not yet installed **conda** on your machine, you should start with this step : `conda installation <https://conda.io/projects/conda/en/latest/user-guide/install/index.html>`_.
A ``yaml`` file is included to automatically create a conda virtual environnment with the correct libraries and dependencies installed. To install it run this command in the root directory of the modspa_pixel project:
A ``yml`` file is included to automatically create a conda virtual environnment with the correct libraries and dependencies installed. To install it run this command in the root directory of the modspa_pixel project:
.. code:: bash
(base) /modspa_pixel$ conda env create -f modspa_pixel_env.yaml
(base) /modspa_pixel$ conda env create -f modspa_pixel_env.yml
To activate the environnment:
To activate the environment:
.. code:: bash
......
......@@ -3,18 +3,18 @@
Understanding the json config file
==================================
All the global paramters for the modspa processing chain are located in the ``json`` (**/modspa_pixel/config/config_modspa.json**).
All the global paramters for the modspa processing chain are located in the ``json`` (**/modspa_pixel/config/config_modspa.json**) configuration file.
This allows you to choose where and how to run the modspa_pixel processing chain. Different parts of the processing chain are detailed in the **inputs** and **samir** sections. You can have multiple configuration files with name extensions (``_name_ext`` corresponds to the file ``config_modspa_name_ext.json``), to select one configuration file for the run, use the ``select_config_modspa.py`` (in the **modspa_pixel/config:** directory) as follows:
.. code:: bash
(modspa_pixel) $ python select_config_modspa.py name_ext
source file: /modspa_pixel/config/config_modspa_name_ext.json
source file: /modspa_pixel/config/config_modspa.name_ext.json
destination file: /modspa_pixel/config/config_modspa.json
/modspa_pixel/config/config_modspa.json updated
the name extension argument ``name_ext`` (withou the underscore **_**) is used to select the file content you want and copy it in the **/modspa_pixel/config/config_modspa.json** file.
the name extension argument ``name_ext`` is used to select the file content you want and copy it in the regular **/modspa_pixel/config/config_modspa.json** file.
Example of a configuration file:
......
Setting up the correct environnment and parameters
==================================================
This section will help you set-up the correct environnment and parameters to run the **modspa_pixel** scripts.
This section will help you set-up the correct environment and parameters to run the **modspa_pixel** scripts and perform a simulation.
To begin, clone the project from the `github <https://gitlab.cesbio.omp.eu/auclairj/modspa_pixel>`_ page with the following command:
.. code:: bash
(base) /modspa_pixel$ git clone https://gitlab.cesbio.omp.eu/auclairj/modspa_pixel.git
> git clone https://gitlab.cesbio.omp.eu/auclairj/modspa_pixel.git
This should create a ``modspa_pixel`` directory in your current directory.
.. warning::
Thz scripts have been developped and tested on **Linux** (Ubuntu) operating systems. Some tools or packages might not work on other operating systems like **Windows** or **Mac-OS**.
The scripts have been developped and tested on **Linux** (Ubuntu) operating systems. Some tools or packages might not work on other operating systems like **Windows** or **Mac-OS**.
.. toctree::
:maxdepth: 2
......
ClassName,scale_factor,Default,no_sim,straw_cereal,oilseed,soy,sunflower,corn,grassland,orchard,vineyards,broadleaf_forest,conifer_forest,heathland
ClassNumber,1,0,1,2,3,4,5,6,7,8,9,10,11,12
FCmax,1000,1,0,,,,,,,,,,,
Fslope,1000,1.4,0,,,,,,,,,,,
Foffset,1000,-0.075,0,,,,,,,,,,,
Kcmax,0,1.15,0,,,,,,,,,,,
Kslope,1000,1.2,0,,,,,,,,,,,
Koffset,1000,-0.24,0,,,,,,,,,,,
NDVIsol,1,0.15,,,,,,,
NDVImax,1,0.85,,,,,,,
Zsoil,1,2000,,,,,,,,,,,,
Ze,1,300,,,,,,,,,,,,
Init_RU,1000,0.87,,,,,,,,,,,,
DiffE,1,1,0,,,,,,,,,,,
DiffR,1,5,0,,,,,,,,,,,
REW,1,0,,,,,,,,,,,,
minZr,1,150,0,,,,,,,,,,,
maxZr,1,600,0,,,,,,,,,,,
p,1000,0.55,0,,,,,,,,,,,
FW,1000,1,0,,,,,,,,,,,
Irrig_auto,1,1,0,,,,,,,,,,,
Irrig_man,1,0,0,,,,,,,,,,,
NDVIsol,1,0.15,,0.15,0.15,,,,
NDVImax,1,0.85,,0.85,0.85,,,,
FCmax,1000,1,0,1,,,,,,,,,,
Fslope,1000,1.4,0,1.18,1.22,,,,,,,,,
Foffset,1000,-0.075,0,-0.165,-0.17,,,,,,,,,
Kcmax,0,1.15,0,1.15,0.7,,,,,,,,,
Kslope,1000,1.2,0,1.47,1.35,,,,,,,,,
Koffset,1000,-0.24,0,-0.17,-0.16,,,,,,,,,
Zsoil,1,2000,,2000,2000,,,,,,,,,
Ze,1,300,,125,125,,,,,,,,,
Init_RU,1000,0.87,,0.5,0.5,,,,,,,,,
DiffE,1,1,0,0,0,,,,,,,,,
DiffR,1,5,0,0,0,,,,,,,,,
REW,1,0,,9,9,,,,,,,,,
minZr,1,150,0,125,125,,,,,,,,,
maxZr,1,600,0,1250,1450,,,,,,,,,
p,1000,0.55,0,0.55,0.65,,,,,,,,,
FW,1000,1,0,1,1,,,,,,,,,
Irrig_auto,1,1,0,1,1,,,,,,,,,
Irrig_man,1,0,0,0,0,,,,,,,,,
Kcb_stop_irrig,1,0.5,0,,,,,,,,,,,
\ No newline at end of file
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