Debian Codegraph @

src/atlas/grid/detail/spacing/GaussianSpacing.h

raw
1 /*
2 * (C) Copyright 2013 ECMWF.
3 *
4 * This software is licensed under the terms of the Apache Licence Version 2.0
5 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 * In applying this licence, ECMWF does not waive the privileges and immunities
7 * granted to it by virtue of its status as an intergovernmental organisation
8 * nor does it submit to any jurisdiction.
9 */
10
11 #pragma once
12
13 #include <string>
14
15 #include "atlas/grid/detail/spacing/Spacing.h"
16
17 namespace atlas {
18 namespace grid {
19 namespace spacing {
20
21 // clang-format off
22
23 /// @brief Gaussian spacing in interval
24 ///
25 /// There are N Gaussian spaced points in the open interval (90, -90)
26 ///
27 /// Using the constructor GaussianSpacing( N ) we can create
28 ///
29 /// GaussianSpacing( 4 ) --> { 59.44... , 19.87... , -19.87... , -59.44... }
30 ///
31 /// Configuration parameters can be passed as well with following keys:
32 ///
33 /// {"N":4 } --> { 59.44... , 19.87... , -19.87... , -59.44... }
34 ///
35 /// To reverse the orientation of points to go from negative to positive
36 /// instead, pass also the start and end keys:
37 ///
38 /// {"N":4, "start":-90, "end":90 } --> { -59.44... , -19.87... , 19.87... , 59.44... }
39
40 // clang-format on
41
42 class GaussianSpacing : public Spacing {
43 public:
44 // constructor
45 GaussianSpacing(const eckit::Parametrisation& p);
46
47 GaussianSpacing(long N);
48
49 // class name
50 static std::string static_type() { return "gaussian"; }
51 virtual std::string type() const { return static_type(); }
52
53 virtual Spec spec() const;
54 };
55
56 } // namespace spacing
57 } // namespace grid
58 } // namespace atlas