ILWR all sky parametrization.
Using air temperature (TA) and relative humidity (RH) and optionnally cloud transmissivity (TAU_CLD), this offers the choice of several all-sky parametrizations, with the following arguments:
If no cloud transmissivity is provided in the data, it is calculated from the solar index (ratio of measured iswr to potential iswr, therefore using the current location (lat, lon, altitude) and ISWR to parametrize the cloud cover). This relies on (Kasten and Czeplak, 1980) by default except for Crawford and Lhomme that provide their own parametrizations (it can be forced through the TauCLDGenerator options). The last evaluation of cloud transmissivity is used all along during the times when no ISWR is available (as it is night, or the station stands in the shade or the ISWR measurement is missing) and the last valid value is not too old (ie. no more than 1 day old). The example below gives an example use, providing a file with the horizons for the stations (see TauCLDGenerator) but not relying on a DEM. Of course, it is possible to use the generator without any DEM or horizon file!
Finally, it is recommended to also use a clear sky generator (declared after this one) for the case of no available short wave measurement (by declaring the ClearSky generator after AllSky).
The graph below shows the comparison between measured and modeled ILWR depending on the chosen parametrization. The measured data (ISWR, TA, RH and the reference ILWR) comes from the Weissfluhjoch *WFJ AWS (2691m, Davos, Switzerland) for the 2010-08-01 – 2019-08-01 period with half-hourly resolution. The data has been binned every 5 W/m², the black dots represent the average of the bin, the greay area contains every data point (ie it shows the minimum and maximum data) while the brown area is defined as average±σ.
#include <AllSkyLWGenerator.h>
Public Member Functions | |
AllSkyLWGenerator (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &i_algo, const std::string &i_section, const double &TZ, const Config &i_cfg) | |
bool | generate (const size_t ¶m, MeteoData &md, const std::vector< MeteoData > &vecMeteo) |
bool | create (const size_t ¶m, const size_t &ii_min, const size_t &ii_max, std::vector< MeteoData > &vecMeteo) |
Fill one time series of MeteoData for one station. More... | |
Public Member Functions inherited from mio::TauCLDGenerator | |
TauCLDGenerator (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &i_algo, const std::string &i_section, const double &TZ, const Config &i_cfg) | |
~TauCLDGenerator () | |
bool | generate (const size_t ¶m, MeteoData &md, const std::vector< MeteoData > &vecMeteo) |
bool | create (const size_t ¶m, const size_t &ii_min, const size_t &ii_max, std::vector< MeteoData > &vecMeteo) |
Fill one time series of MeteoData for one station. More... | |
Public Member Functions inherited from mio::GeneratorAlgorithm | |
virtual | ~GeneratorAlgorithm () |
virtual bool | generate (const size_t ¶m, MeteoData &md, const std::vector< MeteoData > &vecMeteo)=0 |
virtual bool | create (const size_t ¶m, const size_t &ii_min, const size_t &ii_max, std::vector< MeteoData > &vecMeteo)=0 |
Fill one time series of MeteoData for one station. More... | |
bool | skipStation (const std::string &station_id) const |
Should this station be skipped, based on user-provided station ID restrictions? More... | |
bool | skipTimeStep (const Date &dt) const |
Should this timestep be skipped, based on user-provided time restrictions? More... | |
bool | skipHeight (const double &height) const |
std::vector< DateRange > | getTimeRestrictions () const |
std::string | getAlgo () const |
Additional Inherited Members | |
Public Types inherited from mio::TauCLDGenerator | |
enum | clf_parametrization { DEFAULT , CLF_LHOMME , KASTEN , CLF_CRAWFORD } |
Protected Types inherited from mio::TauCLDGenerator | |
typedef struct CLOUDCACHE | cloudCache |
Protected Member Functions inherited from mio::TauCLDGenerator | |
double | interpolateCloudiness (const std::string &station_hash, const double &julian_gmt) const |
double | getCloudiness (const MeteoData &md) |
Return the atmospheric cloudiness. More... | |
double | computeCloudiness (const MeteoData &md, bool &is_night) |
Compute the atmospheric cloudiness from the available measurements. More... | |
double | getClearness (const double &cloudiness) const |
Compute the clearness index from an atmospheric cloudiness value. More... | |
double | getHorizon (const MeteoData &md, const double &sun_azi) |
Protected Member Functions inherited from mio::GeneratorAlgorithm | |
GeneratorAlgorithm (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &i_algo, const std::string &i_section, const double &TZ) | |
protected constructor only to be called by children More... | |
virtual void | parse_args (const std::vector< std::pair< std::string, std::string > > &) |
void | initHeightRestrictions (const std::vector< std::pair< std::string, std::string > > vecArgs) |
Static Protected Member Functions inherited from mio::TauCLDGenerator | |
static std::vector< std::pair< double, double > > | computeMask (const DEMObject &i_dem, const StationData &sd) |
Static Protected Member Functions inherited from mio::GeneratorAlgorithm | |
static std::set< std::string > | initStationSet (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &keyword) |
Protected Attributes inherited from mio::TauCLDGenerator | |
std::map< std::string, cloudCache > | last_cloudiness |
std::map< std::string, std::vector< std::pair< double, double > > > | masks |
std::string | horizons_outfile |
const Config & | cfg |
DEMObject | dem |
SunObject | sun |
clf_parametrization | cloudiness_model |
bool | use_rswr |
bool | use_rad_threshold |
bool | write_mask_out |
bool | use_horizons |
bool | from_dem |
Protected Attributes inherited from mio::GeneratorAlgorithm | |
const std::vector< DateRange > | time_restrictions |
const std::set< std::string > | excluded_stations |
const std::set< std::string > | kept_stations |
std::set< double > | included_heights |
std::set< double > | excluded_heights |
bool | all_heights |
const std::string | algo |
const std::string | section |
Static Protected Attributes inherited from mio::GeneratorAlgorithm | |
static const double | soil_albedo = .23 |
static const double | snow_albedo = .85 |
static const double | snow_thresh = .1 |
static const double | default_height = IOUtils::nodata |
|
inline |
|
virtual |
Fill one time series of MeteoData for one station.
This is used by the dataCreators to create a new parameter in one go for the whole timeseries.
[in] | param | meteo parameter to generate |
[in] | ii_min | minimum index to apply it to in vecMeteo |
[in] | ii_max | maximum index to apply it to in vecMeteo |
[in] | vecMeteo | meteo timeseries to process |
Implements mio::GeneratorAlgorithm.
|
virtual |
Implements mio::GeneratorAlgorithm.