From 70916e9e8d12cb8d401e04c9b41193465679e9e3 Mon Sep 17 00:00:00 2001 From: Mikko Partio Date: Wed, 17 Jan 2024 16:35:25 +0200 Subject: [PATCH] Add possibility to specify ecgeps and meps geometry --- doc/plugin-frost.md | 15 ++++++++++++++- himan-plugins/source/frost.cpp | 20 ++++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/doc/plugin-frost.md b/doc/plugin-frost.md index c5db05fcf..b21f264e3 100644 --- a/doc/plugin-frost.md +++ b/doc/plugin-frost.md @@ -27,4 +27,17 @@ According to method provided by Juha Jantunen. # Per-plugin configuration options -None +All options are optional. + +ecmwf_geometry: define geometry for ecmwf data + + "ecmwf_geometry" : "..." + +ecmwfeps_geometry: define geometry for ecmwf eps data + + "ecmwfeps_geometry" : "..." + +meps_geometry: define geometry for meps data + + "meps_geometry" : "..." + diff --git a/himan-plugins/source/frost.cpp b/himan-plugins/source/frost.cpp index f144d81ce..cad769e75 100644 --- a/himan-plugins/source/frost.cpp +++ b/himan-plugins/source/frost.cpp @@ -188,7 +188,16 @@ void frost::Calculate(shared_ptr> myTargetInfo, unsigned short thre ec_forecastTime.OriginDateTime().Adjust(kHourResolution, adjustment); cnf->SourceProducers({producer(242, 86, 242, "ECM_PROB")}); - cnf->SourceGeomNames({"ECGLO0200", "ECEUR0200"}); + + if (cnf->GetValue("ecmwfeps_geometry").empty() == false) + { + cnf->SourceGeomNames({cnf->GetValue("ecmwfeps_geometry")}); + } + else + { + cnf->SourceGeomNames({"ECGLO0200", "ECEUR0200"}); + } + shared_ptr> T0ECInfo = BackwardsFetchFromProducer(cnf, stat_type, ec_forecastTime, level(kHeight, 2), T0Param, -12); @@ -212,7 +221,14 @@ void frost::Calculate(shared_ptr> myTargetInfo, unsigned short thre if (meps_forecastTime.Step().Hours() <= 66) { cnf->SourceProducers({producer(260, 86, 204, "MEPSMTA")}); - cnf->SourceGeomNames({"MEPS2500D"}); + if (cnf->GetValue("meps_geometry").empty() == false) + { + cnf->SourceGeomNames({cnf->GetValue("meps_geometry")}); + } + else + { + cnf->SourceGeomNames({"MEPS2500D"}); + } T0MEPSInfo = BackwardsFetchFromProducer(cnf, stat_type, meps_forecastTime, level(kHeight, 2), T0Param, -3); }