The simplest way to bring data into a model is to use a function to read the data directly from a Microsoft Excel or Lotus 123 spreadsheet or similar formatted text file. This technique also allows you to access any data source, such as a database, that can be accessed by the spreadsheet.
Select the Equations tool, click on the variable atmospheric CFC 11 releases.
Ø | Click on the variable Type drop-down box (on the left side of the Equation Editor) and select the type Data. Click on the variable Type lower drop-down box (that currently says Normal) and select Equation. |
Ø | Click the Functions tab and in the Function Class drop down box, select Data Only. Scroll down the list of Data functions and select GET XLS DATA |
•If you don't have Excel, you can use GET DIRECT DATA in its place; it also works on delimited text files
•Legacy spreadsheet users can select GET 123 DATA for Lotus 123.
The function is entered with four arguments:
'filename'
'tabname'
'time_row_or_col'
'first_data_cell'
IMPORTANT NOTE: you must enter these arguments with the single quotes surrounding them. It is also possible to use String variables to enter these, but entering the literals directly is often easier.
CFC emissions are included as time series data of both historical and forecast values in the directory UserGuide\chap16 in three files:
• | cfc11.xlsx (Microsoft Excel 2007+) |
•cfc11.xls (Microsoft Excel 97-2003)
• | cfc11.wk4 (Lotus 123 spreadsheet) |
Ø | Type in the filename 'cfc11.xlsx' or 'cfc11.xls' (don't forget the single quotes!) in the first argument if using Microsoft Excel, or 'cfc11.wk4' if using Lotus 123. |
Ø | Double click the second argument, type in the tab name 'cfc11'. |
Ø | Double click the third argument, type in the row name '2' (the row for time) |
Ø | Double click the fourth argument, type in the cell name 'C4' (the starting cell for data) |
Ø | Choose units of Mkg/Year and click OK to close the Equation Editor. |