After spatial setup and informatics (see Software Overview section) have been staged, the Tools – Prepare for Simulation menu option can be used to initiate import of data and calculation of variables for the layouts and data control sets of an EFMSim model.  The Prepare for Simulation interface includes a “tree” view of the project structure with a study area trunk, branches for each layout, subbranches for each data control set, and data sets and variables as leaves on the subbranches (Figure).  Check boxes allow selections of the different parts of the structure.  Selected items are “processed” when the user clicks OK or compute, which means that the selected data sets are imported and the associated variables computed and stored to the underlying model data based per the project structure such that they are prepared and ready for use when needed in simulations.

Figure.  Data and variables are processed and stored to the model database via Prepare for Simulation.


Item labels are sensitive to prep status.  For example, data sets are time stamped when processing completes successfully.  Black text is used for prepped data and variables.  Red italicized text is used for data and variables that are unprocessed (no time stamp) or that need to be reprocessed.  EFMSim has code that tracks changes to study area, layouts, data control sets, data sets, and variables.  If a change is made that affects already processed items (e.g., modifying a layout or extending a data set), then those items will be shown in red text and will retain the time stamp showing when they were last successfully processed.  Reprocessing will update the time stamp and change the text to black.

Changes and corresponding effects are hierarchical per the project structure.  A change to the study area, for example, will cause all already processed items to go red.  A change to a layout will affect its branch, and so on.   The Refresh button updates the Project Structure.  Clicking the Select New button will select all data sets and variables in need of processing.  The Prepare for Simulation interface does not need focus, which means that the user is welcome to continue working in EFMSim as items are processed.  Clicking OK initiates processing for selected items and closes the Prepare for Simulation Interface.  Clicking Compute initiates processing for selected items and leaves the Prepare for Simulation Interface open.  Details about processing are reported in the Data Controls Compute Output log. 

Processed values are stored in the Data_and_variables.h5 file.  Processing values are simply imported values stored per the date and time information specified by the user in the Data Import interface.  EFMSim assumes data in the Data_and_variables.h5 are instantaneous.  There is an option available via the Settings – Data Import Options – Preprocess Data that allows data of all time types to be converted to period average data (time for end of period) for user-selected time steps (Figure).  Preprocessed data are stored in separate HDF files for each selected time step (Data_and_variables_timestep.h5).  Data are preprocessed during import via the Prepare for Simulation interface for all selected time steps.

Figure.  Preprocessing is an optional feature that converts input data to period average values.


The Preprocess Data interface also has a check box option for Use preprocessed data in simulations and animations.  When selected, simulations will 1) use the Data_and_variables_timestep.h5 file if available for the simulation time step, 2) complain if the correct Data_and_variables_timestep.h5 file is available but does not contain all data and variables required for the simulation, and 3) use Data_and_variables.h5 (as instantaneous values) if the correct Data_and_variables_timestep.h5 file is not available.

This is a short chapter for a significant milestone and really cool moment in the EFMSim modeling process.  Prepare for Simulation populates the virtual environment for use in simulations.  All of the input layers, with their different spatial extents and shapes and temporalities, are allied and primed for application per the user’s vision.