2.0.0b10
catchment modelling framework
Loading...
Searching...
No Matches
MeteoStation Class Reference

A meteorological station holding timeseries to create Weather records. More...

+ Collaboration diagram for MeteoStation:

Detailed Description

A meteorological station holding timeseries to create Weather records.

In order to calculate ETpot with cmf a big amount of meteorological data is needed, more data than usually available. The MeteoStation class can estimate missing data from a minimal set. As more data, as one provides, the better the calculation of ETpot becomes. The minimal data needed is Tmin and Tmax (daily) and precipitation. To calculate the global radiation (although measured global radiation could be inserted), the position of meteorological station in geographic coordinates has to be set.

A meteorological station is created by cmf::atmosphere::MeteoStationList::add_station . Usage from python:

import cmf
meteo=p.meteo_stations.add_station(name='<Station name>', position=(0,0,0),
latitude=51.1, longitude = 8.0, timezone=1,
daily=False)
The study area, holding all cells, outlets and streams.
Definition project.h:53

There are two modes for the meteorology: daily=true and daily=false. If daily=true, Radiation is given as a daily mean value. If daily=false, Radiation is given as an hourly mean value, which shows the dial ETpot variation but results in erronous results if the timestep is daily.

Public Types

typedef std::shared_ptr< MeteoStationptr
 shared pointer
 

Public Member Functions

Data access methods
cmf::atmosphere::Weather get_data (cmf::math::Time t, double height) const
 Returns the current Atmosphere state. Uses default values for missing timeseries.
 
void use_for_cell (cmf::upslope::Cell &c)
 Connects this meteostation as a meteo data provider with the cell.
 
void SetSunshineFraction (cmf::math::timeseries sunshine_duration)
 Calculates a timeseries of the sunshine fraction (to put into Sunshine) from a timeseries of absolute sunshine duration.
 

Public Attributes

Timeseries of meteorological data
cmf::math::timeseries T
 Timeseries of Temperature \( T\left[^\circ C\right] \) Optional, can be calculated from \( T=\frac{T_{max} + T_{min}} 2 \).
 
cmf::math::timeseries Tmax
 Timeseries of daily maximum Temperature \( T_{max} \left[^\circ C\right] \) Required, but it can be generated from T
 
cmf::math::timeseries Tmin
 Timeseries of daily minimum Temperature \( T_{min}\left[^\circ C\right] \) Required, but it can generate from T
 
cmf::math::timeseries Tground
 Timeseries of upper soil temperature \( T_{ground}\left[^\circ C\right] \) Optional, if missing \( T_{ground} = T \).
 
cmf::math::timeseries Windspeed
 Timeseries of windspeed at instrument height (default 2m) in \(m/s\).
 
cmf::math::timeseries rHmean
 Timeseries of relative mean Humidity \( rH_{mean} \left[\%\right] \) Optional, not used if rHmax or Tdew is available
 
cmf::math::timeseries rHmin
 Timeseries of daily minimum relative Humidity \( rH_{min} \left[\%\right] \) Optional, only used if rHmax is used
 
cmf::math::timeseries rHmax
 Timeseries of daily maximum relative Humidity \( rH_{max} \left[\%\right] \)Optional, not used if Tdew is available
 
cmf::math::timeseries Tdew
 Timeseries of dew point temperature \( T_{dew}\left[^\circ C\right]\) Optional, if neither Tdew, rHmax or rHmean is available then Tdew = Tmin
 
cmf::math::timeseries Sunshine
 Fractional sunshine \(\frac{n}{N}\).
 
cmf::math::timeseries Rs
 Global Radiation in \( \frac{MJ}{m^2 day} \) Optional, if not available cmf::atmosphere::global_radiation is used
 
cmf::math::timeseries T_lapse
 Temperature lapse, the slope of the temperature / height regression. Typical values are \( -0.0004 .. -0.001 \frac{^\circ C}{m} \), default is \( 0\frac{^\circ C}{m} \) (no temperature adjusting)
 

Location and behaviour properties

double Latitude
 Latitude in dec. deg.
 
double Longitude
 Longitude in dec. deg.
 
double Timezone
 Time zone, 1 Germany, 0 UK, -8 Pacific U.S.
 
double z
 position of the station in m
 
std::string Name
 Name of the Station.
 
bool daily
 If true, the global radiation is calculated for daily averages (no day-night cycle), if false the hourly average is calculated.
 
real InstrumentHeight
 The height of the meteorological instruments above the surface in m.
 
 MeteoStation (const cmf::atmosphere::MeteoStation &other)
 Copy c'tor.
 

Member Function Documentation

◆ SetSunshineFraction()

void SetSunshineFraction ( cmf::math::timeseries sunshine_duration)

Calculates a timeseries of the sunshine fraction (to put into Sunshine) from a timeseries of absolute sunshine duration.

see http://www.fao.org/docrep/X0490E/x0490e07.htm#radiation

\begin{eqnarray*} \phi &=& \frac{(\mbox{geogr. Latitude})^\circ \pi}{180^\circ} \mbox{ Latitude in }rad \\ \delta &=& 0.409 \sin\left(\frac{2\pi}{365}DOY - 1.39\right) \mbox{ Declination, DOY is day of year}\\ \omega_s &=& \arccos(-\tan\phi\tan\delta) \mbox{ Sunset angle in }rad \\ N &=& \frac{24}{\pi}\omega_s \mbox{ potential duration of sunshine in }h \\ \frac n N &=& n\mbox{ absolute sunshine duration in }h \end{eqnarray*}

Member Data Documentation

◆ InstrumentHeight

real InstrumentHeight

The height of the meteorological instruments above the surface in m.

Defaults to 2m.

This can effect temperature and wind speed.

◆ Sunshine

Fractional sunshine \(\frac{n}{N}\).

Sunshine duration per potential sunshine durationOptional, if not present 0.5 If you have the total duration of sunshine, use cmf::atmosphere::MeteoStation::SetSunshineFraction. If you have cloud coverage instead of total sunshine duration you may assume that the fractional sunshine duration equals 1-cloudfraction

◆ Tmax

Timeseries of daily maximum Temperature \( T_{max} \left[^\circ C\right] \) Required, but it can be generated from T

If you have a high resolution timeseries for Temperature, Tmax can be generated as follows:

meteo.Tmax = meteo.T.reduce_max(meteo.T.begin, cmf.day)

◆ Tmin

Timeseries of daily minimum Temperature \( T_{min}\left[^\circ C\right] \) Required, but it can generate from T

If you have a high resolution timeseries for Temperature, Tmin can be generated as follows:

meteo.Tmin = meteo.T.reduce_min(meteo.T.begin, cmf.day)

◆ Windspeed

Timeseries of windspeed at instrument height (default 2m) in \(m/s\).

Optional, if not available the wind speed defaults to 2 m/s