25
Using MeteoIO M. Bavay with contributions from T. Egger, C. Fierz, N. Wever, D. Zanella, ... WSL-Institut für Schnee- und Lawinenforschung SLF 1

Meteoio Introduction given by Mathias Bavey in Bozen

Embed Size (px)

DESCRIPTION

MeteoIO introduction given by Mathias Bavey in Bozen.

Citation preview

Page 1: Meteoio Introduction given by Mathias Bavey in Bozen

Using MeteoIO

M. Bavaywith contributions from T. Egger, C. Fierz, N. Wever, D. Zanella, ...

WSL-Institut für Schnee- und Lawinenforschung SLF 1

Page 2: Meteoio Introduction given by Mathias Bavey in Bozen

What is MeteoIO? What is it designed for?Why do we need it?

Page 3: Meteoio Introduction given by Mathias Bavey in Bozen

What are its design goals?

Act as an interface between physical modeling and data sources

Suitable for operational systems

Reusable processing components between models

Suitable for a wide range of models

Easy to install, use and expand

Page 4: Meteoio Introduction given by Mathias Bavey in Bozen

What is MeteoIO?MeteoIO is a toolbox:

It won't do anything for you; it enables you to do things

It is not limited to a few tasks; its building blocs can be combined at will

It strives to provide standard processing blocs to c++ for working with meteorological data

Page 5: Meteoio Introduction given by Mathias Bavey in Bozen

A model/data source interface

Page 6: Meteoio Introduction given by Mathias Bavey in Bozen

A model/data source interfaceThe model should not be changed when changing data source (MeteoIO insulates the model)

MeteoIO must provide all data conforming to a given abstraction, regardless of their initial characteristics

Formats conversions, time/coordinates/semantics conversions

Arbitrary sampling rate conversion

Do the best possible for each data source

Page 7: Meteoio Introduction given by Mathias Bavey in Bozen

Operational usageMust run unattended → autonomous, robust

Must handle the unexpected (if possible)

Must be reasonably fast

High variability: data quality, quantity

Perform all the data pre-processing that is needed by the model, automaticaly

Page 8: Meteoio Introduction given by Mathias Bavey in Bozen

Reusability/modularity

Page 9: Meteoio Introduction given by Mathias Bavey in Bozen

What can MeteoIO do?

Page 10: Meteoio Introduction given by Mathias Bavey in Bozen

Features: overview

Read meteo data from various sources and preprocess it

Read gridded data from various sources

Write meteo data to various destinations

Write gridded data to various destinations

Offer various “convenience” objects to handle meteo data

Page 11: Meteoio Introduction given by Mathias Bavey in Bozen

Reading meteo data

What happens when an application requests a data point from MeteoIO?

Page 12: Meteoio Introduction given by Mathias Bavey in Bozen

In th

e b

ack

gro

un

d...

Page 13: Meteoio Introduction given by Mathias Bavey in Bozen

The plugins: basicsThe specific handling of a format/protocol is contained in a plugin (ARC, IMIS, SMET)

Therefore, a plugin must:• Know where to find data, how to read it

• Convert units, perform reprojections (rotated coordinates)

• Convert all data to MeteoIO's objects: Coords → StationData → MeteoData

• Offer a specific set of functions

Page 14: Meteoio Introduction given by Mathias Bavey in Bozen

The plugins: interfaceAll plugins offer the same functions:

• Get all station metadata at a given date

• Get all meteo data between two dates

• Write a given meteo dataset

• Read 2D grid, by name or by parameter

• Write 2D grid, by name or by parameter

• Read dem, landuse, special points

But, each plugin is different:• Not all functions are relevant for all plugins

• The configuration depends on the plugin (database vs file)

In the [Input] and/or [Output] section(s)

Page 15: Meteoio Introduction given by Mathias Bavey in Bozen

Available plugins

Page 16: Meteoio Introduction given by Mathias Bavey in Bozen

The processing stack

Goes through the processing element, one after another (i.e., serial)

Two kind of processing elements:• Filters: keep or reject data (ex. min/max)

• Processing: modify the data (ex. undercatch)

processing elements defined by meteo parameter

