Weather Generator 1.1.0
Daily weather for any place and date from climate normals for C++23
Loading...
Searching...
No Matches
dasmig::climate_normals Struct Reference

The monthly climate normals of a place (climate_at()). More...

#include <weathergen.hpp>

Public Member Functions

void to_json (core::json_writer &w) const
 Write the normals as a JSON object.
 
std::string to_json () const
 The normals as a JSON document.
 

Public Attributes

std::string cell
 The climate cell's key (its block centre, or a layer's own key).
 
double latitude {}
 The cell's point, degrees north (a block's land centroid).
 
double longitude {}
 The cell's point, degrees east.
 
double elevation {}
 The cell's mean elevation, metres.
 
std::array< double, 12 > tmean {}
 Mean temperature, °C.
 
std::array< double, 12 > dtr {}
 Mean diurnal range (Tmax - Tmin), °C.
 
std::array< double, 12 > precipitation {}
 Precipitation, mm per month.
 
std::array< double, 12 > wet_days {}
 Days with at least 0.1 mm.
 
std::array< double, 12 > humidity {}
 Mean relative humidity, %.
 
std::array< double, 12 > cloud {}
 Cloud cover, %.
 
std::array< double, 12 > wind {}
 Mean wind speed at 10 m, m/s.
 

Detailed Description

The monthly climate normals of a place (climate_at()).

Twelve values per element, January to December, as loaded: the means the daily weather is drawn around.

Definition at line 266 of file weathergen.hpp.

Member Function Documentation

◆ to_json() [1/2]

std::string dasmig::climate_normals::to_json ( ) const
inline

The normals as a JSON document.

Returns
Compact JSON.

Definition at line 307 of file weathergen.hpp.

◆ to_json() [2/2]

void dasmig::climate_normals::to_json ( core::json_writer &  w) const
inline

Write the normals as a JSON object.

Parameters
wWriter positioned where a value is allowed.

Definition at line 282 of file weathergen.hpp.

Member Data Documentation

◆ cell

std::string dasmig::climate_normals::cell

The climate cell's key (its block centre, or a layer's own key).

Definition at line 268 of file weathergen.hpp.

◆ cloud

std::array<double, 12> dasmig::climate_normals::cloud {}

Cloud cover, %.

Definition at line 277 of file weathergen.hpp.

◆ dtr

std::array<double, 12> dasmig::climate_normals::dtr {}

Mean diurnal range (Tmax - Tmin), °C.

Definition at line 273 of file weathergen.hpp.

◆ elevation

double dasmig::climate_normals::elevation {}

The cell's mean elevation, metres.

Definition at line 271 of file weathergen.hpp.

◆ humidity

std::array<double, 12> dasmig::climate_normals::humidity {}

Mean relative humidity, %.

Definition at line 276 of file weathergen.hpp.

◆ latitude

double dasmig::climate_normals::latitude {}

The cell's point, degrees north (a block's land centroid).

Definition at line 269 of file weathergen.hpp.

◆ longitude

double dasmig::climate_normals::longitude {}

The cell's point, degrees east.

Definition at line 270 of file weathergen.hpp.

◆ precipitation

std::array<double, 12> dasmig::climate_normals::precipitation {}

Precipitation, mm per month.

Definition at line 274 of file weathergen.hpp.

◆ tmean

std::array<double, 12> dasmig::climate_normals::tmean {}

Mean temperature, °C.

Definition at line 272 of file weathergen.hpp.

◆ wet_days

std::array<double, 12> dasmig::climate_normals::wet_days {}

Days with at least 0.1 mm.

Definition at line 275 of file weathergen.hpp.

◆ wind

std::array<double, 12> dasmig::climate_normals::wind {}

Mean wind speed at 10 m, m/s.

Definition at line 278 of file weathergen.hpp.


The documentation for this struct was generated from the following file: