Make Temperatures and Precipitation (mkttp)



The mkttp program is used to extract daily minimum and maximum temperature and precipitation data from a National Climatic Data Center (NCDC) TD3200 Cooperative Summary of the Day (CSOD) data set, fill missing data and save the results for Akron, McCook and Red Cloud.

The program takes no arguments. It expects a file named TD3200 containing the TD3200 data to exist in the current directory. It produces files named 050109.txt, 255310.txt and 257070.txt containing the data at Akron, McCook and Red Cloud, respectively, also in the current directory.

Principles of Operation

The TD3200 file may contain many more stations and parameters than those of interest. The program reads only those stations of interest and the daily minimum and maximum temperature and precipitation from this file. The mkttp extracts the data for three stations: Where there is missing data for these stations, the program fills in the data. For the daily minimum and maximum temperature, gaps of up to fifteen days are filled by linear interpolation. Gaps in the precipitation data are usually accumulated into the next measurement. Therefore gaps of up to two days in the precipitation data are simply set equal to zero.

When larger gaps in the data exist, the gaps are filled by substitution of data from a nearby station. The following table shows the substitutions for each of the above stations:

StationFirst AlternateSecond Alternate
Akron 4E (050109)Yuma (059295)Sterling (057950)
McCook (255310)Culbertson (252065)Cambridge(251415)
RedCloud (257070)Franklin #2 (253037)N/A

The program then checks that the minimum temperature is less than the maximum temperature. If the minimum temperature is greater than the maximum, both minimum and maximum temperature is set to the average of the reported values.

Finally, the program saves the results to output files, one day per line. Each line contains the date, minimum and maximum temperature in degrees Fahrenheit and the precipitation in inches to an output file. The output files for Akron, McCook and Red Cloud, are named 050109.txt, 255310.txt and 257070.txt, respectively.

Note that the files TD3200, 050109.txt, 255310.txt and 257070.txt may contain multiple years worth of data. Currently, these files contain data for 2000 to present day.


Home | Index | Previous | Next

Model Units
Directory Structure
Programs
Static Files
Precipitation Data Entry
Colorado Data Entry
ET Data Entry
Stream Data Entry
Kansas Data Entry
Nebraska Data Entry
Running the Model