MeteoIODoc 20240411.d3bdb3cb


The Station meteo data files is a station centered, ascii file format that has been designed with flexibility and ease of use in mind. Please refer to its official format specification for more information (including the list of standard parameters: TA, TSS, TSG, RH, VW, DW, ISWR, RSWR, ILWR, OLWR, PINT, PSUM, HS). For PINT, it is assumed that the intensity (in mm/h) is valid for the whole period between the actual time step and the previous one so a PSUM signal can be reconstructed by multiplying PINT by the previous timestep duration (see ProcAggregate).

You can have a look at the following Weissfluhjoch dataset as a (quite large) example SMET dataset.

This plugin can also provide Points Of Interest, given as a SMET file containing either latitude/longitude/altitude or easting/northing/altitude. For the latter, the header must contain the epsg code (see example below).

Non-standard parameters can also be given, such as extra snow temperatures. These parameters will then take the name that has been given in "fields", converted to uppercase. It is usually a good idea to number these parameters, such as TS1, TS2, TS3 for a serie of temperatures at various positions.

There is also a python library, pySMET available, to read SMET files.


All units are coherent derived SI units (section 2.3.4 in the SI-Brochure), the only exception being the precipitations that are in mm/h or mm/{time step}. It is however possible to use multipliers and offsets (but they must be specified in the file header). If no time zone is present, GMT is assumed (but it is nevertheless highly recommended to provide the time zone, even when set to zero).


This plugin uses the following keywords:

  • METEOPATH: meteo files directory where to read/write the meteofiles; [Input] and [Output] sections
  • STATION#: input filename (in METEOPATH). As many meteofiles as needed may be specified. If nothing is specified, the METEOPATH directory will be scanned for files ending in ".smet" and sorted in ascending order;
  • METEOPATH_RECURSIVE: if set to true, the scanning of METEOPATH is performed recursively (default: false); [Input] section;
  • SNOWPACK_SLOPES: if set to true and no slope information is found in the input files, the IMIS/Snowpack naming scheme will be used to derive the slope information (default: false, [Input] section).
  • METEOPARAM: output file format options (ASCII or BINARY that might be followed by GZIP, [Output] section). In the next version, the GZIP output will be incompatible with this version!!
  • SMET_VERSIONING: create multiple versions of a given dataset by appending additional information to the filename, as defined by the value (in the [Output] section, default is no such versioning):
    • NOW: append the current date formatted as numerical ISO;
    • DATA_START: append the absolute start date of the dataset formatted as numerical ISO;
    • DATA_END: append the absolute end date of the dataset formatted as numerical ISO;
    • YEARS: append the absolute start and end years of dataset (if they are the same, only one year is used);
    • NONE: do not append anything, no versioning is performed (default).
  • SMET_DEFAULT_PREC: default number of decimals for parameters that don't already define it (default: 3); [Output] section
  • SMET_DEFAULT_WIDTH: default number of characters for parameters that don't already define it (default: 8); [Output] section
  • SMET_PLOT_HEADERS: should the plotting headers (to help make more meaningful plots) be included in the outputs (default: true)? [Output] section
  • SMET_RANDOM_COLORS: for variables where no predefined colors are available, either specify grey or random colors (default: false); [Output] section
  • SMET_APPEND (deprecated): when an output file already exists, should the plugin try to append data (default: false); [Output] section
  • SMET_OVERWRITE (deprecated): when an output file already exists, should the plugin overwrite it (default: true)? [Output] section
  • SMET_WRITEMODE: when an output file already exists, should the plugin append data, overwrite it or append? [Output] section
    • APPEND: append data to the existing file;
    • OVERWRITE: overwrite the existing file;
  • ACDD_WRITE: add the Attribute Conventions Dataset Discovery (ACDD) metadata to the headers (then the individual keys are provided according to the ACDD class documentation) (default: false, [Output] section)
  • POIFILE: a path+file name to the a file containing grid coordinates of Points Of Interest (for special outputs, [Input] section)

In order to be able to use this plugin for some software that require less structured text files (ie more like classical CSV files, for example for databases imports), the following options exist, but please keep in mind that these make the produced SMET file non-conformant:

  • SMET_SEPARATOR: set a different output field separator (the header key "column_delimiter" will be set to the character that has been used as a delimiter so this plugin can re-read such files); [Output] section
  • SMET_COMMENTED_HEADERS: prefix all header lines with a '#' sign to comment them out (currently this plugin won't be able to re-read such files); [Output] section


METEOPATH = ./input
STATION1 = uppper_station.smet
STATION2 = lower_station.smet
STATION3 = outlet_station.smet
METEOPATH = ./output
Definition: libsmet.h:38

Below is an example of Points Of Interest input:

station_id = my_pts
epsg = 21781
nodata = -999
fields = easting northing altitude
832781 187588 2115
635954 80358 2428
const double nodata
This is the internal nodata value.
Definition: IOUtils.h:75
There is an R package for handling SMET files available at