From 2f3247bd6d142ed7e69d7ccefd5b9aac51ffb6bf Mon Sep 17 00:00:00 2001 From: Mikko Partio Date: Wed, 24 Mar 2021 08:44:56 +0200 Subject: [PATCH] If caller has specified interpolation method, use that --- himan-plugins/source/geotiff.cpp | 4 +++- himan-plugins/source/grib.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/himan-plugins/source/geotiff.cpp b/himan-plugins/source/geotiff.cpp index 386e547e9..025071581 100644 --- a/himan-plugins/source/geotiff.cpp +++ b/himan-plugins/source/geotiff.cpp @@ -161,6 +161,8 @@ param ReadParam(const std::map& meta, const producer& param p(parameter["name"]); p.Id(std::stoi(parameter["id"])); + p.InterpolationMethod(par.InterpolationMethod()); + return p; } @@ -407,7 +409,7 @@ std::vector>> geotiff::FromFile(const file_information& // "first guess" metadata from file metadata - auto par = ReadParam(meta, options.prod, param()); + auto par = ReadParam(meta, options.prod, options.param); auto lvl = ReadLevel(meta, options.level); auto ftype = ReadForecastType(meta, options.ftype); auto ftime = ReadTime(meta, options.time); diff --git a/himan-plugins/source/grib.cpp b/himan-plugins/source/grib.cpp index e1a212ef2..644882be0 100644 --- a/himan-plugins/source/grib.cpp +++ b/himan-plugins/source/grib.cpp @@ -2174,6 +2174,8 @@ himan::param ReadParam(const search_options& options, const producer& prod, cons logr.Trace("Unable to determine himan parameter unit for grib unit " + message.ParameterUnit()); } + p.InterpolationMethod(options.param.InterpolationMethod()); + return p; }