# 31 How to Insert new Input Data

To upload model input data or data used for model calibration/validation…

• Create a DBFILES entry for the path to the file
• From the menu click RUNS then FILES
• Click “New File”
• Select the machine your file is located at
• Fill in the File Path where your file is located (aka folder or directory) NOT including the name of the file itself
• Fill in the File Name with the name of the file itself. Note that some types of input records will refer to be ALL the files in a directory and thus File Name can be blank
• Click Update
• Create an INPUT entry for your data
• From the menu click RUNS then INPUTS
• Click “New Input”
• Select the SITE that this data is associated with the input data set
• Other required fields are a unique name for the input, the start and end dates of the data set, and the format of the data. If the data is not in a currently known format you will need to create a NEW FORMAT and possibly a new input converter. Instructions on how to do add a converter can be found here Input conversion. Instructions on how to add a format record can be found below.
• Parent ID is an optional variable to indicated that one dataset was derived from another.
• Click “Create”
• Associate the DBFILE with the INPUT
• In the RUNS -> INPUTS table, search and find the input record you just created
• Click on the EDIT icon
• Select “View related Files”
• In the Search window, search for the DBFILE you just created
• Once you have found the DBFILE, click on the “+” icon to add the file
• Click on “Update” at the bottom when you are done.

## 31.1 Create a Format Record

Creating a Format Record allows PEcAn to levereage Meta-data about your data in order to properly handle it. It allows you to define what type of file it is by defining it’s mimetype (i.e. text, netcdf,rds, etc.), define what information is hel in the header of your file, and how many lines need to be skipped within the file to get to ge to the header. To create a format record

* Navigate to the Formats table in BETY under the RUNS tab.
* Click "New Format"
* Fill in the appropriate information to define your files format
* Click "Create"

PEcAn has a single xml configuration file. This fill will dictate what models to run, where, with what input files and for how long. Each model has its own configuration file as well.

### 31.1.1PEcAn Configuration Files

This file is often called pecan.xml. The system will try to find this file in the following locations:
* Passed in when calling R with –settings
* Passed in to read.settings() function * PECAN_SETTINGS environment variable * File called pecan.xml in the current working folder
Once any of these are loaded it will try to locate a pecan.xml in the outdir specified in the loaded file.