Commit ac74e198 authored by Purves, Murray's avatar Purves, Murray
Browse files

Fixing definition of surface pressure and upper height variables

parent 4ae1cbc4
......@@ -451,7 +451,6 @@ int main(int argc, char **argv)
"VWND"};
thisIndexHeader.var_names.push_back(surfaceVarNames);
for (size_t level = 1; level < inputPressures.size(); ++level)
{
thisIndexHeader.var_names.push_back(varNames);
......@@ -480,9 +479,8 @@ int main(int argc, char **argv)
if (level == 0)
{
thisRecordHeader.kvar = "PRSS";
// Add ground elevation to height (default is 0)
float thisHeight = inputHeights[level] + groundElevation;
thisRecordHeader.var1 = thisHeight;
float groundPressure = inputPressures[level];
thisRecordHeader.var1 = groundPressure;
std::vector<std::vector<float>> thisData(
numberGridCells, std::vector<float>(numberGridCells, thisHeight));
std::cout << " pressure...";
......@@ -494,7 +492,7 @@ int main(int argc, char **argv)
else
{
thisRecordHeader.kvar = "HGTS";
thisRecordHeader.var1 = inputHeights[level];
thisRecordHeader.var1 = inputHeights[level] + groundElevation;
std::vector<std::vector<float>> thisData(
numberGridCells,
std::vector<float>(numberGridCells, inputHeights[level]));
......
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