MeteoIODoc 20240227.fb5b3765
mio::ProcTransformWindVector Class Reference

Detailed Description

This filter reprojects wind direction, and/or wind speed components, between PROJ supported coordinate systems.

The filter reprojects the wind direction and/or the U and V wind speed components defined by a PROJ supported coordinate system. For example, when the source coordinate system is WGS84, U and V components indicate flow along latitudes and longitudes, respectively. After using this filter to reproject to for example EPSG:3031 (Antarctic Polar Stereographic), U and V components will be directed along easting and northing, respectively.

The following arguments are supported:

  • COORDPARAM_SRC: provides the source coordinate system for the transformation. Provide EPSG code or a filename with a projection string. Leave empty, or use "4326" to specify WGS84.
  • COORDPARAM: provides the target coordinate system for the transformation. Provide EPSG code or a filename with a projection string. Leave empty, or use "4326" to specify WGS84.
Note
  • If both DW and wind speed components are present and defined, all three variables will be recalculated, even when the filter is only set to act on wind direction or wind speed components. This ensures consistency.
  • When applying the filter on wind speed components, the filter needs to be specified for only one component (the other one is automatically recalculated, to maintain consistency).
  • Wind speed components should be called U, VW_U or WIND_U for east/west and V, VW_V or WIND_V for north/south, respectively.
  • At the North and South Pole, the transform is undefined. In the limit towards the pole (|latitude| > 89.999), the transform becomes inaccurate.
Author
Nander Wever
Date
2020-06-10

Example using wind direction, with source coordinate system described in the file racmo2.prj:

DW::filter1 = TRANSFORMWINDVECTOR
DW::arg1::COORDPARAM_SRC = racmo2.prj ; file contains: "-m 57.295779506 +proj=ob_tran +o_proj=latlon +o_lat_p=-161.0 +lon_0=193.0"
DW::arg1::COORDPARAM = 3031 ; Antarctic Polar Stereographic

Example using wind speed components:

U::filter1 = TRANSFORMWINDVECTOR
U::arg1::COORDPARAM_SRC = 4326 ; WGS84
U::arg1::COORDPARAM = 21781 ; CH1903 / LV03 -- Swiss CH1903 / LV03
@ WGS84
Definition: libsmet.h:39

#include <ProcTransformWindVector.h>

Public Member Functions

 ProcTransformWindVector (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name, const Config &cfg)
 
 ~ProcTransformWindVector ()
 
 ProcTransformWindVector (const ProcTransformWindVector &c)
 
ProcTransformWindVectoroperator= (const ProcTransformWindVector &c)
 
virtual void process (const unsigned int &param, const std::vector< MeteoData > &ivec, std::vector< MeteoData > &ovec)
 
- Public Member Functions inherited from mio::ProcessingBlock
virtual ~ProcessingBlock ()
 
virtual void process (const unsigned int &param, const std::vector< MeteoData > &ivec, std::vector< MeteoData > &ovec)=0
 
virtual void process (Date &dateStart, Date &dateEnd)
 
std::string getName () const
 
const ProcessingPropertiesgetProperties () const
 
const std::string toString () const
 
bool skipStation (const std::string &station_id) const
 Should the provided station be skipped in the processing? More...
 
bool noStationsRestrictions () const
 
const std::vector< DateRangegetTimeRestrictions () const
 

Additional Inherited Members

- Static Public Member Functions inherited from mio::ProcessingBlock
static void readCorrections (const std::string &filter, const std::string &filename, std::vector< double > &X, std::vector< double > &Y)
 Read a data file structured as X Y value on each lines. More...
 
static void readCorrections (const std::string &filter, const std::string &filename, std::vector< double > &X, std::vector< double > &Y1, std::vector< double > &Y2)
 Read a data file structured as X Y1 Y2 value on each lines. More...
 
static std::vector< double > readCorrections (const std::string &filter, const std::string &filename, const size_t &col_idx, const char &c_type, const double &init)
 Read a correction file applicable to repeating time period. More...
 
static std::vector< offset_specreadCorrections (const std::string &filter, const std::string &filename, const double &TZ, const size_t &col_idx=2)
 Read a correction file, ie a file structured as timestamps followed by values on each lines. More...
 
static std::map< std::string, std::vector< DateRange > > readDates (const std::string &filter, const std::string &filename, const double &TZ)
 Read a list of date ranges by stationIDs from a file. More...
 
- Protected Member Functions inherited from mio::ProcessingBlock
 ProcessingBlock (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name, const Config &cfg)
 protected constructor only to be called by children More...
 
- Static Protected Member Functions inherited from mio::ProcessingBlock
static void extract_dbl_vector (const unsigned int &param, const std::vector< MeteoData > &ivec, std::vector< double > &ovec)
 
static void extract_dbl_vector (const unsigned int &param, const std::vector< const MeteoData * > &ivec, std::vector< double > &ovec)
 
- Protected Attributes inherited from mio::ProcessingBlock
const std::set< std::string > excluded_stations
 
const std::set< std::string > kept_stations
 
const std::vector< DateRangetime_restrictions
 
ProcessingProperties properties
 
const std::string block_name
 
- Static Protected Attributes inherited from mio::ProcessingBlock
static const double soil_albedo = .23
 
static const double snow_albedo = .85
 
static const double snow_thresh = .1
 parametrize the albedo from HS More...
 

Constructor & Destructor Documentation

◆ ProcTransformWindVector() [1/2]

mio::ProcTransformWindVector::ProcTransformWindVector ( const std::vector< std::pair< std::string, std::string > > &  vecArgs,
const std::string &  name,
const Config cfg 
)

◆ ~ProcTransformWindVector()

mio::ProcTransformWindVector::~ProcTransformWindVector ( )

◆ ProcTransformWindVector() [2/2]

mio::ProcTransformWindVector::ProcTransformWindVector ( const ProcTransformWindVector c)

Member Function Documentation

◆ operator=()

ProcTransformWindVector & mio::ProcTransformWindVector::operator= ( const ProcTransformWindVector c)

◆ process()

void mio::ProcTransformWindVector::process ( const unsigned int &  param,
const std::vector< MeteoData > &  ivec,
std::vector< MeteoData > &  ovec 
)
virtual

Implements mio::ProcessingBlock.


The documentation for this class was generated from the following files: