{"id":1220,"date":"2023-12-09T03:43:34","date_gmt":"2023-12-09T08:43:34","guid":{"rendered":"https:\/\/pressbooks.bccampus.ca\/eweguide\/?post_type=chapter&#038;p=1220"},"modified":"2024-05-14T17:05:35","modified_gmt":"2024-05-14T21:05:35","slug":"multi-sim","status":"publish","type":"chapter","link":"https:\/\/pressbooks.bccampus.ca\/eweguide\/chapter\/multi-sim\/","title":{"raw":"Multi-sim","rendered":"Multi-sim"},"content":{"raw":"<h2>General Description<\/h2>\r\nThis plug\u2010in 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\u2010in 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.\r\n<h2>Setting Up CSV Files Before your Simulations<\/h2>\r\nThis plug\u2010in 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\u2010in, only to the user.\r\n<ol>\r\n \t<li>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 \u201cIce\u201d. 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.<\/li>\r\n \t<li>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.<\/li>\r\n \t<li>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<\/li>\r\n \t<li>The values for the first year should average 1 (as with any forcing function)<\/li>\r\n<\/ol>\r\nExample: For a model with 2 existing forcing functions, \u201cTemp\u201d and \u201cIce\u201d\r\n\r\n&nbsp;\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"849\"]<img class=\"\" src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-09.48.04.png\" alt=\"\" width=\"849\" height=\"577\" \/> <b>Figure 1<\/b> - Forcing functions to be altered by Multi-sim[\/caption]\r\n\r\nIf we were going to change only the \u201cIce\u201d 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 \u201cTemp\u201d and \u201cIce\u201d, the csv file would look like Figure 2B.\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"410\"]<img src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-09.54.03.png\" alt=\"\" width=\"410\" height=\"485\" \/> <b>Figure 2<\/b> - Changing one (A) or both (B) forcing functions[\/caption]\r\n\r\nHow to Use:\r\n<div>\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"426\"]<img class=\"\" src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-09.57.00.png\" alt=\"\" width=\"426\" height=\"848\" \/> <b>Figure 3<\/b> - Finding Multi-sim in the EwE Navigator.[\/caption]\r\n\r\n<\/div>\r\n1. Open an Ecosim scenario within your existing model. Be sure to load your time\u2010series and double check all mediation functions, forcing functions, and fishing effort are already applied to the correct groups. Then select Ecosim &gt; Tools &gt; Multi\u2010sim (Figure 3).\r\n\r\n2. 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).\r\n\r\n&nbsp;\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"867\"]<img class=\"\" src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-10.00.48.png\" alt=\"\" width=\"867\" height=\"572\" \/> <b>Figure 4<\/b> - Selecting Multi-sim input files[\/caption]\r\n\r\n3. 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\u00a0box 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.\r\n\r\n&nbsp;\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"711\"]<img class=\"\" src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-10.04.15.png\" alt=\"\" width=\"711\" height=\"475\" \/> <b>Figure 5<\/b> - Select Multi-sim output files[\/caption]\r\n\r\n4. Interrupting simulations: Once steps 1\u20103 are complete you may select the run\u00a0button 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\u2010in 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.\r\n\r\n&nbsp;\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"727\"]<img class=\"\" src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-10.05.52.png\" alt=\"\" width=\"727\" height=\"423\" \/> <b>Figure 6<\/b> - Interrupting Multi-sim[\/caption]\r\n\r\n&nbsp;","rendered":"<h2>General Description<\/h2>\n<p>This plug\u2010in 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\u2010in 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.<\/p>\n<h2>Setting Up CSV Files Before your Simulations<\/h2>\n<p>This plug\u2010in 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\u2010in, only to the user.<\/p>\n<ol>\n<li>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 \u201cIce\u201d. 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.<\/li>\n<li>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.<\/li>\n<li>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<\/li>\n<li>The values for the first year should average 1 (as with any forcing function)<\/li>\n<\/ol>\n<p>Example: For a model with 2 existing forcing functions, \u201cTemp\u201d and \u201cIce\u201d<\/p>\n<p>&nbsp;<\/p>\n<figure style=\"width: 849px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-09.48.04.png\" alt=\"\" width=\"849\" height=\"577\" \/><figcaption class=\"wp-caption-text\"><b>Figure 1<\/b> &#8211; Forcing functions to be altered by Multi-sim<\/figcaption><\/figure>\n<p>If we were going to change only the \u201cIce\u201d 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 \u201cTemp\u201d and \u201cIce\u201d, the csv file would look like Figure 2B.<\/p>\n<figure style=\"width: 410px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-09.54.03.png\" alt=\"\" width=\"410\" height=\"485\" \/><figcaption class=\"wp-caption-text\"><b>Figure 2<\/b> &#8211; Changing one (A) or both (B) forcing functions<\/figcaption><\/figure>\n<p>How to Use:<\/p>\n<div>\n<figure style=\"width: 426px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-09.57.00.png\" alt=\"\" width=\"426\" height=\"848\" \/><figcaption class=\"wp-caption-text\"><b>Figure 3<\/b> &#8211; Finding Multi-sim in the EwE Navigator.<\/figcaption><\/figure>\n<\/div>\n<p>1. Open an Ecosim scenario within your existing model. Be sure to load your time\u2010series and double check all mediation functions, forcing functions, and fishing effort are already applied to the correct groups. Then select Ecosim &gt; Tools &gt; Multi\u2010sim (Figure 3).<\/p>\n<p>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).<\/p>\n<p>&nbsp;<\/p>\n<figure style=\"width: 867px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-10.00.48.png\" alt=\"\" width=\"867\" height=\"572\" \/><figcaption class=\"wp-caption-text\"><b>Figure 4<\/b> &#8211; Selecting Multi-sim input files<\/figcaption><\/figure>\n<p>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\u00a0box 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.<\/p>\n<p>&nbsp;<\/p>\n<figure style=\"width: 711px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-10.04.15.png\" alt=\"\" width=\"711\" height=\"475\" \/><figcaption class=\"wp-caption-text\"><b>Figure 5<\/b> &#8211; Select Multi-sim output files<\/figcaption><\/figure>\n<p>4. Interrupting simulations: Once steps 1\u20103 are complete you may select the run\u00a0button 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\u2010in 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.<\/p>\n<p>&nbsp;<\/p>\n<figure style=\"width: 727px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-content\/uploads\/sites\/2056\/2023\/12\/Screenshot-2023-12-09-at-10.05.52.png\" alt=\"\" width=\"727\" height=\"423\" \/><figcaption class=\"wp-caption-text\"><b>Figure 6<\/b> &#8211; Interrupting Multi-sim<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n","protected":false},"author":1909,"menu_order":10,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1220","chapter","type-chapter","status-publish","hentry"],"part":441,"_links":{"self":[{"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/pressbooks\/v2\/chapters\/1220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/wp\/v2\/users\/1909"}],"version-history":[{"count":7,"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/pressbooks\/v2\/chapters\/1220\/revisions"}],"predecessor-version":[{"id":1534,"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/pressbooks\/v2\/chapters\/1220\/revisions\/1534"}],"part":[{"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/pressbooks\/v2\/parts\/441"}],"metadata":[{"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/pressbooks\/v2\/chapters\/1220\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/wp\/v2\/media?parent=1220"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/pressbooks\/v2\/chapter-type?post=1220"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/wp\/v2\/contributor?post=1220"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/eweguide\/wp-json\/wp\/v2\/license?post=1220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}