Loading...
Searching...
No Matches
VerticalProfileOp.h
1/*
2
3MIT License
4
5Copyright (c) 2017 FMI Open Development / Markus Peura, first.last@fmi.fi
6
7Permission is hereby granted, free of charge, to any person obtaining a copy
8of this software and associated documentation files (the "Software"), to deal
9in the Software without restriction, including without limitation the rights
10to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11copies of the Software, and to permit persons to whom the Software is
12furnished to do so, subject to the following conditions:
13
14The above copyright notice and this permission notice shall be included in all
15copies or substantial portions of the Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23SOFTWARE.
24
25*/
26/*
27Part of Rack development has been done in the BALTRAD projects part-financed
28by the European Union (European Regional Development Fund and European
29Neighbourhood Partnership Instrument, Baltic Sea Region Programme 2007-2013)
30*/
31
32#ifndef VERTICALProfileOp_H_
33#define VERTICALProfileOp_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
44namespace rack {
45
47
50class VerticalProfileOp: public VolumeOp<VerticalProfileODIM> {
51
52public:
53
54 VerticalProfileOp(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 ~VerticalProfileOp(){};
92
93protected:
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
void setQuantities(const std::string &s)
Sets basic quantities and quality quantities. These sets are separated by '/'.
Definition DataSelector.cpp:282
Definition Data.h:1370
A map of radar data, indexed by quantity code (DBZH, VRAD, etc).
Definition Data.h:1215
Essential class for storing radar data.
Definition Data.h:300
Metadata structure for single-radar data (polar scans, volumes and products).
Definition PolarODIM.h:45
drain::ReferenceMap allowedEncoding
Defines which encoding parameters can be changed by the user from command line.
Definition ProductBase.h:205
MD odim
The default data parameters for encoding output (the product).
Definition RadarProductOp.h:101
Computes vertical profiles of reflectivity (DBZH), including raw and polarized reflectivity.
Definition VerticalProfileOp.h:50
virtual void computeSingleProduct(const DataSetMap< PolarSrc > &srcSweeps, DataSet< VprDst > &dstProduct) const
Definition VerticalProfileOp.cpp:56
Base class for radar data processors.
Definition VolumeOp.h:88
Definition DataSelector.cpp:44