Note: This is documentation for version 4.11 of Source. For a different version of Source, select the relevant space by using the Spaces menu in the toolbar above
Specifying data inputs
This section describes how to load time series data into Source and how to manually enter data in to tables. Additional sub-pages include:
Scenario Input Sets allow you to easily keep model structure, while switching between groups of input data and parameters.
There are two types of time series data inputs:
File – a text-based time series data file in a supported file format. Refer to Loading a file data source.
Scenario – the results of a run from a different scenario can be used as an input for the current scenario. Refer to Loading a scenario data source.
When time series data is loaded in to Source, it is referred to as a data source and is available throughout Source. To either load new data sources, or access previously loaded data sources, you can use:
the Data Source option in a component's feature editor (Figure 1)
the Feature Table
the Function Editor
the output of the Climate data import tool
Note: Data sources are scenario-specific. If you want to use the same data source in two scenarios, you must load them individually for each scenario.
Figure 1. Loading a data source from within a component's feature editor
Source allows you to load and manage time series data at a central location using the Data Sources Explorer (Figure 2). Note that all data sources for the active scenario appear in the Explorer regardless of whether they were loaded using the Explorer, or one of the other methods listed above (eg. by using a component's feature editor, Figure 1).
Figure 2 shows features of the Data Sources Explorer containing all data sources available in the scenario, both from time series data files and another scenario. Additionally, the nodes that some of the data sources are associated with are shown.
Figure 2. Data Sources Explorer
The contextual menu options allow you to:
Add Source to add a new file or scenario data source;
Add Folder to create a new folder;
Delete the selected file/folder;
Edit the selected data source. This opens the Load Data Source dialog (shown in Figures 3 and 4) where you can change various features of the data source;
Export data to a .csv file;
Rename the input data file/folder; and
View Data in the charting tool;
Filter Data in the data source manager tree. The filter box at the top of the data source manager tree allows filtering of data sources to those with names that match, or have children with names that match the entered text. Filtering also works in a component's feature editor.
Figure 3. Data Sources toolbar
The Data Sources toolbar (Figure 3) has the following functions:
New Data Source creates a new data source, using either the output of a scenario (Scenario Data Source...) or a time-series file (File Data Source...);
New Folder creates a new folder, allowing organisation of data sources;
Expand All expands the file hierarchy;
Collapse All collapses the file hierarchy;
Data Sources Overview opens the Data Sources Overview window, displaying metadata for all file and scenario data sources in the active scenario (Figure 3). This is particularly useful for checking the start and end dates of your data. For example, in Figure 3, WheatDemand_csv has an end date a decade before all other data sources;
Reload all time series with 'Reload on Run' reloads all time series when Reload on Run is also selected from within the Load Data Source dialog (Figures 4 and 5); and
Sets if a failed 'Reload on Run will stop the current run works in conjunction with Reload on Run to determine if source data will cause a scenario run failure. It is shown toggled on in Figures 2 and 3.
Figure 3. Data Sources Overview
To load a time series data file, either:
Click the New Data Source button on the Data Sources toolbar and choose File Data Source... from the drop down menu; or
Right-click on a Folder and choose Add Source » File from the contextual menu.
The Load File Data Source dialog opens (Figure 5). Then, follow these steps:
Click the Load data file button and navigate to and select your time series data file.
The path to you data file is displayed. If you enable the Relative Path check box, the path displayed is the location of the time-series file relative to the project. Note that the project must have been saved prior to this.
Each column of data in the time series data file becomes a row in the Data table. All time series data in the file is imported by default. You can select what columns to import by toggling the appropriate check box in the Importcolumn.
Choose the scenario input set(s) associated with this data source by clicking on the arrow for the Default Input Set tab and toggling the appropriate check boxes. Refer to Assigning data sources to scenario input sets for more detail.
Click on Reload on Run to toggle whether Source reloads the data into the internal store when the Scenario is next run (for more information, see below).
Click on a Default Units cell and choose the appropriate units from the drop down menu. To filter the list of units, select the Default Units input box a begin typing the name of the unit that you require. Right-click on a Default Units cell to bring up a contextual menu that allows you to Apply Unit to all data.
Select anAggregation Method can be set to allow you to use data at a smaller timestep to the time step the model will run at. E.g. you can load daily data and then run the model at a monthly time step if you have selected an Aggregation Method.
Table 1. Aggregation Methods
Name | Description |
|---|---|
First Value | Takes the first value. e.g. Going from Daily to monthly, the first value for each month will be used. |
Max | Uses the Maximum value from the data |
Mean | Uses the Mean of the data |
Median | Uses the Median of the data |
Min | Uses the Minimum value from the data |
Not Set | Using this option won't allow you to run at a larger time step when the Data Source is being used by the model |
Sum | Uses the sum of the data. e.g. Going from Daily to monthly, the value used for the month will be the total of all the days added together. |