diff --git a/docs/notebooks/run_model_with_different_dataset.ipynb b/docs/notebooks/run_model_with_different_dataset.ipynb index 4faee3c4..493b5530 100644 --- a/docs/notebooks/run_model_with_different_dataset.ipynb +++ b/docs/notebooks/run_model_with_different_dataset.ipynb @@ -5,25 +5,33 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Running the STEMMUS_SCOPE model\n", + "# Running the STEMMUS_SCOPE model with different dataset\n", "\n", - "This notebook shows how to run the STEMMUS_SCOPE model uisng the Executable file, including preprocessing and postprocessing. \n", + "This notebook shows how to run the STEMMUS_SCOPE model uisng the Executable file, including preprocessing and postprocessing. For postprocesisng, the file required_netcdf_variables.csv can be found at https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/main/utils/csv_to_nc/required_netcdf_variables.csv.\n", "\n", "## Which options are available?\n", "\n", - "See the [run_model_with_different_options.ipynb](./run_model_with_different_options.ipynb) for avialbale options e.g. Executable file, Matlab, Octave.\n", + "See the [Run the model with different options](./run_model_with_different_options.ipynb) for avialbale options e.g. Executable file, Matlab, Octave.\n", "The STEMMUS_SCOPE executable file is located in a repository https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/main/run_model_on_snellius/exe/STEMMUS_SCOPE.\n", "\n", "## Which datasets are available?\n", "The config file shows how to set the paths to different data needed by the model. Check the data source on Snelius and CRIB and modify the config file accordingly:\n", "\n", - "#### On CRIB:\n", - "- Site data: /data/shared/EcoExtreML/STEMMUS_SCOPEv1.0.0/input, config file template https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/main/config_file_crib.txt\n", - "- Global data: /data/shared/EcoExtreML/STEMMUS_SCOPEv1.0.0/global_data, config file template https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/main/run_model_on_snellius/config_file_snellius_global.txt\n", + "#### On CRIB\n", + "- Site data:\n", + " - path to data: `/data/shared/EcoExtreML/STEMMUS_SCOPEv1.0.0/input`,\n", + " - config file template: https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/main/config_file_crib.txt\n", + "- Global data:\n", + " - path to data `/data/shared/EcoExtreML/STEMMUS_SCOPEv1.0.0/global_data`,\n", + " - config file template: https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/main/run_model_on_snellius/config_file_snellius_global.txt\n", "\n", - "#### On SNellius:\n", - "- Site data: /projects/0/ttse0619/, config file template https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/main/run_model_on_snellius/config_file_snellius.txt\n", - "- Global data: /projects/0/ttse0619/global_data, config file template https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/main/run_model_on_snellius/config_file_snellius_global.txt\n", + "#### On Snellius\n", + "- Site data:\n", + " - path to data: `/projects/0/ttse0619/`,\n", + " - config file template: https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/main/run_model_on_snellius/config_file_snellius.txt\n", + "- Global data:\n", + " - path to data: `/projects/0/ttse0619/global_data`,\n", + " - config file template: https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/main/run_model_on_snellius/config_file_snellius_global.txt\n", "\n", "Choose how do you want to run the model:\n", "\n", @@ -204,7 +212,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -213,6 +221,31 @@ "path_to_model_src = \"./STEMMUS_SCOPE\"" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If you run the model on your own machine, make sure `LD_LIBRARY_PATH` is set correctly. To do this, uncomment the cell below and run it:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# # Set LD_LIBRARY_PATH\n", + "matlab_path = !whereis MATLAB\n", + "matlab_path = matlab_path.s.split(\": \")[1]\n", + "os.environ['LD_LIBRARY_PATH'] = (\n", + " f\"{matlab_path}/MATLAB_Runtime/R2023a/runtime/glnxa64:\"\n", + " f\"{matlab_path}/MATLAB_Runtime/R2023a/bin/glnxa64:\"\n", + " f\"{matlab_path}/MATLAB_Runtime/R2023a/sys/os/glnxa64:\"\n", + " f\"{matlab_path}/MATLAB_Runtime/R2023a/extern/bin/glnxa64:\"\n", + " f\"{matlab_path}/MATLAB_Runtime/R2023a/sys/opengl/lib/glnxa64\")\n", + "print(os.environ['LD_LIBRARY_PATH'])" + ] + }, { "cell_type": "code", "execution_count": 5, diff --git a/docs/notebooks/run_model_with_different_options.ipynb b/docs/notebooks/run_model_with_different_options.ipynb index aaca5d7d..e80d1425 100644 --- a/docs/notebooks/run_model_with_different_options.ipynb +++ b/docs/notebooks/run_model_with_different_options.ipynb @@ -5,9 +5,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Running the STEMMUS_SCOPE model\n", + "# Running the STEMMUS_SCOPE model with different options\n", "## Which options are available?\n", - "This notebook shows steps to run the STEMMUS_SCOPE model, including preprocessing and postprocessing. STEMMUS_SCOPE files are located in a **private** repository https://github.com/EcoExtreML/STEMMUS_SCOPE. To clone the repository locally and access the files, make sure you have right access to the repository. Then specify the path to a config file e.g.`config_file_template.txt`, executable file `STEMMUS_SCOPE` or source code `STEMMUS_SCOPE/src` in the cells below. There are already config files for users on Snellius and CRIB, see `config_file_snellius.txt`, `config_file_crib.txt`. Choose how do you want to run the model:\n", + "This notebook shows steps to run the STEMMUS_SCOPE model, including preprocessing and postprocessing. STEMMUS_SCOPE files are located in a repository https://github.com/EcoExtreML/STEMMUS_SCOPE. Then specify the path to a config file e.g.`config_file_template.txt`, executable file `STEMMUS_SCOPE` or source code `STEMMUS_SCOPE/src` in the cells below. There are already config files for users on Snellius and CRIB, see `config_file_snellius.txt`, `config_file_crib.txt`. Choose how do you want to run the model:\n", "\n", "\n", "[**Executable file**](#1-using-executable-file)\n", @@ -398,7 +398,7 @@ ], "metadata": { "kernelspec": { - "display_name": "pyss_octave", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -412,7 +412,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:50:36) [MSC v.1929 64 bit (AMD64)]" + "version": "3.10.13" }, "vscode": { "interpreter": { diff --git a/mkdocs.yml b/mkdocs.yml index cfecb373..ac5df101 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -5,9 +5,9 @@ repo_name: PyStemmusScope nav: - Getting started: index.md - Installation: installation_instructions.md - - Notebook page: - - Run the model with different options: notebooks/run_model_with_different_options.ipynb - - Run the model with different dataset: notebooks/run_model_with_different_dataset.ipynb + - Run the model: + - Run the model with different options: notebooks/run_model_with_different_options.ipynb + - Run the model with different dataset: notebooks/run_model_with_different_dataset.ipynb - Contributing guide: CONTRIBUTING.md - API reference: reference.md