Canoe
Comprehensive Atmosphere N' Ocean Engine
nitrogen_cia.hpp
Go to the documentation of this file.
1 #ifndef SRC_OPACITY_NITROGEN_CIA_HPP_
2 #define SRC_OPACITY_NITROGEN_CIA_HPP_
3 
4 // C/C++
5 #include <string>
6 #include <vector>
7 
8 // opacity
9 #include "absorber.hpp"
10 
11 class N2N2CIA : public Absorber {
12  public:
13  N2N2CIA() : Absorber("N2-N2") {}
14 
15  virtual ~N2N2CIA() {}
16 
17  void LoadCoefficient(std::string fname, size_t bid) override;
18 
19  Real GetAttenuation(Real wave1, Real wave2,
20  AirParcel const& var) const override {
21  return getAttenuation1((wave1 + wave2) / 2., var);
22  }
23 
24  protected:
25  Real getAttenuation1(Real wave, AirParcel const& var) const;
26 
27  size_t rt_len_[2];
28  size_t fd1_len_[2];
29  size_t fd2_len_[2];
30 
31  std::vector<Real> rt_axis_;
32  std::vector<Real> fd1_axis_;
33  std::vector<Real> fd2_axis_;
34  std::vector<Real> rt_;
35  std::vector<Real> fd1_;
36  std::vector<Real> fd2_;
37 };
38 
39 #endif // SRC_OPACITY_NITROGEN_CIA_HPP_
base class of all absorbers
Definition: absorber.hpp:25
size_t fd2_len_[2]
Real GetAttenuation(Real wave1, Real wave2, AirParcel const &var) const override
Get attenuation coefficient [1/m].
std::vector< Real > fd2_axis_
size_t rt_len_[2]
std::vector< Real > rt_axis_
std::vector< Real > fd1_
Real getAttenuation1(Real wave, AirParcel const &var) const
std::vector< Real > rt_
std::vector< Real > fd2_
size_t fd1_len_[2]
void LoadCoefficient(std::string fname, size_t bid) override
Load absorption coefficient from file.
virtual ~N2N2CIA()
std::vector< Real > fd1_axis_