From 819a08e356f378fea438999a98464288efa939bd Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Wed, 28 Aug 2024 12:45:13 -0400 Subject: [PATCH] Fix to marine post and archiving (#1266) I just added an error trap while we wait for @givelberg to provide us with properly processed insitu obs files. - fixed #1265 --- utils/soca/gdassoca_obsstats.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/soca/gdassoca_obsstats.h b/utils/soca/gdassoca_obsstats.h index 5f95574a1..010fe9ac0 100644 --- a/utils/soca/gdassoca_obsstats.h +++ b/utils/soca/gdassoca_obsstats.h @@ -81,6 +81,11 @@ namespace gdasapp { // ocean basin partitioning std::vector oceanBasins(nlocs); + if (!ospace.has("MetaData", "oceanBasin")) { + oops::Log::warning() << "Skipping obsspace" << obsFile + << ": oceanBasin does not exist." << std::endl; + continue; + } ospace.get_db("MetaData", "oceanBasin", oceanBasins); // Open an ofstream for output and write header