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

Add surface calculation if HGTS is requested from gfsfile.

parent ca11005b
Pipeline #12755 passed with stages
in 8 minutes and 49 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())
Supports Markdown
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