Canoe
Comprehensive Atmosphere N' Ocean Engine
hitran_absorber.hpp
Go to the documentation of this file.
1 #ifndef SRC_OPACITY_HITRAN_ABSORBER_HPP_
2 #define SRC_OPACITY_HITRAN_ABSORBER_HPP_
3 
4 // C/C++
5 #include <string>
6 #include <vector>
7 
8 // harp
9 #include "absorber.hpp"
10 
11 class HitranAbsorber : public Absorber {
12  friend std::ostream& operator<<(std::ostream& os, HitranAbsorber const& ab);
13  // friend HitranAbsorber const& MakeCKAbsorber<>(HitranAbsorber const& albl,
14  // int const *ck_axis, Real const *ck_wave, int nbins);
15  public:
16  HitranAbsorber(std::string name) : Absorber(name) {}
17 
18  virtual ~HitranAbsorber() {}
19  void LoadCoefficient(std::string fname, size_t bid = 0) override;
20  Real GetAttenuation(Real wave1, Real wave2,
21  AirParcel const& var) const override;
22 
23  protected:
24  size_t len_[3];
25  std::vector<Real> axis_;
26  std::vector<Real> kcoeff_;
28  Real getRefTemp(Real pres) const;
29 };
30 
31 #endif // SRC_HARP_HITRAN_ABSORBER_HPP_
base class of all absorbers
Definition: absorber.hpp:25
std::vector< Real > axis_
std::vector< Real > kcoeff_
void LoadCoefficient(std::string fname, size_t bid=0) override
Load absorption coefficient from file.
HitranAbsorber(std::string name)
friend std::ostream & operator<<(std::ostream &os, HitranAbsorber const &ab)
Real GetAttenuation(Real wave1, Real wave2, AirParcel const &var) const override
Get attenuation coefficient [1/m].
Real getRefTemp(Real pres) const
virtual ~HitranAbsorber()
AthenaArray< Real > refatm_