Swiss Federal Institute for Forest, Snow and Landscape Research WSL

Troubleshooting

Good practice

The GUI saves all bioclimate files, control files, simulation results and plots that you produce in the folders of your TMEnvironment. They are read in the next time this TMEnvironment is loaded. This is practical, but also means that the more and larger simulations with large bioclimates, result files and plots you have, the longer it will take to load them. Therefore, try to reduce the amount of information in a TMEnvironment.

  • Clean up your simulations from time to time. Delete those that you no longer need by clicking on the "x" in the black simulation fields and activating all the "Simulation results", "Simulation plots" and "Simulation statefiles" options.
  • Clean up your bioclimates in E, but carefully. First check in the simulations or in the corresponding crtl files in the folder C which bioclimates are still required and which are not.
  • If you are starting a completely new project, create a new TMEnvironment!

Frequent errors

Installation, starting, closing the GUI

  • If there are problems during installation, make sure that you are using the latest version of R (at least 4.3.2).
  • Update all packages to the latest versions available for this R version. The R package "TreeMig" relies on the following 22 packages that need to be installed:
    "raster" "sf" "shiny" "ggplot2" "gridExtra"  "methods" "rlang" "ncdf4" "data.table"  "crayon"     "dplyr"   "tibble" "tidyr"   "gganimate" "latticeExtra" "rasterVis"  "slider"  "gifski"  "terra"  "shinyFiles"  "callr"  "pals"
  • To exit the graphical user interface, click on the red stop sign above the RStudio console and close the inactive (greyed out) browser window or tab.
  • To restart the GUI, re-execute the lines default_files and runTreeMigShiny of the "installAndRunTreeMigWrapperAndGUI.R" script

Simulation

  • If for some reason you do not see a map in the GUI, go to map.geo.admin.ch in another tab of your browser, set the coordinate system to CH1903 / LV03 at the bottom left, navigate to your study area, note its coordinates at the bottom left and top right and enter them under Crop Bioclimate in Latitude/Longitude start/end.
  •  Very often problems arise due to unintentional overwriting of the bioclimate files. So be careful when naming and using the bioclimate files.

Plotting

  • If your plot job ends with the error message "Dimensions exceed 50 inches...", try again with "Limit Size off (red)" in the ggplot2 arguments.
  • If there are both NetCDF and .txt files in a R(esult) folder, the NetCDF files will be used for plotting, even if they are older than the .txt files. You should therefore either generate only NetCDF output during the simulation or delete or rename the old NetCDF files.