VerticalWindProfileOp.h
1 /*
2 
3 MIT License
4 
5 Copyright (c) 2017 FMI Open Development / Markus Peura, first.last@fmi.fi
6 
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13 
14 The above copyright notice and this permission notice shall be included in all
15 copies or substantial portions of the Software.
16 
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 SOFTWARE.
24 
25 */
26 /*
27 Part of Rack development has been done in the BALTRAD projects part-financed
28 by the European Union (European Regional Development Fund and European
29 Neighbourhood Partnership Instrument, Baltic Sea Region Programme 2007-2013)
30 */
31 
32 #ifndef VERTICAL_WIND_ProfileOp_H_
33 #define VERTICAL_WIND_ProfileOp_H_
34 
35 #include <string>
36 
37 #include "data/Data.h"
38 #include "data/DataSelector.h"
39 //#include "data/PolarODIM.h"
40 #include "data/VerticalODIM.h"
41 #include "product/VolumeOp.h"
42 
43 
44 namespace rack {
45 
47 
50 class VerticalWindProfileOp: public VolumeOp<VerticalProfileODIM> {
51 
52 public:
53 
54  VerticalWindProfileOp(double minRange=10, double range=100, double minHeight=0, double maxHeight=10000, long int levels=100, double startaz=0.0, double stopaz=359.99, long int azSlots=1) :
55  VolumeOp<VerticalProfileODIM>(__FUNCTION__ ,"Computes vertical dBZ distribution in within range [minRange,maxRange] km.") { // std::string type="d", double gain=0.5, double offset=-32.0) :
56 
57  odim.distanceRange.set(minRange, range);
58  parameters.link("range", odim.distanceRange.tuple(), "km"); // = range
59  // parameters.link("minRange", odim.minRange = minRange, "km");
60  //parameters.link("range", odim.range = range, "km");
61 
62  odim.altitudeRange.set(minHeight, maxHeight);
63  parameters.link("height", odim.altitudeRange.tuple(), "m");
64  //parameters.link("minHeight", odim.height.min = minHeight, "m");
65  //parameters.link("maxHeight", odim.height.max = maxHeight, "m");
66 
67  parameters.link("levels", odim.levels = levels);
68 
69  odim.azmRange.set(startaz, stopaz);
70  parameters.link("azm", odim.azmRange.tuple(), "deg");
71  // parameters.link("startaz", odim.startaz = startaz, "deg");
72  // parameters.link("stopaz", odim.stopaz = stopaz, "deg");
73  parameters.link("azSlots", odim.azSlots = azSlots);
74 
75  odim.link("interval", interval);
76 
77  odim.object = "VP"; // used by VolumeOp::processVolume
78  odim.product = "VP"; // used by VericalProfileOp::processVolume
79 
80  odim.quantity = ""; // will be chosen by dataselector
81 
82  allowedEncoding.link("type", odim.type = "d");
83  //allowedEncoding.link("gain", odim.scaling.scale, 0.5);
84  //allowedEncoding.link("offset", odim.scaling.offset, -32.0);
85 
86  dataSelector.setQuantities("^DBZH$");
87 
88  }
89 
90 
91  virtual ~VerticalWindProfileOp(){};
92 
93 protected:
94 
95  mutable
96  double interval;
97 
98  void setGeometry(const PolarODIM & srcODIM, PlainData<VprDst> & dstData) const {};
99 
100  //virtual void setGeometry(Data<VprDst> & dstData) const;
101 
102  virtual
103  void computeSingleProduct(const DataSetMap<PolarSrc> & srcSweeps, DataSet<VprDst> & dstProduct) const;
104 
105 
106 
107 };
108 
109 }
110 
111 #endif /* VERTICALProfileOp_H_ */
112 
113 // Rack
Definition: Data.h:1368
A map of radar data, indexed by quantity code (DBZH, VRAD, etc).
Definition: Data.h:1213
Essential class for storing radar data.
Definition: Data.h:302
Metadata structure for single-radar data (polar scans, volumes and products).
Definition: PolarODIM.h:45
Computes vertical profiles of reflectivity (DBZH), including raw and polarized reflectivity.
Definition: VerticalWindProfileOp.h:50
virtual void computeSingleProduct(const DataSetMap< PolarSrc > &srcSweeps, DataSet< VprDst > &dstProduct) const
Definition: VerticalWindProfileOp.cpp:55
Base class for radar data processors.
Definition: VolumeOp.h:88
Definition: DataSelector.cpp:44