Skip to content

*.tem

Purpose

A *.tem file is a temperature time-series file with the same record layout as a *.tmp. The .tem extension is used by the reference datasets shipped with SWAT+ (for example refdata/Ames_sub1/ames.tem) and by some external preprocessors. There is no separate reader for .tem. The temperature reader at src/cli_tmeas.f90 opens whatever filename is supplied; the extension is not inspected.

Source

The reader is reached only when the filename appears in tmp.cli. The tgage slot in weather-sta.cli is matched against the filename listed in tmp.cli via the tmp_n lookup array, so both files must agree on the string (including the .tem extension if used).

Format

Identical to a daily *.tmp file. List-directed reads, whitespace-separated.

  • Line 1: title (skipped).
  • Line 2: column header (skipped). Conventionally NBYR TSTEP LAT LONG ELEV.
  • Line 3: station header (nbyr, tstep, lat, long, elev).
  • Line 4 onward: one record per day with year, Julian day, daily maximum temperature, daily minimum temperature.

See *.tmp for the field tables.

Example

refdata/Ames_sub1/ames.tem (excerpt):

AME.Tmp
 NBYR    TSTEP      LAT     LONG     ELEV
   121        0    42.04   -93.89   316
1900    1   -99 -99
1900    2   -99 -99
...
1983    185 32.2    10.6
1983    186 26.7    11.1
  • *.tmp. Same content, alternate extension. The reader is shared.
  • tmp.cli. Lists each temperature filename (with whatever extension).
  • weather-sta.cli. The tgage column must match a filename entry in tmp.cli.

Important

Mismatch in the Ames reference dataset. In refdata/Ames_sub1, tmp.cli lists ames.tmp (an empty file) while weather-sta.cli lists ames.tem as the tgage for wgn_sta1. The lookup in cli_staread.f90 searches tmp_n for ames.tem, does not find it, and writes a "file not found (tgage)" warning to the error log at unit 9001. With no measured temperature attached to the station, the model substitutes the weather generator. To use the ames.tem data, edit tmp.cli so its filename entry is ames.tem (or rename ames.tem to ames.tmp and remove the empty placeholder).