Format for weather data uploads at: uspest.org/dd/model_app

Temperature data may be uploaded to our degree-day calculator app in either of two formats, text and CSV (Comma-separated values). The formats have the same data, with rows and columns in the same order and having the same meaning. They differ only in how each line is formatted.

Note that not all weather data is suitable. Temperature measurements are quite sensitive to how the thermometer is installed. To produce good results with our models, temperatures should be measured in the same way as the measurements used to calibrate the models. Thermometers should be about 5 feet (1.5m) above the ground, in a box or shelter (painted white) which blocks sunlight and has open ventilation, and away from obstacles and paved surfaces. References: 1, 2

Contents

Data files consist of optional header lines, followed by data lines. Any line(s) at the start of the file that are not valid data lines are assumed to be headers and are ignored. At the first line that can be parsed to yield valid data, header processing stops; all subsequent lines are expected to be data lines. Header lines can be in any format. This allows you to keep information such as location and year in the same file as the data.

Each data line must start with four values: month, day, maximum temperature, and minimum temperature, in that order. Additional fields on each line are allowed, but ignored.

Month
Must be written as a number, with the convention that January=1.
Day
The day of the month.
Maximum temperature
May be in either Celsius or Fahrenheit.
Minimum temperature
May be in either Celsius or Fahrenheit.

Minimum and Maximum temperature must use the same temperature scale, which is specified in the upload interface.

The models require maximum and minimum temperatures for every day for which they are run. So, there must be one data line for each date, and they must be in order. If you do not have a record for some days, you will need to choose substitute values.

The current version of this tool requires that all of the uploaded data be in the same calendar year.

Data lines are only valid if all of the following are true:

Text format

In the text format, the fields are separated by spaces. No quotes are used; only '-', '.', and 0-9 should appear in the first four fields. Anything after that is allowed, but ignored.

Example lines:

Example file (CRVO21.txt)

If you have uploaded data to older versions of the uspest.org degree-day calculator, this is essentially the same format. The same data files should still work, except that older calculator versions tolerated missing data and the current calculator does not.

CSV format

CSV (Comma-Separated Values) format is commonly used in spreadsheets. If you create a spreadsheet with the appropriate values in the first four columns, and save or export it as "CSV" or "Comma-separated values", it should be usable.

In CSV format, the fields are separated by commas. The first four fields should contain only numbers, which may be quoted or unquoted. Anything after that must still follow CSV conventions (non-numbers must be quoted) but will be ignored.

Example lines:

Example file (CRVO21.csv)

When you upload a file, your browser sends some some information, called the "mime type", about what kind of file it is. Our server will treat your file as CSV only if the mime type indicates that it is a CSV file. Some browsers use the filename extension to determine what mime type to send, so you may need to use a filename that ends with ".csv" or ".CSV".


Last updated Nov. 25, 2022 Original by Len Coop, 2004; substantially rewritten by D. Upper 2022.