Commit afac5360 authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Merge branch 'gfs-surface' into 'master'

Add surface calculation if HGTS is requested from gfsfile.

See merge request !29
parents ca11005b cc09bf8f
Pipeline #12756 passed with stages
in 9 minutes and 2 seconds
......@@ -799,6 +799,14 @@ std::vector<std::vector<float>> GFSFile::query(float lat, float lon, int month,
// initialize space for results vector
results[ll] = std::vector<float>(columns.size(), 0.0f);
// if "HGTS" has been requested add level as the default HGTS
auto hIt = std::find(columns.begin(), columns.end(), "HGTS");
if (hIt != columns.end())
{
results[ll][hIt - columns.begin()] =
hypsometric(msle, plevel, temp) - surfaceAltitude;
}
// check for time
auto timeIt = std::find(columns.begin(), columns.end(), "TIME");
if (timeIt != columns.end())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment