1 | // $Id: MSISE_00Atmosphere.hh 2695 2006-05-27 19:09:42Z moreggia $ |
---|
2 | // S. Moreggia created 18 November 2003 |
---|
3 | |
---|
4 | // Mass Spectrometer, Incoherent Scatter Radar Extended Model : NRLMSISE_00 |
---|
5 | // For atmospheric description |
---|
6 | |
---|
7 | #ifndef __MSISE_00ATMOSPHERE_HH__ |
---|
8 | #define __MSISE_00ATMOSPHERE_HH__ |
---|
9 | |
---|
10 | /***************************************************************************** |
---|
11 | * ESAF: Euso Simulation and Analysis Framework * |
---|
12 | * * |
---|
13 | * Id: MSISE_00Atmosphere * |
---|
14 | * Package: atmosphere * |
---|
15 | * Coordinator: S. Moreggia * |
---|
16 | * * |
---|
17 | *****************************************************************************/ |
---|
18 | |
---|
19 | //////////////////////////////////////////////////////////////////////////////////////////// |
---|
20 | // // |
---|
21 | // MSISE_00Atmosphere // |
---|
22 | // // |
---|
23 | // Mass Spectrometer, Incoherent Scatter Radar Extended Model : NRLMSISE_00 // |
---|
24 | // Atmospheric description using msise model // |
---|
25 | // Source code (see MSISETool) has been downloaded from Nasa Website // |
---|
26 | // // |
---|
27 | //////////////////////////////////////////////////////////////////////////////////////////// |
---|
28 | |
---|
29 | #include "Atmosphere.hh" |
---|
30 | #include "MSISEtool.hh" |
---|
31 | #include "EsafMsgSource.hh" |
---|
32 | #include "MSISE_00AtmosphereData.hh" |
---|
33 | |
---|
34 | class MSISE_00Atmosphere : public Atmosphere { |
---|
35 | |
---|
36 | public: |
---|
37 | |
---|
38 | // create the single atmosphere instance as a MSISE_00Atmosphere object |
---|
39 | static void CreateInstance(); |
---|
40 | |
---|
41 | // in random mode, randomly chose a new atmosphere |
---|
42 | void ResetInstance(); |
---|
43 | |
---|
44 | // To get specific parameters of MSISE atmosphere from the interface |
---|
45 | virtual Double_t GetValue(const string& parname) const {return 0;} |
---|
46 | |
---|
47 | // get date and geographic atmosphere parameters |
---|
48 | virtual Double_t GetLatitude() const; // from -90 (south) to 90 (north) |
---|
49 | virtual Double_t GetLongitude() const; // from 0 to 360 (east) |
---|
50 | virtual Double_t GetDate() const; // in sec UT, 1sec <==> 1st Jan 00:00:01 (year not taken into account) |
---|
51 | inline Double_t GetDoy() const {return fData->GetDoy();} |
---|
52 | |
---|
53 | // Following methods give relevant densities, temperature, pressure |
---|
54 | virtual Double_t Pressure(Double_t h) const; |
---|
55 | virtual Double_t Temperature(Double_t h) const; |
---|
56 | virtual Double_t AbsoluteHumidity(Double_t h) const; |
---|
57 | virtual Double_t Air_Density(Double_t h) const; |
---|
58 | virtual Double_t O_Density(Double_t h) const; |
---|
59 | virtual Double_t O2_Density(Double_t h) const; |
---|
60 | virtual Double_t O3_Density(Double_t h) const; |
---|
61 | virtual Double_t O3_DensityPPMV(Double_t h) const; |
---|
62 | virtual Double_t N2_Density(Double_t h) const; |
---|
63 | virtual Double_t Aerosols_Density(string& type,Double_t h) const; |
---|
64 | |
---|
65 | EsafConfigClass(Atmosphere,MSISE_00Atmosphere) |
---|
66 | |
---|
67 | //virtual void Test(); to test MSISE code interface |
---|
68 | //void Build(Int_t doy,Double_t lst, Double_t lat, Double_t longi); |
---|
69 | |
---|
70 | |
---|
71 | private: |
---|
72 | // default ctor (not used) |
---|
73 | MSISE_00Atmosphere() {} |
---|
74 | |
---|
75 | // ctor |
---|
76 | MSISE_00Atmosphere(string); |
---|
77 | |
---|
78 | // dtor |
---|
79 | virtual ~MSISE_00Atmosphere(); |
---|
80 | |
---|
81 | // Build atmosphere according to config parameters |
---|
82 | virtual void Build(); |
---|
83 | |
---|
84 | // Calculate interpolations (if working with tables) |
---|
85 | Double_t Interpolate(string&,string&,Double_t) const; |
---|
86 | |
---|
87 | MSISE_00AtmosphereData* fData; // tables storage |
---|
88 | |
---|
89 | ClassDef(MSISE_00Atmosphere,0) |
---|
90 | }; |
---|
91 | |
---|
92 | //________________________________________________________________________________________ |
---|
93 | inline Double_t MSISE_00Atmosphere::GetLatitude() const { |
---|
94 | if(fData) return fData->GetLatitude(); |
---|
95 | else Msg(EsafMsg::Info) << "No MSISE data --> command ignored"<< MsgDispatch; |
---|
96 | return -1000.; |
---|
97 | } |
---|
98 | |
---|
99 | //________________________________________________________________________________________ |
---|
100 | inline Double_t MSISE_00Atmosphere::GetLongitude() const { |
---|
101 | if(fData) return fData->GetLongitude(); |
---|
102 | else Msg(EsafMsg::Info) << "No MSISE data --> command ignored"<< MsgDispatch; |
---|
103 | return -1000.; |
---|
104 | } |
---|
105 | |
---|
106 | //________________________________________________________________________________________ |
---|
107 | inline Double_t MSISE_00Atmosphere::GetDate() const { |
---|
108 | if(fData) return fData->GetDate(); |
---|
109 | else Msg(EsafMsg::Info) << "No MSISE data --> command ignored"<< MsgDispatch; |
---|
110 | return -1000.; |
---|
111 | } |
---|
112 | |
---|
113 | |
---|
114 | #endif /*__MSISE_00ATMOSPHERE_HH__*/ |
---|