Skip to content

Commit

Permalink
Use GetGridGeoms() overload with producer id
Browse files Browse the repository at this point in the history
Producers are referred to with ids in Himan code
  • Loading branch information
mpartio committed May 6, 2024
1 parent e26714b commit 090008e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions himan-plugins/himan-plugins.spec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Requires: himan-lib >= 24.1.9
Requires: lua >= 5.3.0
Requires: unixODBC
Requires: libfmigrib >= 24.4.19
Requires: libfmidb >= 24.4.18
Requires: libfmidb >= 24.5.6
Requires: smartmet-library-newbase >= 22.3.22
Requires: smartmet-library-gis
Requires: smartmet-library-macgyver
Expand All @@ -57,7 +57,7 @@ BuildRequires: cuda-cusp-12-4 >= 0.5.1
BuildRequires: libs3-devel >= 4.1
BuildRequires: libfmigrib >= 24.4.19
BuildRequires: libfmigrib-devel >= 24.4.19
BuildRequires: libfmidb-devel >= 24.4.18
BuildRequires: libfmidb-devel >= 24.5.6
BuildRequires: smartmet-library-newbase-devel >= 21.12.7
BuildRequires: smartmet-library-gis-devel
BuildRequires: libluabind >= 0.9.3-3
Expand Down
6 changes: 3 additions & 3 deletions himan-plugins/source/radon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ vector<vector<string>> GetGridGeoms(himan::plugin::search_options& options, uniq
vector<vector<string>> gridgeoms;
vector<string> sourceGeoms = options.configuration->SourceGeomNames();

const string ref_prod = options.prod.Name();
long int producer_id = options.prod.Id();
const string analtime = options.time.OriginDateTime().String("%Y-%m-%d %H:%M:%S+00");

if (sourceGeoms.empty())
{
// Get all geometries
gridgeoms = itsRadonDB->GetGridGeoms(ref_prod, analtime);
gridgeoms = itsRadonDB->GetGridGeoms(producer_id, analtime);
}
else
{
Expand All @@ -290,7 +290,7 @@ vector<vector<string>> GetGridGeoms(himan::plugin::search_options& options, uniq

for (size_t i = 0; i < sourceGeoms.size(); i++)
{
vector<vector<string>> geoms = itsRadonDB->GetGridGeoms(ref_prod, analtime, sourceGeoms[i]);
vector<vector<string>> geoms = itsRadonDB->GetGridGeoms(producer_id, analtime, sourceGeoms[i]);
gridgeoms.insert(gridgeoms.end(), geoms.begin(), geoms.end());
}
}
Expand Down

0 comments on commit 090008e

Please sign in to comment.