SNOWPACK  SNOWPACK-3.6.0
CAAML

Format

This plugin reads the CAAML files as generated according CAAML V5.0's specification. In order to validate a CAAML file, download the xsd file and use either an online XML validator or an offline tool (such as Notepad++'s XML tool).

Keywords

This plugin uses the following keywords:

  • COORDSYS: input coordinate system (see Coords) specified in the [Input] section
  • SNOW: specify COSMOCAAML for [Input] section
  • SNOWPATH: string containing the path to the xml files to be read, specified in the [Input] section
  • SNOWFILE: specify the xml file to read the data from (optional)
  • SNOW_PREFIX: file name prefix appearing before the date (optional)
  • SNOW_EXT: file extension (default: ".xml", give "none" to get an empty string)
  • STATION#: ID of the station to read
  • IMIS_STATIONS: if set to true, all station IDs provided above will be stripped of their number (to match MeteoCH naming scheme)
  • USE_MODEL_LOC: if set to false, the true station location (lat, lon, altitude) is used. Otherwise, it uses the model location (default)
  • XML_ENCODING: force the input file encoding, overriding the file's own encoding declaration (optional, see XML encoding below)

If no SNOWFILE is provided, all "*.caaml" files in the SNOWPATH directory will be read, if they match the SNOW_PREFIX and SNOW_EXT. They must contain the date of the first data formatted as ISO8601 numerical UTC date in their file name. For example, a file containing simulated meteorological fields from 2014-03-03T12:00 until 2014-03-05T00:00 could be named such as "cosmo_201403031200.xml" If some numbers appear before the numerical date, they must be provided as part of SNOW_PREFIX so the plugin can properly extract the date (for MeteoSwiss, this must be set to "VNMH49").

Example:

[Input]
COORDSYS = CH1903
SNOW = CAAML
SNOWPATH = ./input/snowCAAMLdata
SNOWFILE = 5WJ_20120229.caaml

XML encoding

Each XML document should specify its encoding. However this information might sometimes be missing or even worse, be false. This makes the XML document non-compliant. Normally, CAAML reads the file encoding in the file itself. If this does not work (one of the two cases given above), it is possible to force the encoding of the input file by using the "XML_ENCODING" option. This option takes one of the following values ("LE" stands for "Little Endian" and "BE" for "Big Endian"):

  • for UTF/UCS: UTF-8, UTF-16-LE, UTF-16-BE, UCS-4-LE, UCS-4-BE, UCS-4-2143, UCS-4-3412, UCS-2, EBCDIC
  • for ISO-8859: ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9
  • for Japanses: ISO-2022-JP, SHIFT-JIS, EUC-JP
  • for ascii: ASCII