14 #include <utl/Reader.h>
15 #include <utl/ErrorLogger.h>
16 #include <utl/AugerException.h>
17 #include <utl/AugerUnits.h>
18 #include <utl/MathConstants.h>
19 #include <utl/TabulatedFunction.h>
20 #include <utl/TimeStamp.h>
21 #include <utl/UTCDateTime.h>
22 #include <utl/PhysicalConstants.h>
23 #include <utl/PhysicalFunctions.h>
25 #include <fwk/CentralConfig.h>
27 #include <atm/MonthlyAvgDBProfileModel.h>
28 #include <atm/ProfileResult.h>
29 #include <atm/MolecularDB.h>
30 #include <atm/MolecularLayer.h>
31 #include <atm/MolecularZone.h>
32 #include <atm/ProfileResult.h>
33 #include <det/Detector.h>
35 #include <utl/ErrorLogger.h>
56 if (!CheckForUpdates())
58 return *fTabLogPressureVsHeight;
66 if (!CheckForUpdates())
68 return *fTabTemperatureVsHeight;
76 if (!CheckForUpdates())
78 return *fTabLogVaporPressureVsHeight;
86 if (!CheckForUpdates())
88 return *fTabLogDensityVsHeight;
96 if (!CheckForUpdates())
98 return *fTabLogDepthVsHeight;
106 if (!CheckForUpdates())
108 return *fTabHeightVsLogDepth;
116 if (!CheckForUpdates())
118 return *fTabRIVsHeight;
126 return CheckForUpdates();
138 UTCDateTime(det::Detector::GetInstance().GetTime()).GetMonth())
142 CleanRIVsWavelength();
144 fCurrentTime = det::Detector::GetInstance().GetTime();
197 msg <<
"Invalid month number : " << iMonth;
202 det::Detector::GetInstance().GetAtmosphere().GetMolecularDB(profileId);
206 const double minLog =
kLn10 * numeric_limits<double>::min_exponent10;
212 lIt != zIt->LayersEnd(); ++lIt) {
218 if (lIt != zIt->LayersBegin()) {
220 if (newIt->GetHeight() <= (--newIt)->GetHeight())
226 lIt->GetHeight(), lIt->GetHeightError(),
227 log(lIt->GetDepth()), lIt->GetDepthError() / lIt->GetDepth()
239 lIt->GetHeight(), lIt->GetHeightError(),
240 log(lIt->GetPressure()), lIt->GetPressureError() / lIt->GetPressure()
245 const double pVapor = lIt->GetHumidity() * pSat;
246 const double dpVapor = lIt->GetHumidityError() * pSat;
248 tabLogVaporPressureVsHeight.
PushBack(
249 lIt->GetHeight(), lIt->GetHeightError(),
250 (pVapor > 0) ? log(pVapor) : minLog, (pVapor > 0 && dpVapor > 0) ? pVapor / dpVapor : minLog
254 lIt->GetHeight(), lIt->GetHeightError(),
255 lIt->GetTemperature(), lIt->GetTemperatureError()
259 lIt->GetHeight(), lIt->GetHeightError(),
260 log(lIt->GetAirDensity()), lIt->GetAirDensityError() / lIt->GetAirDensity()
266 while (lIt != zIt->LayersBegin()) {
273 if (lIt != --(zIt->LayersEnd())) {
275 if (newIt->GetHeight() >= (++newIt)->GetHeight())
281 log(lIt->GetDepth()), lIt->GetDepthError() / lIt->GetDepth(),
282 lIt->GetHeight(), lIt->GetHeightError()
291 msg <<
"Monthly average data requested from database, "
292 "but no data found for month "
298 if (nZonesCheck != 1) {
299 ERROR(
"some kind of error here");
303 *fTabLogPressureVsHeight =
306 *fTabLogVaporPressureVsHeight =
309 *fTabTemperatureVsHeight =
312 *fTabLogDensityVsHeight =
315 *fTabLogDepthVsHeight =
318 *fTabHeightVsLogDepth =
325 ExtendProfilesTo100km();
const atm::ProfileResult & EvaluatePressureVsHeight() const override
Table of air pressure as a function of height.
boost::transform_iterator< InternalZoneFunctor, InternalZoneIterator, const MolecularZone & > ZoneIterator
ZoneIterator returns a pointer to a MolecularZone.
constexpr double atmosphere
bool CheckForUpdates() const
const atm::ProfileResult & EvaluateDensityVsHeight() const override
Table of density as a function of height.
const ProfileResult & EvaluateVaporPressureVsHeight() const override
Table of H2O vapor pressure as a function of height.
constexpr double kOverburdenSeaLevel
ZoneIterator ZonesEnd() const
End of the collection of valid Zones.
Detector description interface for data in the Atm_Molecular database.
virtual bool HasData() const override
True if a data source is for the given model.
const atm::ProfileResult & EvaluateTemperatureVsHeight() const override
Table of temperature as a function of height.
const atm::ProfileResult & EvaluateRefractionIndexVsHeight() const override
Tabl of refraction index as a function of height.
const atm::ProfileResult & EvaluateDepthVsHeight() const override
Table of depth as a function of height.
const atm::ProfileResult & EvaluateHeightVsDepth() const override
Table of height as a function of depth.
Class describing the Atmospheric profile.
ProfileId
Monitoring profiles:
#define DEBUGLOG(message)
Macro for logging debugging messages.
double SaturationVaporPressure(const double temperature)
Evaluate the saturation vapor pressure over ice or water.
void PushBack(const double x, const double xErr, const double y, const double yErr)
ZoneIterator ZonesBegin() const
Beginning of the collection of valid Zones.
double LorentzLorentz(const double verticalDepth)
Calculate the refraction index for a given depth.
September Malargue model.
boost::indirect_iterator< InternalLayerIterator, const MolecularLayer & > LayerIterator
Layer iterator returns a pointer to the molecular data slice for this zone.
#define ERROR(message)
Macro for logging error messages.