Each processing elements has its own options

Common principle: “soft”

All in the [Filters] section

Page 17: Meteoio Introduction given by Mathias Bavey in Bozen

Available filtersRATE: rate of change filter

MIN_MAX: range check filter

MIN: minimum check filter

MAX: maximum check filter

STD_DEV: reject data outside mean +/- k*stddev

MAD: median absolute deviation

TUKEY: Tukey53H spike detection, based on median

UNHEATED_RAINGAUGE: detection of snow melting in a rain gauge

It is easy to implement new filters!

Page 18: Meteoio Introduction given by Mathias Bavey in Bozen

Available processing elements

EXP_SMOOTHING: exponential smoothing of data

WMA_SMOOTHING weighted moving average smoothing of data

MEDIAN_AVG: running median average over a given window

MEAN_AVG: running mean average over a given window

WIND_AVG: vector average over a given window

ADD: adds a given offset to the data

MULT: multiply the data by a given factor

UNDERCATCH_WMO: WMO rain gauge correction for undercatch, using various correction models

UNDERCATCH_HAMON: Hamon1973 rain gauge correction for undercatch

UNVENTILATED_T: unventilated temperature sensor correction

Page 19: Meteoio Introduction given by Mathias Bavey in Bozen

Temporal interpolations

Goal: digest arbitrary time intervals (including irregular) & provide the data at any timestamp

• Standard methods (fast) can not be used

• Needs a “search radius” for safety & logic

• Configured per meteo parameter

resampling != reaccumulate, Interpolation != extrapolation

configured in the [Interpolations1D] section

Page 20: Meteoio Introduction given by Mathias Bavey in Bozen

Temporal interpolations

Page 21: Meteoio Introduction given by Mathias Bavey in Bozen

Spatial interpolations

Distribute points measurements on a dem

Strongly dependent on the inputs (#stations)

Potentially very slow

Configured in [Interpolations2D]• Per meteo parameter

• A list of acceptable algorithms is provided, the “best” is evaluated & used for each timestamp

• Each algorithm has its own options & behavior (fallback)

Page 22: Meteoio Introduction given by Mathias Bavey in Bozen

Spatial interpolations[Interpolations2D]

TA::algorithms = IDW_LAPSE CST_LAPSE

TA::cst_lapse = -0.008

RH::algorithms = RH IDW_LAPSE CST_LAPSE CST

HNW::algorithms = HNW_SNOW IDW_LAPSE CST_LAPSE CST

HNW::hnw_snow = cst_lapse

HNW::cst_lapse = 0.0005 frac

VW::algorithms = IDW_LAPSE CST_LAPSE

P::algorithms = STD_PRESS

Page 23: Meteoio Introduction given by Mathias Bavey in Bozen

Spatial interpolationsThe keywords defining the algorithms are the following:

• STD_PRESS: standard atmospheric pressure as a function of the elevation of each cell

• CST: constant value in each cell

• CST_LAPSE: constant value reprojected to the elevation of the cell

• IDW: Inverse Distance Weighting averaging

• IDW_LAPSE: Inverse Distance Weighting averaging with reprojection to the elevation of the cell

• LIDW_LAPSE: IDW_LAPSE restricted to a local scale

• RH: the dew point temperatures are interpolated using IDW_LAPSE, then reconverted locally to relative humidity

• ILWR: the incoming long wave radiation is converted to emissivity and then interpolated

• WIND_CURV: the wind field (VW and DW) is interpolated using IDW_LAPSE and then altered depending on the local curvature and slope

• HNW_SNOW: precipitation interpolation according to (Magnusson, 2011)

• ODKRIG: ordinary kriging

• USER: user provided grids to be read from disk

Page 24: Meteoio Introduction given by Mathias Bavey in Bozen

Spatial interpolationsWhat can degrade your interpolations:

– Inappropriate interpolation method

– Stations' range too limited

– Badly representative station

Page 25: Meteoio Introduction given by Mathias Bavey in Bozen

Data Generators•Last resort option

• When everything else failed• Use parametrizations relying on other

parameters•Available generators:

• Cst• Sin (yearly/daily)• Unsworth ILWR• Potential ISWR