Commits
72 72 | unsigned int atmType) : |
73 73 | // Atmospheretype atmType): |
74 74 | typeAtm_(atmType), groundTemperature_(groundTemperature), |
75 75 | tropoLapseRate_(tropoLapseRate), groundPressure_(groundPressure), |
76 76 | relativeHumidity_(relativeHumidity), wvScaleHeight_(wvScaleHeight), |
77 77 | pressureStep_(pressureStep), pressureStepFactor_(1.075), // pressureStepFactor_(pressureStepFactor), 05JUN2024 |
78 78 | altitude_(altitude), topAtmProfile_(topAtmProfile) |
79 79 | { |
80 80 | |
81 81 | if(pressureStep_.get("mb")<5.0 || pressureStep_.get("mb")>12.5){pressureStep_=Pressure(10,"mb");} |
82 - | // std::cout << "Warning pressureStep out of limits. Fixed to 10 mb" << std::endl; } //pressureStep has to be betwee 8 and 12 mb 05JUN2024 |
82 + | // std::cout << "Warning pressureStep out of limits. Fixed to 10 mb" << std::endl; } //pressureStep has to be betwee 5 and 12.5 mb 05JUN2024 |
83 83 | numLayer_ = 0; |
84 84 | numLayer_ = mkAtmProfile(); |
85 85 | // std::cout << "ad numLayer_=" << numLayer_ << std::endl; |
86 86 | initBasicAtmosphericParameterThresholds(); |
87 87 | newBasicParam_ = true; |
88 88 | |
89 89 | |
90 90 | } |
91 91 | |
92 92 | AtmProfile::AtmProfile(const Length &altitude, |
101 101 | unsigned int atmType, |
102 102 | const vector<Length> &v_layerBoundaries, |
103 103 | const vector<Temperature> &v_layerTemperature): |
104 104 | typeAtm_(atmType), groundTemperature_(groundTemperature), |
105 105 | tropoLapseRate_(tropoLapseRate), groundPressure_(groundPressure), |
106 106 | relativeHumidity_(relativeHumidity), wvScaleHeight_(wvScaleHeight), |
107 107 | pressureStep_(pressureStep), pressureStepFactor_(1.075), // pressureStepFactor_(pressureStepFactor), 05JUN2024 |
108 108 | altitude_(altitude), topAtmProfile_(topAtmProfile) |
109 109 | { |
110 110 | if(pressureStep_.get("mb")<5.0 || pressureStep_.get("mb")>12.5){pressureStep_=Pressure(10,"mb");} |
111 - | // std::cout << "Warning pressureStep out of limits. Fixed to 10 mb" << std::endl; } //pressureStep has to be between 8 and 12 mb 05JUN2024 |
111 + | // std::cout << "Warning pressureStep out of limits. Fixed to 10 mb" << std::endl; } //pressureStep has to be between 5 and 12.5 mb 05JUN2024 |
112 112 | numLayer_ = 0; |
113 113 | numLayer_ = mkAtmProfile(); |
114 114 | initBasicAtmosphericParameterThresholds(); |
115 115 | newBasicParam_ = true; |
116 116 | unsigned int nL1 = v_layerBoundaries.size(); |
117 117 | unsigned int nL2 = v_layerTemperature.size(); |
118 118 | if(nL1 == nL2 ) { |
119 119 | double h=altitude_.get(Length::UnitMeter); |
120 120 | double h0; |
121 121 | double h1; |
1721 1721 | double dt = tropoLapseRate_; // TODO implementer des unites (K/km) ici localement |
1722 1722 | double prLimit; |
1723 1723 | double minmin; |
1724 1724 | unsigned int seasonal_diurnal = 0; |
1725 1725 | |
1726 1726 | if(dp<5.0 || dp>12.5){dp = 10.0; std::cout << "ATMProfile WARNING: Primary Pressure step fixed to 10 mb for numerical reasons" << std::endl; } |
1727 1727 | if(dp1<1.074 || dp1 > 1.076 ){dp = 1.075; std::cout << "ATMProfile WARNING: Pressure Step factor fixed to 1.075 for numerical reasons" << std::endl; } |
1728 1728 | |
1729 1729 | if(typeAtm_ == 1) { // TROPICAL US St. 76 |
1730 1730 | prLimit = 125; //100.0; // 100.0 230.2; TEMPORAL FIX 20220606 |
1731 + | seasonal_diurnal=1; |
1731 1732 | } else if(typeAtm_ == 11) { // CHAJNANTOR Winter + Daytime |
1732 1733 | typeAtm_ = 1; |
1733 1734 | seasonal_diurnal=1; |
1734 1735 | prLimit = 125.0; //100.0; // 100.0 230.2; TEMPORAL FIX 20220606 |
1735 1736 | } else if(typeAtm_ == 12) { // CHAJNANTOR Winter + Nighttime |
1736 1737 | typeAtm_ = 1; |
1737 1738 | seasonal_diurnal=2; |
1738 1739 | prLimit = 125.0; //100.0; // 100.0 230.2; TEMPORAL FIX 20220606 |
1739 1740 | } else if(typeAtm_ == 13) { // CHAJNANTOR Summer + Daytime |
1740 1741 | typeAtm_ = 1; |
1741 1742 | seasonal_diurnal=3; |
1742 1743 | prLimit = 125.0; //100.0; // 100.0 230.2; TEMPORAL FIX 20220606 |
1743 1744 | } else if(typeAtm_ == 14) { // CHAJNANTOR Summer + Nighttime |
1744 1745 | typeAtm_ = 1; |
1745 1746 | seasonal_diurnal=4; |
1746 1747 | prLimit = 125.0; |
1747 1748 | } else if(typeAtm_ == 2) { |
1748 1749 | prLimit = 100.0; // 198.0; |
1750 + | seasonal_diurnal=1; |
1749 1751 | } else if(typeAtm_ == 3) { |
1750 1752 | prLimit = 100.0; // 300.0 |
1753 + | seasonal_diurnal=1; |
1751 1754 | } else if(typeAtm_ == 4) { |
1752 1755 | prLimit = 100.0; // 311.0 |
1756 + | seasonal_diurnal=1; |
1753 1757 | } else if(typeAtm_ == 5) { |
1754 1758 | prLimit = 100.0; // 332.0 |
1759 + | seasonal_diurnal=1; |
1755 1760 | } else if(typeAtm_ == 6) { |
1756 1761 | prLimit = 100.0; // 332.0 |
1762 + | seasonal_diurnal=1; |
1757 1763 | } else { |
1758 1764 | typeAtm_ = 6; // Default: US St76 Atm. |
1759 1765 | prLimit = 100.0; // 250.0; |
1766 + | seasonal_diurnal=1; |
1760 1767 | } |
1761 1768 | |
1762 1769 | unsigned int npp = 0; // number of layers initialized |
1763 1770 | |
1764 1771 | double rt = 6371.2E+0; // Earth radius in km |
1765 1772 | double g0 = 9.80665E+0; // Earth gravity at the surface (m/s**2) |
1766 1773 | |
1767 1774 | // static bool first = true; // [-Wunused_but_set_variable] |
1768 1775 | |
1769 1776 | unsigned int i; |