MeteoIODoc  MeteoIODoc-2.9.0
SMET

Format

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, OSWR, 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.

Units

All units are MKSA, 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).

Keywords

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";
  • 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_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: when an output file already exists, should the plugin try to append data (default: false); [Output] section
  • SMET_OVERWRITE: when an output file already exists, should the plugin overwrite it (default: true)? [Output] section
  • 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

Example:

[Input]
METEO = SMET
METEOPATH = ./input
STATION1 = uppper_station.smet
STATION2 = lower_station.smet
STATION3 = outlet_station.smet
[Output]
METEOPATH = ./output
METEOPARAM = ASCII GZIP

Below is an example of Points Of Interest input:

SMET 1.1 ASCII
[HEADER]
station_id = my_pts
epsg = 21781
nodata = -999
fields = easting northing altitude
[DATA]
832781 187588 2115
635954 80358 2428
Note
There is an R package for handling SMET files available at https://cran.r-project.org/web/packages/RSMET