Multi-sim

General Description

This plug‐in was created with Dr. Alida Bundy, Fisheries and Oceans Canada to allow multiple simulations changing one or multiple forcing functions without having to upload files individually. This allows for selection of multiple files (.csv) to be read in collectively, as the plug‐in will run one simulation per file used as a forcing function. The file(s) can be used to alter one or more forcing functions within the model, using corresponding names to existing forcing functions. Input and output can be selected as monthly or annual time steps, and allowing one to choose which output files each simulation will generate.

Setting Up CSV Files Before your Simulations

This plug‐in was designed to alter a subset of forcing functions existing within the model to test the effects on the functional groups within the model. In order to correctly read in one or more forcing functions, there are a few criteria you must include in your csv file. It should be noted that the names of your csv files are not important to the program or plug‐in, only to the user.

  1. The name of the forcing function you are altering must match EXACTLY to the forcing function already existing within the model, so it will be applied correctly. Be sure your names are indicated as text, In order to be sure, you can add quotations to your names in excel so that a name such as Ice will look like “Ice”. The best way to check your names are indicated as text is to open them in notepad to be sure there are quotations around the names. Sometimes excel will read things as text, but not indicate this, so best to check in notepad.
  2. Your forcing function must be structured as either monthly or annual, with all csv files being read in at a time (as in step #2) being consistent.
  3. No labels are needed for time steps. Meaning if you are reading in 1 forcing function, only one column of data should exist in the csv, do not include a month or year column as names/numbers
  4. The values for the first year should average 1 (as with any forcing function)

Example: For a model with 2 existing forcing functions, “Temp” and “Ice”

 

Figure 1 – Forcing functions to be altered by Multi-sim

If we were going to change only the “Ice” forcing function, the corresponding csv file would look like Figure 2A (for the first 24 time steps). Note: these are monthly time steps with the first 12 months averaging 1. If we wanted to alter both “Temp” and “Ice”, the csv file would look like Figure 2B.

Figure 2 – Changing one (A) or both (B) forcing functions

How to Use:

Figure 3 – Finding Multi-sim in the EwE Navigator.

1. Open an Ecosim scenario within your existing model. Be sure to load your time‐series and double check all mediation functions, forcing functions, and fishing effort are already applied to the correct groups. Then select Ecosim > Tools > Multi‐sim (Figure 3).

2. Selecting Input Files (Figure 4): Click on the choose button at the end of the source file line to select the source files containing the forcing functions to be changes during the simulations. Once you have pointed to the correct folder you may choose to select all files within the folder by selecting the all button, or you can select individual files by checking the boxes located to the left of the file name. Once you have selected all of the files you want to run, be sure to indicate whether the forcing functions should be read in as monthly or annual values. (see section on setting up files).

 

Figure 4 – Selecting Multi-sim input files

3. Selecting Output Files: Select the folder where the results of each simulation will be stored by clicking the choose button at the end of the output pathway and point to the correct folder. If you would like each simulation to generate its own folder (rather than all output files ending up in one folder), check the create unique folder for every run box at the bottom of the page. Once the output path has been chosen, you may select which results you would like saved for each simulation. You may choose to select all options my clicking the all button in the lower right corner, or check the boxes next to individual files.

 

Figure 5 – Select Multi-sim output files

4. Interrupting simulations: Once steps 1‐3 are complete you may select the run button to start your simulations. Once simulations have started, there is the option to interrupt and cancel the application by using the stop button. This will halt the current simulation and prevent the plug‐in from completing further simulations. You will notice a little red circle at the bottom left of your screen once simulations have started indicating which simulation is running which corresponds to the source file name.

 

Figure 6 – Interrupting Multi-sim

 

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

User Guide for Ecopath with Ecosim (EwE) Copyright © 2024 by Ecopath International Initiative is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book