Classes | |
class | LaeaToLonlat |
class | MM5LccIndToLonlat |
class | LonlatToMM5LccInd |
class | MM5MercIndToLonlat |
class | LonlatToMM5MercInd |
class | MM5StereIndToLonlat |
class | LonlatToMM5StereInd |
class | LonlatToWRFLccInd |
class | LonlatToWRFMercInd |
class | LonlatToWRFStereInd |
class | EmepCountryEmission |
Stores an EMEP emission associated with a given country. More... | |
class | TimeZone |
Provides time zone offset from GMT for a list of countries. More... | |
class | FormatCSV |
Input/ouput class to read files in CSV format (Airparif). More... | |
class | FormatECMWF |
Input/ouput class to read files in binary format at ECMWF. More... | |
class | FormatMM5 |
Input/ouput class to read MM5 files (version 3). More... | |
class | MM5SubHeader |
For MM5 sub-headers. More... | |
Functions | |
float | swap (float &x) |
int | swap (int &x) |
unsigned int | swap (unsigned int &x) |
unsigned long | swap (unsigned long &x) |
template<class T, int N> | |
void | swap (Array< T, N > &A) |
template<class T> | |
T | ComputeWesely (T surface_temperature, T solar_radiation, string species, T reactivity, T diffusivity, T Henry, T Ri, T Rlu, T Rac, T RgsS, T RgsO, T RclS, T RclO, T limit, T D_H2O) |
template<class TL, class TD, class TEFI, class TEFT, class TEFN, class TI, class TT, class TN, class TG> | |
void | ComputeBiogenicRates (Data< TL, 3, TG > &LUC, Data< TD, 1, TG > &Density, Data< TEFI, 1, TG > &EF_isoprene, Data< TEFT, 1, TG > &EF_terpenes, Data< TEFN, 1, TG > &EF_NO, Data< TI, 2, TG > &Isoprene, Data< TT, 2, TG > &Terpenes, Data< TN, 2, TG > &NO) |
Computes biogenic emissions rates. | |
template<class TTemp, class TP, class TL, class TD, class TEFI, class TEFT, class TEFN, class TI, class TT, class TN, class TG> | |
void | ComputeBiogenicEmissions (Data< TTemp, 3, TG > &Temperature, Data< TP, 3, TG > &PAR, Data< TL, 3, TG > &LUC, Data< TD, 1, TG > &Density, Data< TEFI, 1, TG > &EF_isoprene, Data< TEFT, 1, TG > &EF_terpenes, Data< TEFN, 1, TG > &EF_NO, Data< TI, 3, TG > &Isoprene, Data< TT, 3, TG > &Terpenes, Data< TN, 3, TG > &NO) |
Computes biogenic emissions. | |
template<class real> | |
void | GetTemporalFactors (string input_file, Data< real, 3 > &Factors) |
Reads temporal factors from a file. | |
template<class real> | |
void | SpeciationAggregation (const vector< string > &Sp_emis_names, string aggregation_matrix, string speciation_directory, vector< string > &Sp_model_names, Data< real, 3 > &Species_factor) |
Computes speciation/aggregation factors. | |
template<class real> | |
void | ComputeVerticalDistribution (const Data< real, 2 > &vertical_distribution_in, const RegularGrid< real > &GridZ_interf_in, const RegularGrid< real > &GridZ_interf_out, Data< real, 2 > &vertical_distribution_out) |
Computes vertical distribution factors. | |
template<class real> | |
void | DividesByHeights (const RegularGrid< real > &GridZ_interf_out, Data< real, 2 > &vertical_distribution_out) |
Divides the vertical distribution by the heights. | |
template<class real> | |
void | GridCorrespondences (const Data< int, 2, real > &LUC, Data< int, 2, real > &Nurb_emep, Data< int, 2, real > &Nwat_emep, Data< int, 2, real > &Nfor_emep, Data< int, 2, real > &Noth_emep, Data< int, 2, real > &Ntot_polair) |
Correspondence between Emep and Polair3D grids. | |
template<class real> | |
void | ReadEmep (Date date, const vector< string > &Sp_emis_names, string input_directory, string input_file, const Data< real, 3 > &MonthlyFactors, const Data< real, 3 > &DailyFactors, const real &deposition_factor_nh3, Data< list< EmepCountryEmission< real > >, 4, real > &Emis_land, Data< list< EmepCountryEmission< real > >, 4, real > &Emis_water) |
Reads Emep standard files and applies monthly and daily factors. | |
template<class real> | |
void | ReadModifiedEmep (Date date, const vector< string > &Sp_emis_names, string input_directory, const Data< real, 3 > &MonthlyFactors, const Data< real, 3 > &DailyFactors, const real &deposition_factor_nh3, Data< list< EmepCountryEmission< real > >, 4, real > &Emis_land, Data< list< EmepCountryEmission< real > >, 4, real > &Emis_water) |
Reads Emep modified files and applies monthly and daily factors. | |
template<class real> | |
void | EmepToLatLon (const Data< int, 2, real > &LUC, const real Ratio_urb, const real Ratio_for, const real Ratio_oth, const Data< int, 2, real > &Nurb_emep, const Data< int, 2, real > &Nwat_emep, const Data< int, 2, real > &Nfor_emep, const Data< int, 2, real > &Noth_emep, const Data< int, 2, real > &Ntot_polair, Data< list< EmepCountryEmission< real > >, 4, real > &Emis_land, Data< list< EmepCountryEmission< real > >, 4, real > &Emis_water, Data< list< EmepCountryEmission< real > >, 4, real > &Emis_out) |
Computes emissions on a latitude-longitude grid. | |
template<class TL, class TD, class TEFI, class TEFT, class TEFN, class TI, class TT, class TN, class TG> | |
void | ComputeBiogenicRates (Data< TL, 3, TG > &LUC, Data< TD, 3, TG > &Density, Data< TEFI, 1, TG > &EF_isoprene, Data< TEFT, 1, TG > &EF_terpenes, Data< TEFN, 1, TG > &EF_NO, Data< TL, 3, TG > &Isoprene, Data< TL, 3, TG > &Terpenes, Data< TL, 3, TG > &NO) |
template<class TTemp, class TP, class TL, class TD, class TEFI, class TEFT, class TEFN, class TI, class TT, class TN, class TG> | |
void | ComputeBiogenicEmissions (Data< TTemp, 3, TG > &Temperature, Data< TP, 3, TG > &PAR, Data< TL, 3, TG > &LUC, Data< TD, 3, TG > &Density, Data< TEFI, 1, TG > &EF_isoprene, Data< TEFT, 1, TG > &EF_terpenes, Data< TEFN, 1, TG > &EF_NO, Data< TL, 3, TG > &Isoprene, Data< TL, 3, TG > &Terpenes, Data< TL, 3, TG > &NO) |
template<class T_ref, int N, class TG_ref, class T_comp, class TG_comp> | |
T_ref | NGE (Data< T_ref, N, TG_ref > data_ref, Data< T_comp, N, TG_comp > &data_comp, Function_Base< T_ref, bool > &test) |
Computes the normalized gross error between two data sets. | |
template<class T_ref, int N, class TG_ref, class T_comp, class TG_comp> | |
T_ref | Bias (Data< T_ref, N, TG_ref > data_ref, Data< T_comp, N, TG_comp > &data_comp, Function_Base< T_ref, bool > &test) |
Computes the bias between two data sets. | |
template<class T_ref, int N, class TG_ref, class T_comp, class TG_comp> | |
T_ref | RMS (Data< T_ref, N, TG_ref > data_ref, Data< T_comp, N, TG_comp > &data_comp, Function_Base< T_ref, bool > &test) |
Computes the root mean square between two data sets. | |
template<class T_ref, int N, class TG_ref, class T_comp, class TG_comp> | |
T_ref | RelativeRMS (Data< T_ref, N, TG_ref > data_ref, Data< T_comp, N, TG_comp > &data_comp, Function_Base< T_ref, bool > &test) |
Computes the relative root mean square between two data sets. | |
template<class T_ref, int N, class TG_ref, class T_comp, class TG_comp> | |
T_ref | Corr (Data< T_ref, N, TG_ref > data_ref, Data< T_comp, N, TG_comp > &data_comp, Function_Base< T_ref, bool > &test) |
Computes the correlation between two data sets. | |
template<class TU, class TV, class TTp, class T, class TG> | |
void | ComputeLouisKz (Data< TU, 4, TG > &U, Data< TV, 4, TG > &V, Data< TTp, 4, TG > &Tp, Data< T, 4, TG > &Kz, T L0, T B, T C, T D, T z0, T a, T b, T delta_z0, T Ka) |
Computes vertical diffusion according to the Louis formula (1979). | |
template<class TU, class TTp, class T, class TG> | |
void | ComputeLMO (const Data< TU, 3, TG > &FrictionModule, const Data< TTp, 3, TG > &SurfacePotentialTemperature, const Data< TTp, 4, TG > &PotentialTemperature, const Data< T, 3, TG > &SensibleHeat, const Data< T, 3, TG > &Evaporation, Data< T, 3, TG > &LMO, T Ka) |
Computes the Monin-Obukhov length. | |
template<class TT, class TTp, class TU, class T, class TG> | |
void | ComputePBLH_TM (const Data< TT, 3, TG > &SurfaceTemperature, const Data< TTp, 3, TG > &SurfacePotentialTemperature, const Data< TTp, 4, TG > &PotentialTemperature, const Data< TU, 3, TG > &FrictionModule, const Data< TU, 4, TG > &WindModule, const Data< T, 3, TG > &SensibleHeat, const Data< T, 3, TG > &LMO, const Grid< TG > &GridZ_interf, Data< T, 3, TG > &BoundaryHeight, T SBL, T Ric, T C, T Ka) |
Computes the boundary layer height according to Troen & Mahrt. | |
template<class T, class TG> | |
void | ComputePBLH_Richardson (const Data< T, 4, TG > &Richardson, const Grid< TG > &GridZ_interf, Data< T, 3, TG > &BoundaryHeight, T Ric) |
Computes the boundary layer height based on Richardson number. | |
template<class TU, class TT, class T, class TG> | |
void | ComputeTM_Kz (const Data< TT, 3, TG > &SurfaceTemperature, const Data< TU, 3, TG > &FrictionModule, const Data< T, 3, TG > &SensibleHeat, const Data< T, 3, TG > &LMO, const Data< T, 3, TG > &BoundaryHeight, Data< T, 4, TG > &Kz, bool TM_stable, T SBL, T p, T Ka) |
Computes vertical diffusion according to the Troen and Mahrt (1986). | |
template<class T, class T0> | |
T | min (T x, T0 y) |
Returns the minimum of two elements. | |
template<class T, class T0> | |
T | max (T x, T0 y) |
Returns the maximum of two elements. | |
template<class TU, class TV, class TTp, class T, class TG> | |
void | ComputeRichardson (Data< TU, 4, TG > &ZonalWind, Data< TV, 4, TG > &MeridionalWind, Data< TTp, 4, TG > &PotentialTemperature, Data< T, 4, TG > &Richardson, T wind_threshold) |
Computes the Richardson number. | |
template<class TU, class TV, class TTp, class T, class TG> | |
void | ComputeRichardson (Data< TU, 4, TG > &ZonalWind, Data< TV, 4, TG > &MeridionalWind, Data< TTp, 4, TG > &PotentialTemperature, Data< T, 3, TG > &Richardson, T wind_threshold) |
Computes the Richardson number in the first layer. | |
template<class TU, class TTp, class T, class TG> | |
void | ComputeRichardson (Data< TU, 3, TG > &WindModule, Data< TTp, 3, TG > &SurfacePotentialTemperature, Data< TTp, 4, TG > &PotentialTemperature, Data< T, 3, TG > &SurfaceRichardson, T wind_threshold) |
Computes the surface Richardson number. | |
template<class TR, class TU, class TTp, class T, class TG> | |
void | ComputeRichardson (Data< TR, 2, TG > &Roughness, Data< TU, 3, TG > &WindModule, Data< TTp, 3, TG > &SurfacePotentialTemperature, Data< TTp, 4, TG > &PotentialTemperature, Data< T, 3, TG > &SurfaceRichardson, T wind_threshold) |
Computes the surface Richardson number. | |
template<class TT, class TP, class T, class TG> | |
void | ComputePotentialTemperature (Data< TT, 4, TG > &Temperature, Data< TP, 4, TG > &Pressure, Data< T, 4, TG > &PotentialTemperature, T P0, T cp, T r) |
Computes the potential temperature. | |
template<class TT, class TP, class T, class TG> | |
void | ComputePotentialTemperature (Data< TT, 3, TG > &Temperature, Data< TP, 3, TG > &Pressure, Data< T, 3, TG > &PotentialTemperature, T P0, T cp, T r) |
Computes the potential temperature. | |
template<class TT, class TP, class T, class TG> | |
void | ComputeTemperature (Data< TT, 4, TG > &PotentialTemperature, Data< TP, 4, TG > &Pressure, Data< T, 4, TG > &Temperature, T P0, T cp, T r) |
Computes the temperature. | |
template<class TT, class TP, class T, class TG> | |
void | ComputeTemperature (Data< TT, 3, TG > &PotentialTemperature, Data< TP, 3, TG > &Pressure, Data< T, 3, TG > &Temperature, T P0, T cp, T r) |
Computes the temperature. | |
template<class TT, class TP, class T, class TG> | |
void | ComputeSaturationHumidity (Data< TT, 3, TG > &Temperature, Data< TP, 3, TG > &Pressure, Data< T, 3, TG > &SaturationHumidity) |
Computes the saturation humidity. | |
template<class TT, class TP, class T, class TG> | |
void | ComputeSaturationHumidity (Data< TT, 4, TG > &Temperature, Data< TP, 4, TG > &Pressure, Data< T, 4, TG > &SaturationHumidity) |
Computes the saturation humidity. | |
template<class TS, class TT, class TP, class T, class TG> | |
void | ComputeRelativeHumidity (Data< TS, 4, TG > &SpecificHumidity, Data< TT, 4, TG > &Temperature, Data< TP, 4, TG > &Pressure, Data< T, 4, TG > &RelativeHumidity) |
Computes the relative humidity from the specific humidity. | |
template<class TS, class TT, class TP, class T, class TG> | |
void | ComputeRelativeHumidity (Data< TS, 3, TG > &SpecificHumidity, Data< TT, 3, TG > &Temperature, Data< TP, 3, TG > &Pressure, Data< T, 3, TG > &RelativeHumidity) |
Computes the relative humidity from the specific humidity. | |
template<class TH, class TS, class TW, class TL, class T, class TG> | |
void | ComputeSurfaceHumidity_diag (Data< TH, 4, TG > &SpecificHumidity, Data< TS, 3, TG > &SaturationHumidity, Data< TW, 3, TG > &SoilWater, Data< TL, 3, TG > &LUC, int sea_index, Data< T, 3, TG > &SurfaceHumidity, T veg, T theta_cap) |
Computes the surface specific humidity. | |
template<class TS, class TP, class T, class TG> | |
void | ComputeCriticalRelativeHumidity (Data< TS, 3, TG > &SurfacePressure, Data< TP, 4, TG > &Pressure, Data< T, 4, TG > &CriticalRelativeHumidity, T coeff0, T coeff1) |
Computes the critical relative humidity. | |
template<class TS, class TP, class T, class TG> | |
void | ComputeCriticalRelativeHumidity_extended (Data< TS, 3, TG > &SurfacePressure, Data< TP, 4, TG > &Pressure, Data< T, 4, TG > &CriticalRelativeHumidity, T coeff0, T coeff1, T a0, T a1) |
Computes the critival relative humidity. | |
template<class TB, class TS, class TP, class T, class TG> | |
void | ComputeCriticalRelativeHumidity (Data< TB, 3, TG > &BoundaryLayerHeight, Data< TS, 3, TG > &SurfacePressure, Data< TP, 4, TG > &Pressure, Data< T, 4, TG > &CriticalRelativeHumidity, T coeff0, T coeff1, T BL_CRH) |
Computes the critical relative humidity. | |
template<class TP, class T, class TG> | |
void | ComputeCriticalRelativeHumidity (Data< TP, 4, TG > &Pressure, Data< T, 4, TG > &CriticalRelativeHumidity, T CRH_0, T CRH_1, T CRH_2, T P_0, T P_1) |
Computes the critical relative humidity. | |
template<class TR, class TC, class T, class TG> | |
void | ComputeCloudFraction (Data< TR, 4, TG > &RelativeHumidity, Data< TC, 4, TG > &CriticalRelativeHumidity, Data< T, 4, TG > &CloudFraction) |
Computes the cloud fraction. | |
template<class TP, class TR, class TC, class T, class TG> | |
void | ComputeCloudFraction (Data< TP, 3, TG > &BoundaryLayerHeight, Data< TR, 4, TG > &RelativeHumidity, Data< TC, 4, TG > &CriticalRelativeHumidity, Data< T, 4, TG > &CloudFraction) |
Computes the cloud fraction. | |
template<class TU, class TV, class T, class TG> | |
void | ComputeModule (Data< TU, 4, TG > &U, Data< TV, 4, TG > &V, Data< T, 4, TG > &Module) |
Computes the module of a 2D-vectors field. | |
template<class TU, class TV, class T, class TG> | |
void | ComputeModule (Data< TU, 4, TG > &U, Data< TV, 4, TG > &V, Data< T, 3, TG > &Module) |
Computes the module of a 2D-vectors field on the surface. | |
template<class TU, class TV, class T, class TG> | |
void | ComputeModule (Data< TU, 3, TG > &U, Data< TV, 3, TG > &V, Data< T, 3, TG > &Module) |
Computes the module of a 2D-vectors field on the surface. | |
template<class TC, class TP, class T, class TG> | |
void | ComputeCloudiness (Data< TC, 4, TG > &CloudFraction, Data< TP, 4, TG > &Pressure, Grid< TG > &GridZ_interf, Data< int, 4 > &LowIndices, Data< int, 4 > &MediumIndices, Data< int, 4 > &HighIndices, Data< T, 3, TG > &LowCloudiness, Data< T, 3, TG > &MediumCloudiness, Data< T, 3, TG > &HighCloudiness, T P_0, T P_1) |
Computes low, medium and high cloudiness, cloud base and top. | |
template<class TP, class TH, class T, class TG> | |
void | ComputeCloudHeight (Data< TP, 4, TG > &Pressure, Data< TH, 4, TG > &RelativeHumidity, T(CriticalRelativeHumidity)(const T &, const T &, const T &), Data< T, 3, TG > &CloudHeight) |
Computes the height of cloud basis. | |
template<class TH, class TCRH, class T, class TG> | |
void | ComputeCloudHeight (Data< TH, 4, TG > &RelativeHumidity, Data< TCRH, 4, TG > &CriticalRelativeHumidity, Data< T, 3, TG > &CloudHeight) |
Computes the height of cloud basis. | |
template<class T, class TG> | |
void | ComputeCloudHeight (Data< int, 4 > &LowIndices, Data< int, 4 > &MediumIndices, Data< int, 4 > &HighIndices, Grid< TG > &GridZ_interf, Data< T, 3, TG > &CloudHeight) |
Computes the height of cloud basis. | |
template<class T, class TLC, class TC> | |
void | ComputeTotalCloudiness (Data< TLC, 3, T > &LowCloudiness, Data< TLC, 3, T > &MediumCloudiness, Data< TLC, 3, T > &HighCloudiness, Data< TC, 3, T > &Cloudiness) |
Computes the total cloudiness. | |
template<class TLC, class TC> | |
TC | ComputeTotalCloudiness (TLC low_cloudiness, TLC medium_cloudiness, TLC high_cloudiness) |
Computes the total cloudiness at a given point. | |
template<class T> | |
string | ComputePasquillStabilityClass (T surface_wind, T solar_radiation, T cloudiness, bool isday) |
Computes the Pasquill stability class (source: Turner 1969). | |
template<class Ta, class Tb, class TSP, class T, class TG> | |
void | ComputePressure (Data< Ta, 1, TG > &alpha, Data< Tb, 1, TG > &beta, Data< TSP, 3, TG > &SurfacePressure, Data< T, 4, TG > &Pressure, T P0) |
Computes the pressure from the surface pressure. | |
template<class TPS, class TP, class TT, class T, class TG> | |
void | ComputeHeight (Data< TPS, 3, TG > &SurfacePressure, Data< TP, 4, TG > &Pressure, Data< TT, 4, TG > &Temperature, Grid< T > &Height, T g, T r) |
Computes the altitudes from pressure and temperature fields. | |
template<class TP, class TT, class T, class TG> | |
void | ComputeInterfHeight (Data< TP, 4, TG > &Pressure, Data< TT, 4, TG > &Temperature, Grid< T > &Height, bool ground_set, T g, T r) |
template<class TP, class TT, class T, class TG> | |
void | ComputeMiddleHeight (Data< TP, 4, TG > &Pressure, Data< TT, 4, TG > &Temperature, Grid< T > &InterfHeight, Grid< T > &MiddleHeight, T g, T r) |
template<class TT, class TH, class T, class TG> | |
void | ComputeVirtualTemperature (Data< TT, 4, TG > &Temperature, Data< TH, 4, TG > &SpecificHumidity, Data< T, 4, TG > &VirtualTemperature, T c) |
Computes the virtual temperature. | |
template<class T> | |
T | ZenithAngle (T lon, T lat, Date date, T ut) |
template<class TH, class TL, class TMC, class THC, class T, class TG> | |
void | ComputeAttenuation_LWC (Data< TH, 4, TG > &Humidity, Data< TH, 4, TG > &CRH, Data< TL, 4, TG > &LiquidWaterContent, Data< TMC, 3, TG > &MediumCloudiness, Data< THC, 3, TG > &HighCloudiness, Date date_beg, T Delta_t, Data< T, 4, TG > &Attenuation) |
Computes the cloud attenuation for photolysis rates. | |
template<class TL, class TMC, class THC, class T, class TG> | |
void | ComputeAttenuation_LWC (Data< TL, 4, TG > &LiquidWaterContent, Data< int, 4 > LowIndices, Data< int, 4 > MediumIndices, Data< int, 4 > HighIndices, Data< TMC, 3, TG > &MediumCloudiness, Data< THC, 3, TG > &HighCloudiness, Date date_beg, T Delta_t, Data< T, 4, TG > &Attenuation) |
Computes the cloud attenuation for photolysis rates. | |
template<class TMC, class THC, class TG, class TH, class T> | |
void | ComputeAttenuation_ESQUIF (Data< TMC, 3, TG > &MediumCloudiness, Data< THC, 3, TG > &HighCloudiness, Data< TH, 4, TG > &RelativeHumidity, Data< T, 4, TG > &Attenuation, T a, T b, T c) |
Computes the cloud attenuation for photolysis rates, following the. | |
template<class T, class TG> | |
void | TransformZonalWind (Data< T, 4, TG > &ZonalWind) |
Transforms the zonal wind for Polair. | |
template<class T, class TG> | |
void | TransformMeridionalWind (Data< T, 4, TG > &MeridionalWind) |
Transforms the meridional wind for Polair. | |
template<class T> | |
void | ComputeDeclination (Date date, T ut, T &declination, T &time_equation) |
Computes the sun declination and the equation of time at a given date. | |
template<class T> | |
void | ComputeDeclination (int idate, T ut, T &declination, T &time_equation) |
Computes the sun declination and the equation of time at a given date. | |
template<class T> | |
void | ComputeSunHour (T lon, T lat, int idate, T &sunrise_hour, T &sunset_hour) |
Computes the hours of sunrise and sunset at a given location and date. | |
template<class T> | |
T | ComputeSunriseHour (T lon, T lat, int idate) |
Computes the hour of sunrise at a given location and date. | |
template<class T> | |
T | ComputeSunsetHour (T lon, T lat, int idate) |
Computes the hour of sunset at a given location and date. | |
template<class T> | |
bool | IsDay (T lon, T lat, int idate, T ut) |
Checks whether it is nighttime or daytime at a given location and time. | |
template<class T> | |
bool | IsDay (T lon, T lat, Date date) |
Checks whether it is nighttime or daytime at a given location and time. | |
template<class T, int N, class TG> | |
void | Decumulate (Data< T, N, TG > &data, int length, int start) |
Decumulates data. |
T_ref AtmoData::Bias | ( | Data< T_ref, N, TG_ref > | data_ref, | |
Data< T_comp, N, TG_comp > & | data_comp, | |||
Function_Base< T_ref, bool > & | test | |||
) |
Computes the bias between two data sets.
data_ref | reference data. | |
data_comp | data to be compared with 'data_ref'. | |
test | boolean function with two parameters; the i-th elements of 'data_ref' and 'data_comp' are taken into account if 'test(data_ref(i), data_comp(i))' is true. |
void AtmoData::ComputeAttenuation_ESQUIF | ( | Data< TMC, 3, TG > & | MediumCloudiness, | |
Data< THC, 3, TG > & | HighCloudiness, | |||
Data< TH, 4, TG > & | RelativeHumidity, | |||
Data< T, 4, TG > & | Attenuation, | |||
T | a = 0.1 , |
|||
T | b = 0.3 , |
|||
T | c = 1.5 | |||
) |
Computes the cloud attenuation for photolysis rates, following the.
Formula : Attenuation = (1 - a * HighCloudiness) * (1 - b * MediumCloudiness) * exp(-c * B)
MediumCloudiness | medium cloudiness (in [0, 1]). | |
HighCloudiness | high cloudiness (in [0, 1]). | |
RelativeHumidity | relative humidity (kg/kg). | |
Attenuation | (output) cloud attenuation coefficient. | |
a | coefficient (see the formula). Default : 0.1. | |
b | coefficient (see the formula). Default : 0.3. | |
c | coefficient (see the formula). Default : 1.5. |
void AtmoData::ComputeAttenuation_LWC | ( | Data< TL, 4, TG > & | LiquidWaterContent, | |
Data< int, 4 > | LowIndices, | |||
Data< int, 4 > | MediumIndices, | |||
Data< int, 4 > | HighIndices, | |||
Data< TMC, 3, TG > & | MediumCloudiness, | |||
Data< THC, 3, TG > & | HighCloudiness, | |||
Date | date_beg, | |||
T | Delta_t, | |||
Data< T, 4, TG > & | Attenuation | |||
) |
Computes the cloud attenuation for photolysis rates.
LiquidWaterContent | liquid water content (kg/m^3). | |
LowIndices | vertical indices of base and top of low clouds. | |
MediumIndices | vertical indices of base and top of medium clouds. | |
HighIndices | vertical indices of base and top of high clouds. | |
MediumCloudiness | medium cloudiness (in [0, 1]). | |
HighCloudiness | high cloudiness (in [0, 1]). relative humidity as function of the altitude, the pressure and reference pressure. | |
date_beg | beginning date for the computation of attenuation. | |
Delta_t | time step for the computation of attenuation. | |
Attenuation | (output) cloud attenuation coefficient. |
void AtmoData::ComputeAttenuation_LWC | ( | Data< TH, 4, TG > & | Humidity, | |
Data< TH, 4, TG > & | CRH, | |||
Data< TL, 4, TG > & | LiquidWaterContent, | |||
Data< TMC, 3, TG > & | MediumCloudiness, | |||
Data< THC, 3, TG > & | HighCloudiness, | |||
Date | date_beg, | |||
T | Delta_t, | |||
Data< T, 4, TG > & | Attenuation | |||
) |
Computes the cloud attenuation for photolysis rates.
Humidity | relative humidity. | |
CRH | critical relative humidity. | |
LiquidWaterContent | liquid water content (kg/m^3). | |
MediumCloudiness | medium cloudiness (in [0, 1]). | |
HighCloudiness | high cloudiness (in [0, 1]). | |
date_beg | beginning date for the computation of attenuation. | |
Delta_t | time step for the computation of attenuation. | |
Attenuation | (output) cloud attenuation coefficient. |
void AtmoData::ComputeBiogenicEmissions | ( | Data< TTemp, 3, TG > & | Temperature, | |
Data< TP, 3, TG > & | PAR, | |||
Data< TL, 3, TG > & | LUC, | |||
Data< TD, 1, TG > & | Density, | |||
Data< TEFI, 1, TG > & | EF_isoprene, | |||
Data< TEFT, 1, TG > & | EF_terpenes, | |||
Data< TEFN, 1, TG > & | EF_NO, | |||
Data< TI, 3, TG > & | Isoprene, | |||
Data< TT, 3, TG > & | Terpenes, | |||
Data< TN, 3, TG > & | NO | |||
) |
Computes biogenic emissions.
Computes biogenic emissions according to Simpson et al. (1999).
Temperature | soil or leaf temperature. | |
PAR | Photosynthetically active radiation. | |
LUC | Land use coverage. | |
Density | densities of the land categories. | |
EF_isoprene | isoprene emission factors ( g . m^{-2} . s^{-1}). | |
EF_terpenes | terpenes emission factors ( g . m^{-2} . s^{-1}). | |
EF_NO | NO emission factors ( g . m^{-2} . s^{-1}). | |
Isoprene | (output) isoprene emissions ( g . m^{-2} . s^{-1}). | |
Terpenes | (output) terpenes emissions ( g . m^{-2} . s^{-1}). | |
NO | (output) NO emissions ( g . m^{-2} . s^{-1}). |
void AtmoData::ComputeBiogenicRates | ( | Data< TL, 3, TG > & | LUC, | |
Data< TD, 1, TG > & | Density, | |||
Data< TEFI, 1, TG > & | EF_isoprene, | |||
Data< TEFT, 1, TG > & | EF_terpenes, | |||
Data< TEFN, 1, TG > & | EF_NO, | |||
Data< TI, 2, TG > & | Isoprene, | |||
Data< TT, 2, TG > & | Terpenes, | |||
Data< TN, 2, TG > & | NO | |||
) |
Computes biogenic emissions rates.
Computes biogenic emission rates according to Simpson et al. (1999).
LUC | Land use coverage ([0, 1]). | |
Density | densities of the land categories. | |
EF_isoprene | isoprene emission factors ( g . m^{-2} . s^{-1}). | |
EF_terpenes | terpenes emission factors ( g . m^{-2} . s^{-1}). | |
EF_NO | NO emission factors ( g . m^{-2} . s^{-1}). | |
Isoprene | (output) isoprene emission rates ( g . m^{-2} . s^{-1}). | |
Terpenes | (output) terpenes emission rates ( g . m^{-2} . s^{-1}). | |
NO | (output) NO emission rates ( g . m^{-2} . s^{-1}). |
void AtmoData::ComputeCloudFraction | ( | Data< TP, 3, TG > & | BoundaryLayerHeight, | |
Data< TR, 4, TG > & | RelativeHumidity, | |||
Data< TC, 4, TG > & | CriticalRelativeHumidity, | |||
Data< T, 4, TG > & | CloudFraction | |||
) |
Computes the cloud fraction.
Formula: inside the boundary layer, CloudFraction = 0.34 * [ (RelativeHumidity - CriticalRelativeHumidity) / (1.0 - CriticalRelativeHumidity) ] and, above the boundary layer, CloudFraction = [ (RelativeHumidity - CriticalRelativeHumidity) / (1.0 - CriticalRelativeHumidity) ]^2
BoundaryLayerHeight | boundary layer height (m). | |
RelativeHumidity | relative humidity. | |
CriticalRelativeHumidity | critical relative humidity. | |
CloudFraction | (output) cloud fraction. |
void AtmoData::ComputeCloudFraction | ( | Data< TR, 4, TG > & | RelativeHumidity, | |
Data< TC, 4, TG > & | CriticalRelativeHumidity, | |||
Data< T, 4, TG > & | CloudFraction | |||
) |
Computes the cloud fraction.
Formula: CloudFraction = [ (RelativeHumidity - CriticalRelativeHumidity) / (1.0 - CriticalRelativeHumidity) ]^2
RelativeHumidity | relative humidity. | |
CriticalRelativeHumidity | critical relative humidity. | |
CloudFraction | (output) cloud fraction. |
void AtmoData::ComputeCloudHeight | ( | Data< int, 4 > & | LowIndices, | |
Data< int, 4 > & | MediumIndices, | |||
Data< int, 4 > & | HighIndices, | |||
Grid< TG > & | GridZ_interf, | |||
Data< T, 3, TG > & | CloudHeight | |||
) |
Computes the height of cloud basis.
LowIndices | vertical indices of base and top of low clouds. | |
MediumIndices | vertical indices of base and top of medium clouds. | |
HighIndices | vertical indices of base and top of high clouds. | |
GridZ_interf | altitudes of interfaces (m). | |
CloudHeight | (output) altitudes of cloud basis. |
void AtmoData::ComputeCloudHeight | ( | Data< TH, 4, TG > & | RelativeHumidity, | |
Data< TCRH, 4, TG > & | CriticalRelativeHumidity, | |||
Data< T, 3, TG > & | CloudHeight | |||
) |
Computes the height of cloud basis.
RelativeHumidity | relative humidity (kg/kg). | |
CriticalRelativeHumidity | critical relative humidity. | |
CloudHeight | (output) altitudes of cloud basis. |
void AtmoData::ComputeCloudHeight | ( | Data< TP, 4, TG > & | Pressure, | |
Data< TH, 4, TG > & | RelativeHumidity, | |||
T(CriticalRelativeHumidity)(const T &, const T &,const T &) | , | |||
Data< T, 3, TG > & | CloudHeight | |||
) |
Computes the height of cloud basis.
Pressure | pressure (Pa). | |
RelativeHumidity | relative humidity (kg/kg). | |
CriticalRelativeHumidity | function that returns the critical relative humidity as function of the altitude, the pressure and reference pressure. | |
CloudHeight | (output) altitudes of cloud basis. |
void AtmoData::ComputeCloudiness | ( | Data< TC, 4, TG > & | CloudFraction, | |
Data< TP, 4, TG > & | Pressure, | |||
Grid< TG > & | GridZ_interf, | |||
Data< int, 4 > & | LowIndices, | |||
Data< int, 4 > & | MediumIndices, | |||
Data< int, 4 > & | HighIndices, | |||
Data< T, 3, TG > & | LowCloudiness, | |||
Data< T, 3, TG > & | MediumCloudiness, | |||
Data< T, 3, TG > & | HighCloudiness, | |||
T | P_0 = 80000. , |
|||
T | P_1 = 45000. | |||
) |
Computes low, medium and high cloudiness, cloud base and top.
CloudFraction | cloud fraction. | |
Pressure | pressure (Pa). | |
GridZ_interf | altitudes of interfaces (m). | |
LowIndices | (output) vertical indices of base and top of low clouds. | |
MediumIndices | (output) vertical indices of base and top of medium clouds. | |
HighIndices | (output) vertical indices of base and top of high clouds. | |
LowCloudiness | (output) low cloudiness. | |
MediumCloudiness | (output) medium cloudiness. | |
HighCloudiness | (output) high cloudiness. | |
P_0 | first pressure limit. Default: 80 000 Pa. | |
P_1 | second pressure limit. Default: 45 000 Pa. |
void AtmoData::ComputeCriticalRelativeHumidity | ( | Data< TP, 4, TG > & | Pressure, | |
Data< T, 4, TG > & | CriticalRelativeHumidity, | |||
T | CRH_0 = 0.75 , |
|||
T | CRH_1 = 0.95 , |
|||
T | CRH_2 = 0.95 , |
|||
T | P_0 = 70000. , |
|||
T | P_1 = 40000. | |||
) |
Computes the critical relative humidity.
The relative humidity is set to CRH_0 if Pressure > P_0, to CRH_1 if P_0 >= Pressure > P_1 and to CRH_2 otherwise.
Pressure | pressure (Pa). | |
CriticalRelativeHumidity | (output) critical relative humidity. | |
CRH_0 | critical relative humidity in the first layer. Default: 0.75. | |
CRH_1 | critical relative humidity in the second layer. Default: 0.95. | |
CRH_2 | critical relative humidity in the third layer. Default: 0.95. | |
P_0 | first pressure limit. Default: 70 000 Pa. | |
P_1 | second pressure limit. Default: 40 000 Pa. |
void AtmoData::ComputeCriticalRelativeHumidity | ( | Data< TB, 3, TG > & | BoundaryLayerHeight, | |
Data< TS, 3, TG > & | SurfacePressure, | |||
Data< TP, 4, TG > & | Pressure, | |||
Data< T, 4, TG > & | CriticalRelativeHumidity, | |||
T | coeff0 = 2. , |
|||
T | coeff1 = sqrt(3.) , |
|||
T | BL_CRH = 0.98 | |||
) |
Computes the critical relative humidity.
Formula: inside the boundary layer, CriticalRelativeHumidity = BL_CRH and, above the boundary layer, CriticalRelativeHumidity = 1.0 - coeff0 * sig (1.0 - sig) * (1.0 + (sig - 0.5) * coeff1) where sig = Pressure / SurfacePressure.
BoundaryLayerHeight | boundary layer height (m). | |
SurfacePressure | surface pressure (Pa). | |
Pressure | pressure (Pa). | |
CriticalRelativeHumidity | (output) critical relative humidity. | |
coeff0 | coefficient (see the formula). Default: 2.0. | |
coeff1 | coefficient (see the formula). Default: sqrt(3.). | |
BL_CRH | critical relative humidity within the boundary layer. Default: 0.98. |
void AtmoData::ComputeCriticalRelativeHumidity | ( | Data< TS, 3, TG > & | SurfacePressure, | |
Data< TP, 4, TG > & | Pressure, | |||
Data< T, 4, TG > & | CriticalRelativeHumidity, | |||
T | coeff0 = 2. , |
|||
T | coeff1 = sqrt(3.) | |||
) |
Computes the critical relative humidity.
Formula: CriticalRelativeHumidity = 1.0 - coeff0 * sig (1.0 - sig) * (1.0 + (sig - 0.5) * coeff1) where sig = Pressure / SurfacePressure.
SurfacePressure | surface pressure (Pa). | |
Pressure | pressure (Pa). | |
CriticalRelativeHumidity | (output) critical relative humidity. | |
coeff0 | coefficient (see the formula). Default: 2.0. | |
coeff1 | coefficient (see the formula). Default: sqrt(3.). |
void AtmoData::ComputeCriticalRelativeHumidity_extended | ( | Data< TS, 3, TG > & | SurfacePressure, | |
Data< TP, 4, TG > & | Pressure, | |||
Data< T, 4, TG > & | CriticalRelativeHumidity, | |||
T | coeff0 = 1.1 , |
|||
T | coeff1 = sqrt(1.3) , |
|||
T | a0 = 0. , |
|||
T | a1 = 1.1 | |||
) |
Computes the critival relative humidity.
Extended formula: CriticalRelativeHumidity = 1.0 - coeff0 * sig^a0 (1.0 - sig)^a1 * (1.0 + (sig - 0.5) * coeff1) where sig = Pressure / SurfacePressure.
SurfacePressure | surface pressure (Pa). | |
Pressure | pressure (Pa). | |
CriticalRelativeHumidity | (output) critical relative humidity. | |
coeff0 | coefficient (see the formula). Default: 1.1. | |
coeff1 | coefficient (see the formula). Default: sqrt(1.3). | |
a0 | exponent (see the formula). Default: 0.0. | |
a1 | exponent (see the formula). Default: 1.1. |
void AtmoData::ComputeDeclination | ( | int | idate, | |
T | ut, | |||
T & | declination, | |||
T & | time_equation | |||
) |
Computes the sun declination and the equation of time at a given date.
Calculates solar declination and equation of time for a given date. Calculation is based on equations given in: Paltridge and Platt, Radiative Processes in Meteorology and Climatology, Elsevier, pp. 62,63, 1976. Fourier coefficients originally from: Spencer, J.W., 1971, Fourier series representation of the position of the sun, Search, 2:172. Note: This approximate program does not account for changes from year to year
idate | date in the form YYYYMMDD. | |
ut | local time in decimal UT (e.g., 16.25 means 15 minutes after 4 pm). | |
declination | (output) sun declination (radians). | |
time_equation | (output) equation of time (radians). |
void AtmoData::ComputeDeclination | ( | Date | date, | |
T | ut, | |||
T & | declination, | |||
T & | time_equation | |||
) |
Computes the sun declination and the equation of time at a given date.
Calculates solar declination and equation of time for a given date. Calculation is based on equations given in: Paltridge and Platt, Radiative Processes in Meteorology and Climatology, Elsevier, pp. 62,63, 1976. Fourier coefficients originally from: Spencer, J.W., 1971, Fourier series representation of the position of the sun, Search, 2:172. Note: This approximate program does not account for changes from year to year
date | date in the form YYYYMMDD. | |
ut | local time in decimal UT (e.g., 16.25 means 15 minutes after 4 pm). | |
declination | (output) sun declination (radians). | |
time_equation | (output) equation of time (radians). |
void AtmoData::ComputeHeight | ( | Data< TPS, 3, TG > & | SurfacePressure, | |
Data< TP, 4, TG > & | Pressure, | |||
Data< TT, 4, TG > & | Temperature, | |||
Grid< T > & | Height, | |||
T | g = 9.80665 , |
|||
T | r = 287.0 | |||
) |
Computes the altitudes from pressure and temperature fields.
Level heights are computed according to: Z_{k+1} = Z_k + (r * T_k / g) * log(P_k/P_{k+1}) where Z is the altitude, T the temperature, P the pressure, k the level index, r the molar gas constant for dry air and g the standard gravity.
SurfacePressure | surface pressure (Pa). | |
Pressure | pressure (Pa). | |
Temperature | temperature (K). | |
Height | (output) altitudes (m). | |
g | (optional) standard gravity. Default: 9.80665. | |
r | (optional) molar gas constant for dry air. Default: 287.0. |
void AtmoData::ComputeInterfHeight | ( | Data< TP, 4, TG > & | Pressure, | |
Data< TT, 4, TG > & | Temperature, | |||
Grid< T > & | Height, | |||
bool | ground_set = false , |
|||
T | g = 9.80665 , |
|||
T | r = 287.0 | |||
) |
Level heights are computed according to: Z_{k+1/2} = Z_{k-1/2} - (r * T_k / g) * log(P_{k+1/2}/P_{k-1/2}) where Z is the altitude, T the temperature, P the pressure, k the level index, r the molar gas constant for dry air and g the standard gravity.
Pressure | pressure (Pa). | |
Temperature | temperature (K). | |
Height | (output) altitudes (m). | |
g | (optional) standard gravity. Default: 9.80665. | |
r | (optional) molar gas constant for dry air. Default: 287.0. | |
ground_set | (optional) true if ground-level altitudes are set, false if they have to be set (they are set to zero in this case). Default: false. |
void AtmoData::ComputeLMO | ( | const Data< TU, 3, TG > & | FrictionModule, | |
const Data< TTp, 3, TG > & | SurfacePotentialTemperature, | |||
const Data< TTp, 4, TG > & | PotentialTemperature, | |||
const Data< T, 3, TG > & | SensibleHeat, | |||
const Data< T, 3, TG > & | Evaporation, | |||
Data< T, 3, TG > & | LMO, | |||
T | Ka = T(0.4) | |||
) |
Computes the Monin-Obukhov length.
FrictionModule | friction module. | |
SurfacePotentialTemperature | surface potential temperature. | |
PotentialTemperature | potential temperature. | |
SensibleHeat | sensible heat. | |
Evaporation | evaporation. | |
LMO | (output) Monin-Obukhov length. | |
Ka | Von Karman constant. Default: 0.4. |
void AtmoData::ComputeLouisKz | ( | Data< TU, 4, TG > & | U, | |
Data< TV, 4, TG > & | V, | |||
Data< TTp, 4, TG > & | Tp, | |||
Data< T, 4, TG > & | Kz, | |||
T | L0 = T(100) , |
|||
T | B = T(5) , |
|||
T | C = T(5) , |
|||
T | D = T(5) , |
|||
T | z0 = T(1) , |
|||
T | a = T(0.115) , |
|||
T | b = T(0.175) , |
|||
T | delta_z0 = T(0.01) , |
|||
T | Ka = T(0.4) | |||
) |
Computes vertical diffusion according to the Louis formula (1979).
U | zonal wind. | |
V | meridional wind. | |
Tp | potential temperature. | |
Kz | (output) vertical diffusion coefficients at the interfaces. | |
L0 | scale parameter. Default: 100. | |
B | parameter. Default: 5. | |
C | parameter. Default: 5. | |
D | parameter. Default: 5. | |
z0 | scale parameter. Default: 1. | |
a | parameter. Default: 0.115. | |
b | parameter. Default: 0.175. | |
delta_z0 | parameter. Default: 0.01. | |
Ka | Von Karman constant. Default: 0.4. |
The critical Richardson number is computed following Pielke (2002) and Nordeng (1986): Ric = a * (delta_z / delta_z0)^b.
void AtmoData::ComputeMiddleHeight | ( | Data< TP, 4, TG > & | Pressure, | |
Data< TT, 4, TG > & | Temperature, | |||
Grid< T > & | InterfHeight, | |||
Grid< T > & | MiddleHeight, | |||
T | g = 9.80665 , |
|||
T | r = 287.0 | |||
) |
Level heights are computed according to: Z_k = Z_{k-1/2} + a_k * r / g * T_k where Z is the altitude, T the temperature, k the level index, r the molar gas constant for dry air, g the standard gravity and: a_k = 1 - P_{k+1/2} / (P_{k-1/2} - P_{k+1/2}) * log(P_{k-1/2} / P_{k+1/2})
Pressure | pressure (Pa). | |
Temperature | temperature (Pa). | |
InterfHeight | (output) altitudes of interfaces (m). | |
MiddleHeight | (output) altitudes of middle points (m). | |
g | (optional) standard gravity. Default: 9.80665. | |
r | (optional) molar gas constant for dry air. Default: 287.0. |
void AtmoData::ComputeModule | ( | Data< TU, 3, TG > & | U, | |
Data< TV, 3, TG > & | V, | |||
Data< T, 3, TG > & | Module | |||
) |
Computes the module of a 2D-vectors field on the surface.
This function was initially dedicated to winds. In this case, zonal winds and meridional winds are provided and the module of the wind is computed (assuming that the vertical wind is zero). Winds may be provided in two ways. The first option is to provide winds on interfaces (along x for the zonal wind, along y for the meridional wind). The second option is simply to provide winds at nodes (i.e. where the module is defined).
U | first component of vectors. | |
V | second component of vectors. | |
Module | (output) surface module. |
void AtmoData::ComputeModule | ( | Data< TU, 4, TG > & | U, | |
Data< TV, 4, TG > & | V, | |||
Data< T, 3, TG > & | Module | |||
) |
Computes the module of a 2D-vectors field on the surface.
This function was initially dedicated to winds. In this case, zonal winds and meridional winds are provided and the module of the wind is computed (assuming that the vertical wind is zero). Winds may be provided in two ways. The first option is to provide winds on interfaces (along x for the zonal wind, along y for the meridional wind). The second option is simply to provide winds at nodes (i.e. where the module is defined).
U | first component of vectors. | |
V | second component of vectors. | |
Module | (output) surface module. |
void AtmoData::ComputeModule | ( | Data< TU, 4, TG > & | U, | |
Data< TV, 4, TG > & | V, | |||
Data< T, 4, TG > & | Module | |||
) |
Computes the module of a 2D-vectors field.
This function was initially dedicated to winds. In this case, zonal winds and meridional winds are provided and the module of the wind is computed (assuming that the vertical wind is zero). Winds may be provided in two ways. The first option is to provide winds on interfaces (along x for the zonal wind, along y for the meridional wind). The second option is simply to provide winds at nodes (i.e. where the module is defined).
U | first component of vectors. | |
V | second component of vectors. | |
Module | (output) module. |
string AtmoData::ComputePasquillStabilityClass | ( | T | surface_wind, | |
T | solar_radiation, | |||
T | cloudiness, | |||
bool | isday | |||
) |
Computes the Pasquill stability class (source: Turner 1969).
surface_wind | wind speed at 10 meters (m/s). | |
solar_radiation | solar radiation (W.m^{-2}). | |
cloudiness | cloudiness in [0, 1]. | |
isday | Boolean equal to true if it is daytime, false otherwise. |
void AtmoData::ComputePBLH_Richardson | ( | const Data< T, 4, TG > & | Richardson, | |
const Grid< TG > & | GridZ_interf, | |||
Data< T, 3, TG > & | BoundaryHeight, | |||
T | Ric = T(0.21) | |||
) |
Computes the boundary layer height based on Richardson number.
Richardson | Richardson number. | |
GridZ_interf | altitudes of interfaces (m). | |
BoundaryHeight | (output) boundary layer height. | |
Ric | critical Richardson number. Default: 0.21. |
void AtmoData::ComputePBLH_TM | ( | const Data< TT, 3, TG > & | SurfaceTemperature, | |
const Data< TTp, 3, TG > & | SurfacePotentialTemperature, | |||
const Data< TTp, 4, TG > & | PotentialTemperature, | |||
const Data< TU, 3, TG > & | FrictionModule, | |||
const Data< TU, 4, TG > & | WindModule, | |||
const Data< T, 3, TG > & | SensibleHeat, | |||
const Data< T, 3, TG > & | LMO, | |||
const Grid< TG > & | GridZ_interf, | |||
Data< T, 3, TG > & | BoundaryHeight, | |||
T | SBL = T(0.1) , |
|||
T | Ric = T(0.21) , |
|||
T | C = T(6.5) , |
|||
T | Ka = T(0.4) | |||
) |
Computes the boundary layer height according to Troen & Mahrt.
SurfaceTemperature | surface temperature. | |
SurfacePotentialTemperature | surface potential temperature. | |
PotentialTemperature | potential temperature. | |
FrictionModule | friction module. | |
WindModule | wind module. | |
SensibleHeat | sensible heat. | |
LMO | Monin-Obukhov length. | |
GridZ_interf | altitudes of interfaces (m). | |
BoundaryHeight | (output) boundary layer height. | |
SBL | Ratio between the SBL and the PBL. Default: 0.1. | |
Ric | critical Richardson number. Default: 0.21. | |
C | Troen & Mahrt coefficient. Default: 6.5. | |
Ka | Von Karman constant. Default: 0.4. |
void AtmoData::ComputePotentialTemperature | ( | Data< TT, 3, TG > & | Temperature, | |
Data< TP, 3, TG > & | Pressure, | |||
Data< T, 3, TG > & | PotentialTemperature, | |||
T | P0 = 101325. , |
|||
T | cp = 1005. , |
|||
T | r = 287.0 | |||
) |
Computes the potential temperature.
Formula: PotentialTemperature = Temperature * (Pressure / P0)^(-r/cp).
Temperature | temperature (or virtual temperature). | |
Pressure | pressure. | |
PotentialTemperature | (output) potential temperature. | |
P0 | (optional) standard pressure. Default: 101325 Pa. | |
cp | (optional) specific heat of dry air at constant pressure. Default: 1005 J.kg^{-1}.K^{-1}. | |
r | (optional) molar gas constant for air. Default: 287.0 J.kg^{-1}.K^{-1}. |
void AtmoData::ComputePotentialTemperature | ( | Data< TT, 4, TG > & | Temperature, | |
Data< TP, 4, TG > & | Pressure, | |||
Data< T, 4, TG > & | PotentialTemperature, | |||
T | P0 = 101325. , |
|||
T | cp = 1005. , |
|||
T | r = 287.0 | |||
) |
Computes the potential temperature.
Formula: PotentialTemperature = Temperature * (Pressure / P0)^(-r/cp).
Temperature | temperature (or virtual temperature). | |
Pressure | pressure. | |
PotentialTemperature | (output) potential temperature. | |
P0 | (optional) standard pressure. Default: 101325 Pa. | |
cp | (optional) specific heat of dry air at constant pressure. Default: 1005 J.kg^{-1}.K^{-1}. | |
r | (optional) molar gas constant for air. Default: 287.0 J.kg^{-1}.K^{-1}. |
void AtmoData::ComputePressure | ( | Data< Ta, 1, TG > & | alpha, | |
Data< Tb, 1, TG > & | beta, | |||
Data< TSP, 3, TG > & | SurfacePressure, | |||
Data< T, 4, TG > & | Pressure, | |||
T | P0 = 101325. | |||
) |
Computes the pressure from the surface pressure.
Formula: Pressure_k = alpha_k * P0 + beta_k * SurfacePressure, where k is the level index.
alpha | coefficients. | |
beta | coefficients. | |
SurfacePressure | surface pressure. | |
Pressure | (output) pressure. | |
P0 | (optional) standard pressure. Default: 101325 Pa. |
void AtmoData::ComputeRelativeHumidity | ( | Data< TS, 3, TG > & | SpecificHumidity, | |
Data< TT, 3, TG > & | Temperature, | |||
Data< TP, 3, TG > & | Pressure, | |||
Data< T, 3, TG > & | RelativeHumidity | |||
) |
Computes the relative humidity from the specific humidity.
SpecificHumidity | specific humidity (kg/kg). | |
Temperature | temperature (or virtual temperature) (K). | |
Pressure | pressure (Pa). | |
RelativeHumidity | (output) relative humidity. |
void AtmoData::ComputeRelativeHumidity | ( | Data< TS, 4, TG > & | SpecificHumidity, | |
Data< TT, 4, TG > & | Temperature, | |||
Data< TP, 4, TG > & | Pressure, | |||
Data< T, 4, TG > & | RelativeHumidity | |||
) |
Computes the relative humidity from the specific humidity.
SpecificHumidity | specific humidity (kg/kg). | |
Temperature | temperature (or virtual temperature) (K). | |
Pressure | pressure (Pa). | |
RelativeHumidity | (output) relative humidity. |
void AtmoData::ComputeRichardson | ( | Data< TR, 2, TG > & | Roughness, | |
Data< TU, 3, TG > & | WindModule, | |||
Data< TTp, 3, TG > & | SurfacePotentialTemperature, | |||
Data< TTp, 4, TG > & | PotentialTemperature, | |||
Data< T, 3, TG > & | SurfaceRichardson, | |||
T | wind_threshold = 0.001 | |||
) |
Computes the surface Richardson number.
Computes the surface Richardson number.
Roughness | roughness height. | |
WindModule | wind module in the first layer. | |
SurfacePotentialTemperature | surface potential temperature. | |
PotentialTemperature | potential temperature. | |
SurfaceRichardson | (output) surface Richardson number. | |
wind_threshold | (optional) minimum of the wind module. Default: 0.001. |
void AtmoData::ComputeRichardson | ( | Data< TU, 3, TG > & | WindModule, | |
Data< TTp, 3, TG > & | SurfacePotentialTemperature, | |||
Data< TTp, 4, TG > & | PotentialTemperature, | |||
Data< T, 3, TG > & | SurfaceRichardson, | |||
T | wind_threshold = 0.001 | |||
) |
Computes the surface Richardson number.
Computes the surface Richardson number.
WindModule | wind module in the first layer. | |
SurfacePotentialTemperature | surface potential temperature. | |
PotentialTemperature | potential temperature. | |
SurfaceRichardson | (output) surface Richardson number. | |
wind_threshold | (optional) minimum of the wind shear. Default: 0.001. |
void AtmoData::ComputeRichardson | ( | Data< TU, 4, TG > & | ZonalWind, | |
Data< TV, 4, TG > & | MeridionalWind, | |||
Data< TTp, 4, TG > & | PotentialTemperature, | |||
Data< T, 3, TG > & | Richardson, | |||
T | wind_threshold = 0.001 | |||
) |
Computes the Richardson number in the first layer.
Winds may be provided in two ways. The first option is to provide winds on interfaces (along x for the zonal wind, along y for the meridional wind). The second option is simply to provide winds at nodes (i.e. where the potential temperature and the Richardson number are defined).
ZonalWind | zonal wind. | |
MeridionalWind | meridional wind. | |
PotentialTemperature | potential temperature. | |
Richardson | (output) Richardson number in the first layer. | |
wind_threshold | (optional) minimum of the wind shear. Default:0.001. |
void AtmoData::ComputeRichardson | ( | Data< TU, 4, TG > & | ZonalWind, | |
Data< TV, 4, TG > & | MeridionalWind, | |||
Data< TTp, 4, TG > & | PotentialTemperature, | |||
Data< T, 4, TG > & | Richardson, | |||
T | wind_threshold = 0.001 | |||
) |
Computes the Richardson number.
Winds may be provided in two ways. The first option is to provide winds on interfaces (along x for the zonal wind, along y for the meridional wind). The second option is simply to provide winds at nodes (i.e. where the potential temperature and the Richardson number are defined).
ZonalWind | zonal wind. | |
MeridionalWind | meridional wind. | |
PotentialTemperature | potential temperature. | |
Richardson | (output) Richardson number. | |
wind_threshold | (optional) minimum of the wind shear. Default:0.001. |
void AtmoData::ComputeSaturationHumidity | ( | Data< TT, 4, TG > & | Temperature, | |
Data< TP, 4, TG > & | Pressure, | |||
Data< T, 4, TG > & | SaturationHumidity | |||
) |
Computes the saturation humidity.
Temperature | temperature (or virtual temperature) (K). | |
Pressure | pressure (Pa). | |
SaturationHumidity | (output) saturation humidity (kg/kg). |
void AtmoData::ComputeSaturationHumidity | ( | Data< TT, 3, TG > & | Temperature, | |
Data< TP, 3, TG > & | Pressure, | |||
Data< T, 3, TG > & | SaturationHumidity | |||
) |
Computes the saturation humidity.
Temperature | temperature (or virtual temperature) (K). | |
Pressure | pressure (Pa). | |
SaturationHumidity | (output) saturation humidity (kg/kg). |
void AtmoData::ComputeSunHour | ( | T | lon, | |
T | lat, | |||
int | idate, | |||
T & | sunrise_hour, | |||
T & | sunset_hour | |||
) |
Computes the hours of sunrise and sunset at a given location and date.
lon | longitude of location (degrees). | |
lat | latitude of location (degrees). | |
idate | date in the form YYYYMMDD. | |
sunrise_hour | (output) hour of sunrise in decimal UT (greenwich mean time). | |
sunset_hour | (output) hour of sunset in decimal UT (greenwich mean time). |
T AtmoData::ComputeSunriseHour | ( | T | lon, | |
T | lat, | |||
int | idate | |||
) |
Computes the hour of sunrise at a given location and date.
lon | longitude of location (degrees). | |
lat | latitude of location (degrees). | |
idate | date in the form YYYYMMDD. |
T AtmoData::ComputeSunsetHour | ( | T | lon, | |
T | lat, | |||
int | idate | |||
) |
Computes the hour of sunset at a given location and date.
lon | longitude of location (degrees). | |
lat | latitude of location (degrees). | |
idate | date in the form YYYYMMDD. |
void AtmoData::ComputeSurfaceHumidity_diag | ( | Data< TH, 4, TG > & | SpecificHumidity, | |
Data< TS, 3, TG > & | SaturationHumidity, | |||
Data< TW, 3, TG > & | SoilWater, | |||
Data< TL, 3, TG > & | LUC, | |||
int | sea_index, | |||
Data< T, 3, TG > & | SurfaceHumidity, | |||
T | veg = 1.0 , |
|||
T | theta_cap = 0.323 | |||
) |
Computes the surface specific humidity.
SpecificHumidity | specific humidity (kg/kg). | |
SaturationHumidity | saturation humidity (kg/kg). | |
SoilWater | volumetric soil water content (m^3/m^3). | |
LUC | land use coverage in format Nc x Ny x Nx where Nc is the number of land use categories. LUC(c, j, i) is the relative surface (in [0, 1]) of the category c in the cell (j, i). | |
sea_index | index of the sea category in LUC. | |
SurfaceHumidity | (output) surface specific humidity (kg/kg). | |
veg | (optional) the vegetation proportion (in [0, 1]) on the ground. Default: 1.0. | |
theta_cap | (optional) soil moisture at field capacity (m^3/m^3). Default: 0.323 m^3/m^3. |
void AtmoData::ComputeTemperature | ( | Data< TT, 3, TG > & | PotentialTemperature, | |
Data< TP, 3, TG > & | Pressure, | |||
Data< T, 3, TG > & | Temperature, | |||
T | P0 = 101325. , |
|||
T | cp = 1005. , |
|||
T | r = 287.0 | |||
) |
Computes the temperature.
Formula: Temperature = PotentialTemperature * (Pressure / P0)^(r/cp).
PotentialTemperature | potential temperature. | |
Pressure | pressure. | |
Temperature | (output) temperature (or virtual temperature). | |
P0 | (optional) standard pressure. Default: 101325 Pa. | |
cp | (optional) specific heat of dry air at constant pressure. Default: 1005 J.kg^{-1}.K^{-1}. | |
r | (optional) molar gas constant for air. Default: 287.0 J.kg^{-1}.K^{-1}. |
void AtmoData::ComputeTemperature | ( | Data< TT, 4, TG > & | PotentialTemperature, | |
Data< TP, 4, TG > & | Pressure, | |||
Data< T, 4, TG > & | Temperature, | |||
T | P0 = 101325. , |
|||
T | cp = 1005. , |
|||
T | r = 287.0 | |||
) |
Computes the temperature.
Formula: Temperature = PotentialTemperature * (Pressure / P0)^(r/cp).
PotentialTemperature | potential temperature. | |
Pressure | pressure. | |
Temperature | (output) temperature (or virtual temperature). | |
P0 | (optional) standard pressure. Default: 101325 Pa. | |
cp | (optional) specific heat of dry air at constant pressure. Default: 1005 J.kg^{-1}.K^{-1}. | |
r | (optional) molar gas constant for air. Default: 287.0 J.kg^{-1}.K^{-1}. |
void AtmoData::ComputeTM_Kz | ( | const Data< TT, 3, TG > & | SurfaceTemperature, | |
const Data< TU, 3, TG > & | FrictionModule, | |||
const Data< T, 3, TG > & | SensibleHeat, | |||
const Data< T, 3, TG > & | LMO, | |||
const Data< T, 3, TG > & | BoundaryHeight, | |||
Data< T, 4, TG > & | Kz, | |||
bool | TM_stable = true , |
|||
T | SBL = T(0.1) , |
|||
T | p = T(2.0) , |
|||
T | Ka = T(0.4) | |||
) |
Computes vertical diffusion according to the Troen and Mahrt (1986).
SurfaceTemperature | surface temperature. | |
FrictionModule | friction module. | |
SensibleHeat | sensible heat. | |
LMO | Monin-Obukhov length. | |
BoundaryHeight | boundary layer height. | |
Kz | (output) vertical diffusion coefficients at the interfaces. | |
TM_stable | if set to 'false', Troen and Mahrt parameterization only applied in unstable boundary layer. Default: true. | |
SBL | Ratio between the SBL and the PBL. Default: 0.1. | |
p | Troen & Mahrt coefficient. Default: 2.0. | |
Ka | Von Karman constant. Default: 0.4. |
TC AtmoData::ComputeTotalCloudiness | ( | TLC | low_cloudiness, | |
TLC | medium_cloudiness, | |||
TLC | high_cloudiness | |||
) | [inline] |
Computes the total cloudiness at a given point.
low_cloudiness | low cloudiness in [0, 1]. | |
medium_cloudiness | medium cloudiness in [0, 1]. | |
high_cloudiness | high cloudiness in [0, 1]. |
void AtmoData::ComputeTotalCloudiness | ( | Data< TLC, 3, T > & | LowCloudiness, | |
Data< TLC, 3, T > & | MediumCloudiness, | |||
Data< TLC, 3, T > & | HighCloudiness, | |||
Data< TC, 3, T > & | Cloudiness | |||
) |
Computes the total cloudiness.
LowCloudiness | low cloudiness in [0, 1]. | |
MediumCloudiness | medium cloudiness in [0, 1]. | |
HighCloudiness | high cloudiness in [0, 1]. | |
Cloudiness | (output) total cloudiness in [0, 1]. |
void AtmoData::ComputeVerticalDistribution | ( | const Data< real, 2 > & | vertical_distribution_in, | |
const RegularGrid< real > & | GridZ_interf_in, | |||
const RegularGrid< real > & | GridZ_interf_out, | |||
Data< real, 2 > & | vertical_distribution_out | |||
) |
Computes vertical distribution factors.
Maps the vertical distribution 'vertical_distribution_in' given on the vertical mesh 'GridZ_interf_in' to the output mesh 'GridZ_interf_out'.
vertical_distribution_in | vertical distribution on input grid. | |
GridZ_interf_in | altitudes of interfaces of input grid (m). | |
GridZ_interf_out | altitudes of interfaces of output grid (m). | |
vertical_distribution_out | (output) vertical distribution on output grid. |
void AtmoData::ComputeVirtualTemperature | ( | Data< TT, 4, TG > & | Temperature, | |
Data< TH, 4, TG > & | SpecificHumidity, | |||
Data< T, 4, TG > & | VirtualTemperature, | |||
T | c = 0.608 | |||
) |
Computes the virtual temperature.
The virtual temperature is computed according to: T_v = (1 + c * q) * T where T_s is the virtual temperature, q the specific humidity, T the temperature and c a coefficient (0.608, usually).
Temperature | temperature (K). | |
SpecificHumidity | specific humidity (kg/kg). | |
VirtualTemperature | (output) virtual temperature (K). | |
c | (optional) coefficient. Default: 0.608. |
T AtmoData::ComputeWesely | ( | T | surface_temperature, | |
T | solar_radiation, | |||
string | species, | |||
T | reactivity, | |||
T | diffusivity, | |||
T | Henry, | |||
T | Ri, | |||
T | Rlu, | |||
T | Rac, | |||
T | RgsS, | |||
T | RgsO, | |||
T | RclS, | |||
T | RclO, | |||
T | limit = 1.e10 , |
|||
T | D_H2O = 0.25 | |||
) | [inline] |
surface_temperature | surface temperature (K). | |
solar_radiation | solar radiation (W.m^{-2}). | |
species | species name, useful only if species=="O3" or species=="SO2". | |
reactivity | reactivity factor for the species. | |
diffusivity | molecular diffusivity for the species in air. | |
Henry | Henry constant for the species. | |
Ri | minimum bulk canopy stomatal resistance for water vapour. | |
Rlu | resistance of the outer surfaces in the upper canopy. | |
Rac | in-canopy aerodynamic resistance. | |
RgsS | soil resistance for SO2. | |
RgsO | soil resistance for O3. | |
RclS | resistance due to exposed surface in the lower canopy, for SO2. | |
RclO | resistance due to exposed surface in the lower canopy, for O3. | |
limit | (optional) upper limit for resistances. Default: 1.e10. | |
D_H2O | (optional) molecular diffusivity for water vapor. Default: 0.25. |
T_ref AtmoData::Corr | ( | Data< T_ref, N, TG_ref > | data_ref, | |
Data< T_comp, N, TG_comp > & | data_comp, | |||
Function_Base< T_ref, bool > & | test | |||
) |
Computes the correlation between two data sets.
data_ref | reference data. | |
data_comp | data to be compared with 'data_ref'. | |
test | boolean function with two parameters; the i-th elements of 'data_ref' and 'data_comp' are taken into account if 'test(data_ref(i), data_comp(i))' is true. |
void AtmoData::Decumulate | ( | Data< T, N, TG > & | data, | |
int | length, | |||
int | start = 0 | |||
) |
Decumulates data.
'data' stores values cumulated in time, where the time is the first dimension.
data | data to be decumulated. | |
length | number of time steps over which data is cumulated. | |
start | (optional) index of the first complete cycle. Default: 0. |
void AtmoData::DividesByHeights | ( | const RegularGrid< real > & | GridZ_interf_out, | |
Data< real, 2 > & | vertical_distribution_out | |||
) |
Divides the vertical distribution by the heights.
GridZ_interf_out | heights of the output grid. | |
vertical_distribution_out | (output) vertical distribution on the output grid indexed by the activity sector and the height. |
void AtmoData::EmepToLatLon | ( | const Data< int, 2, real > & | LUC, | |
const real | Ratio_urb, | |||
const real | Ratio_for, | |||
const real | Ratio_oth, | |||
const Data< int, 2, real > & | Nurb_emep, | |||
const Data< int, 2, real > & | Nwat_emep, | |||
const Data< int, 2, real > & | Nfor_emep, | |||
const Data< int, 2, real > & | Noth_emep, | |||
const Data< int, 2, real > & | Ntot_polair, | |||
Data< list< EmepCountryEmission< real > >, 4, real > & | Emis_land, | |||
Data< list< EmepCountryEmission< real > >, 4, real > & | Emis_water, | |||
Data< list< EmepCountryEmission< real > >, 4, real > & | Emis_out | |||
) |
Computes emissions on a latitude-longitude grid.
Computes emissions on a latitude-longitude grid (like Polair3D grid) on the basis of EMEP inventory and weights associated with aggregated (in urban, forest and miscellaneous) LUC categories.
LUC | land use coverage. | |
Ratio_urb | weight of urban cells. | |
Ratio_for | weight of forest cells. | |
Ratio_oth | weight of other cells. | |
Nurb_emep | number of urban LUC cells in EMEP cells. | |
Nwat_emep | number of water LUC cells in EMEP cells. | |
Nfor_emep | number of forest LUC cells in EMEP cells. | |
Noth_emep | number of other LUC cells in EMEP cells. | |
Ntot_polair | total number of LUC cells in each Polair3D cell. | |
Emis_land | emissions over land (Tons). | |
Emis_water | emissions over water (Tons). | |
Emis_out | (output) output emissions (Tons . m^{-2}) for a given day. |
void AtmoData::GetTemporalFactors | ( | string | input_file, | |
Data< real, 3 > & | Factors | |||
) |
Reads temporal factors from a file.
Reads monthly profiles for a given month or daily profiles for a week. In the file, each line first stores the EMEP country code, then the SNAP sector and finally the factors for the 12 months or the 7 weekdays. If no factor is available for a given country and a given SNAP sector, it is set to 1.
input_file | input file. | |
Factors | (output) temporal factors. |
void AtmoData::GridCorrespondences | ( | const Data< int, 2, real > & | LUC, | |
Data< int, 2, real > & | Nurb_emep, | |||
Data< int, 2, real > & | Nwat_emep, | |||
Data< int, 2, real > & | Nfor_emep, | |||
Data< int, 2, real > & | Noth_emep, | |||
Data< int, 2, real > & | Ntot_polair | |||
) |
Correspondence between Emep and Polair3D grids.
Computes (1) the number of urban, water, forest and other types of LUC that are included in each EMEP cell, and (2) the total number of LUC cells included in each Polair3D cell.
LUC | land use coverage on GLCF categories. | |
Nurb_emep | (output) number of urban LUC cells in EMEP cells. | |
Nwat_emep | (output) number of water LUC cells in EMEP cells. | |
Nfor_emep | (output) number of forest LUC cells in EMEP cells. | |
Noth_emep | (output) number of other LUC cells in EMEP cells. | |
Ntot_polair | (output) total number of LUC cells in each Polair3D cell. |
bool AtmoData::IsDay | ( | T | lon, | |
T | lat, | |||
Date | date | |||
) |
Checks whether it is nighttime or daytime at a given location and time.
lon | longitude of location (degrees). | |
lat | latitude of location (degrees). | |
date | date and time (hour and minutes) in format Date. |
bool AtmoData::IsDay | ( | T | lon, | |
T | lat, | |||
int | idate, | |||
T | ut | |||
) |
Checks whether it is nighttime or daytime at a given location and time.
lon | longitude of location (degrees). | |
lat | latitude of location (degrees). | |
idate | date in the form YYYYMMDD. | |
ut | local time in decimal UT (e.g., 16.25 means 15 minutes after 4 pm). |
T AtmoData::max | ( | T | x, | |
T0 | y | |||
) | [inline] |
Returns the maximum of two elements.
x | first number. | |
y | second number. |
T AtmoData::min | ( | T | x, | |
T0 | y | |||
) | [inline] |
Returns the minimum of two elements.
x | first number. | |
y | second number. |
T_ref AtmoData::NGE | ( | Data< T_ref, N, TG_ref > | data_ref, | |
Data< T_comp, N, TG_comp > & | data_comp, | |||
Function_Base< T_ref, bool > & | test | |||
) |
Computes the normalized gross error between two data sets.
data_ref | reference data. | |
data_comp | data to be compared with 'data_ref'. | |
test | boolean function with two parameters; the i-th elements of 'data_ref' and 'data_comp' are taken into account if 'test(data_ref(i), data_comp(i))' is true. |
void AtmoData::ReadEmep | ( | Date | date, | |
const vector< string > & | Sp_emis_names, | |||
string | input_directory, | |||
string | input_file, | |||
const Data< real, 3 > & | MonthlyFactors, | |||
const Data< real, 3 > & | DailyFactors, | |||
const real & | deposition_factor_nh3, | |||
Data< list< EmepCountryEmission< real > >, 4, real > & | Emis_land, | |||
Data< list< EmepCountryEmission< real > >, 4, real > & | Emis_water | |||
) |
Reads Emep standard files and applies monthly and daily factors.
First reads Emep standard files located in the input directory (format <species>.dat). In these files, the Emep emissions (Tons) correspond to a given year, and are provided for European countries and for each SNAP. Then applies monthly and daily coefficients in order to provide emissions over land and over water for a given day.
date | date. | |
Sp_emis_names | inventory emission species names. | |
input_directory | input directory. | |
input_file | input file. | |
MonthlyFactors | monthly factors indexed by the country, the sector and the month. | |
DailyFactors | daily factors indexed by the country, the sector and the day. | |
deposition_factor_nh3 | local deposition factor for NH3 (range 0-1). | |
Emis_land | (output) emissions over land (Tons) for a given day. | |
Emis_water | (output) emissions over water (Tons) for a given day. |
void AtmoData::ReadModifiedEmep | ( | Date | date, | |
const vector< string > & | Sp_emis_names, | |||
string | input_directory, | |||
const Data< real, 3 > & | MonthlyFactors, | |||
const Data< real, 3 > & | DailyFactors, | |||
const real & | deposition_factor_nh3, | |||
Data< list< EmepCountryEmission< real > >, 4, real > & | Emis_land, | |||
Data< list< EmepCountryEmission< real > >, 4, real > & | Emis_water | |||
) |
Reads Emep modified files and applies monthly and daily factors.
First reads Emep modified files located in the input directory (format <species>.dat). In these files, the Emep emissions (Tons) correspond to a given year, and are provided for European countries and for each SNAP. Then applies monthly and daily coefficients in order to provide emissions over land and over water for a given day.
date | date. | |
Sp_emis_names | inventory emission species names. | |
input_directory | input directory. | |
MonthlyFactors | monthly factors indexed by the country, the sector and the month. | |
DailyFactors | daily factors indexed by the country, the sector and the day. | |
deposition_factor_nh3 | local deposition factor for NH3 (range 0-1). | |
Emis_land | (output) emissions over land (Tons) for a given day. | |
Emis_water | (output) emissions over water (Tons) for a given day. |
T_ref AtmoData::RelativeRMS | ( | Data< T_ref, N, TG_ref > | data_ref, | |
Data< T_comp, N, TG_comp > & | data_comp, | |||
Function_Base< T_ref, bool > & | test | |||
) |
Computes the relative root mean square between two data sets.
data_ref | reference data. | |
data_comp | data to be compared with 'data_ref'. | |
test | boolean function with two parameters; the i-th elements of 'data_ref' and 'data_comp' are taken into account if 'test(data_ref(i), data_comp(i))' is true. |
T_ref AtmoData::RMS | ( | Data< T_ref, N, TG_ref > | data_ref, | |
Data< T_comp, N, TG_comp > & | data_comp, | |||
Function_Base< T_ref, bool > & | test | |||
) |
Computes the root mean square between two data sets.
data_ref | reference data. | |
data_comp | data to be compared with 'data_ref'. | |
test | boolean function with two parameters; the i-th elements of 'data_ref' and 'data_comp' are taken into account if 'test(data_ref(i), data_comp(i))' is true. |
void AtmoData::SpeciationAggregation | ( | const vector< string > & | Sp_emis_names, | |
string | aggregation_matrix, | |||
string | speciation_directory, | |||
vector< string > & | Sp_model_names, | |||
Data< real, 3 > & | Species_factor | |||
) |
Computes speciation/aggregation factors.
Computes the factor for each sector to be applied to inventory species emissions in order to get model species emissions. For NOX, the factor takes into account the fact that NOX emissions are given in NO2 equivalent units. First, One file per inventory species is read for speciation in the speciation directory (format "<species>.dat") and provides percentages to split inventory species emissions into real-species emissions. Then, an aggregation file is read. It contains a matrix that gives molecular weights, reactivities and aggregation coefficients for real (lines) and model (columns) species. VOCs aggregation coefficients are computed according to Middleton et al. (1990) with the integral of [OH] set to 1.0.
Sp_emis_names | inventory species names. | |
aggregation_matrix | aggregation-matrix file. | |
speciation_directory | speciation directory. | |
Sp_model_names | (output) model species names. | |
Species_factor | (output) species factors indexed by the model species, the inventory species and the sector. |
Reads model species names, molecular weight and reactivity
void AtmoData::TransformMeridionalWind | ( | Data< T, 4, TG > & | MeridionalWind | ) |
Transforms the meridional wind for Polair.
Formula: MeridionalWind = MeridionalWind * cos(latitude).
MeridionalWind | meridional wind. |
void AtmoData::TransformZonalWind | ( | Data< T, 4, TG > & | ZonalWind | ) |
Transforms the zonal wind for Polair.
Formula: ZonalWind = ZonalWind / cos(latitude).
ZonalWind | zonal wind. |
T AtmoData::ZenithAngle | ( | T | lon, | |
T | lat, | |||
Date | date, | |||
T | ut | |||
) |
Calculates solar zenith angle for a given time and location. Calculation is based on equations given in: Paltridge and Platt, Radiative Processes in Meteorology and Climatology, Elsevier, pp. 62,63, 1976. Fourier coefficients originally from: Spencer, J.W., 1971, Fourier series representation of the position of the sun, Search, 2:172. Note: This approximate program does not account for changes from year to year.
lon | longitude of location (degrees). | |
lat | latitude of location (degrees). | |
date | date in the form YYYYMMDD. | |
ut | local time in decimal UT (e.g., 16.25 means 15 minutes after 4 pm). |