MeteoIODoc 20240411.d3bdb3cb


This is for reading meteo data in the SNOWPACK meteo format. It is mostly a meteo data format but a metadata file can be provided alongside. These two formats are described below. Please note that when writing to a file, the header line will only be created if the file does not already exist. If the file already exists on the disk, new data will be appended without attempting to write a header line.

Meteo data file format

The SNOWPACK meteo format is defined as such:

  • a one line header that starts with "MTO" as marker, followed by a short name suitable to be used as station_id (between <>) and the number of data lines.
  • multiple lines of data, starting with "M"
  • a one line footer that consists of the "END" string followed by a new line character.

A short example could therefore be:

MTO <Example_station> 2
M 01.08.1958 05:00 21396.20834 9.6 0.674 0.3 356.1 0.0 0.0 276.6 1 -0.1 0 0 1 1 1 1 1 0.6
M 01.08.1958 06:00 21396.25000 9.6 0.675 0.8 343.0 27.1 5.3 288.7 1 -0.1 0 0 1 1 1 1 1 1.6

The data section is made of independent lines that all start with the "M" character, followed by the date as DD.MM.YYYY and the time as HH:mm (24 hours time) and then the Julian day relative to 01.01.1900 00:00 (please note that the Julian day as given by Excel is off by 2 days!). All other fields in each lines are meteo parameters, in order given in the table below.

Air temperatureK or °Cyes
Relative air humidity[0-1] or %yes
Wind velocitym s-1yesat snow station
Wind directiondegreesnoAt either snow or wind station
Incoming SW radiationW m-2no
Reflected SW radiationW m-2no
Incoming LW radiation or CloudinessW m-2 or [0-1]no
Snow surface temperatureK or °Cno
Bottom temperatureK or °Cno
Precipitations per meteo stepkg m-2 (mm H2O)no
Snow depthmno
Measured temperatures in snow/soilK or °Cno
Wind velocitym s-1noat wind station

The optional parameters are futher specified through some plugin options (see below, Keywords).

Metadata file format

The (optional) metadata is provided in a separate file that can contain multiple stations, one per line. Each line has the following structure:

  • ALI2 Allieres:Chenau 1767 6.993 46.489 1.22

where the first field is the short name, followed by the fullname and the location, then the elevation, the longitude, the latitude and a wind coefficient (unused by MeteoIO). The short name is used for identifying the station (stationID) and matching it with the data file (name given in io.ini). If no such metadata file is provided, the metadata will be left nodata. This only makes sense if the metadata would be later filled by another way (like a merge).


  • temperatures in degrees Celsius (input and output) or in kelvins (input only)
  • relative humidity in % (input and output) or in [0;1] (input only)
  • wind speed in m/s
  • precipitations in mm w.e. (kg/m²) per meteo time step
  • radiation in W/m²


This plugin uses the following keywords:

  • COORDSYS: coordinate system (see Coords); [Input] and [Output] section
  • COORDPARAM: extra coordinates parameters (see Coords); [Input] and [Output] section
  • METEOPATH: path to the meteo files directory; [Input] and [Output] sections
  • STATION#: input meteo data file, e.g. STATION1, STATION2; [Input] section
  • METAFILE: filename of the meta data file (in METEOPATH); [Input] section (optional but recommended)
  • optional:
    • ISWR_INP or RSWR_INP: if one of these data is missing, set corresponding switch to false. The setting will be valid for all stations.
    • additional data must follow order given below but may be missing:
      • NUMBER_MEAS_TEMPERATURES: integer, the number of measured snow temperatures provided; [Input] section
      • NUMBER_OF_SOLUTES: integer, the number of solutes for which input data are provided; [Input] section
      • VW_DRIFT: bool, a wind velocity to use for blowing and drifting snow is provided; [Input] section
      • RHO_HN: bool, measured new snow density is provided; [Input] section
METAFILE = IMIS_Extracted_Info.txt ;metadata for all stations


When writing in Snowpack format, potential errors in the data set are written out. The error count is split between the different types of errors:

  • basic input data: each mandatory parameter that is missing at a timestep increments this counter;
  • Dirichlet boundary condition data: each TSS or TSG parameter that is missing at a timestep increments this counter;
  • optional data: each snow temperature, solutes, snow density, wind drift optional parameter that is missing (if it was previously written out) increments this counter; Overall, this means that the count of basic errors should be zero while Dirichlet errors might be tolerable as well as optional data errors.