Tools/ShowerUniversality/UnivParamNS/Atmosphere.h
Go to the documentation of this file.
1 
19 #ifndef __Atmosphere_h_
20 #define __Atmosphere_h_
21 
22 
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string>
26 
27 namespace AtmosphereNS {
28 
29  const float c_cmperns = 29.9792458;
30  const float hGroundRef = 1452.e2;
31 
32  class AtmModel {
33  public:
34  float ai[5], bi[5], ci[5];
35  float hi[5]; // cm
36  int atmflag; // 1...12 Montly models 10,...,50 Seasonal models
37  };
38 
39  class Atmosphere {
40  private:
41 
45  bool ok; // Initialized to false, only set to true when acurrent is set
46  std::string atmType; // currently implemented: "monthly", "seasonal"
47 
48  public:
49  Atmosphere(const bool UseGDAS = false, const std::string atmtype = "monthly");
50  ~Atmosphere();
52  {
53  return &acurrent;
54  };
56  {
57  return acurrent.atmflag;
58  };
59  void SetCurrentAtmosphere(AtmModel theAtm);
60  void SetCurrentAtmosphere(int imonth); // imonth=1,...,12
61  void SetCurrentAtmosphere(float* ai, float* bi, float* ci, float* hi);
62  void printCurrentAtmosphere(FILE* fp);
64 
65  //Using current atmosphere
66  float VertDepthToHeight(float vdepth);
67  float SlantDepthToHeight(float sdepth, float theta);
68  float HeightToVertDepth(float h);
69  float HeightToSlantDepth(float h, float theta);
70  float GetDensity_i(float h);
71  float GetDensity(float h);
72  float GetDensityAboveGround(float hground, float theta, float nRad);
73  float GetDensityAboveGround_i(float hground, float theta, float nRad);
74  float GetSlant0()
75  {
76  return acurrent.ai[4] * acurrent.ci[4] / acurrent.bi[4];
77  };
78  float GetC0()
79  {
80  return acurrent.ci[0];
81  };
82 
83  float Get_DX_DL(float r, float psi, float SlantDepth, float theta, float hground, bool UseDL, bool IsDiffusive);
84  float Get_DX_DL_i(float r, float psi, float SlantDepth, float theta, float hground, bool UseDL, bool IsDiffusive);
85 
86  float GetTimePF_delay(float x, float y, float z, float theta, float azi);
87 
88  float GetTimePF(float r, float psi, float SlantDepth, float theta, float hground);
89  float GetTimePF_i(float r, float psi, float SlantDepth, float theta, float hground);
90  float GetTimePF_h(float r, float psi, float hStart, float theta, float hground);
91 
92  float GetTimeCF_h(float r, float psi, float h1, float theta, float hground);
93  float GetTimeCF(float r, float psi, float SlantDepth, float theta, float hground);
94  float GetTimeCF_i(float r, float psi, float SlantDepth, float theta, float hground);
95 
96  };
97 }
98 #endif // __Atmosphere_h_
99 
float GetTimePF_i(float r, float psi, float SlantDepth, float theta, float hground)
float GetTimeCF(float r, float psi, float SlantDepth, float theta, float hground)
float Get_DX_DL(float r, float psi, float SlantDepth, float theta, float hground, bool UseDL, bool IsDiffusive)
float GetTimeCF_i(float r, float psi, float SlantDepth, float theta, float hground)
float GetTimeCF_h(float r, float psi, float h1, float theta, float hground)
Atmosphere(const bool UseGDAS=false, const std::string atmtype="monthly")
float Get_DX_DL_i(float r, float psi, float SlantDepth, float theta, float hground, bool UseDL, bool IsDiffusive)
float GetTimePF(float r, float psi, float SlantDepth, float theta, float hground)
float GetDensityAboveGround(float hground, float theta, float nRad)
const bool UseDL[4]
Definition: UnivParam.h:36
float GetTimePF_delay(float x, float y, float z, float theta, float azi)
float GetTimePF_h(float r, float psi, float hStart, float theta, float hground)
float GetDensityAboveGround_i(float hground, float theta, float nRad)

, generated on Tue Sep 26 2023.