From 74a8fb091157727c42db9b8e788c5b1010adef80 Mon Sep 17 00:00:00 2001 From: clyne Date: Sun, 13 Feb 2022 09:56:01 -0700 Subject: [PATCH] Fixed 3011 and 3012 - renderers doesn't work with some VDC data (#3014) * Fixed #3011 Fixed #3012 * clang-format pre-push hook --- lib/vdc/DerivedVar.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/vdc/DerivedVar.cpp b/lib/vdc/DerivedVar.cpp index f749d19fea..242e78d5ff 100644 --- a/lib/vdc/DerivedVar.cpp +++ b/lib/vdc/DerivedVar.cpp @@ -2402,8 +2402,25 @@ void DerivedCoordVarStandardOceanSCoordinate::compute_g2(const vector &m // Register class with object factory!!! // +#ifdef VAPOR3_6_0 + +// +// The atmosphere_hybrid_sigma_pressure_coordinate conversion from pressure +// to meters unforunately results in a flipped (inverted?) vertical coordinate +// system with logical grid indices increasing as user coordinates +// decrease. I.e. Z[k] > Z[k+1]. In numerous places VAPOR +// expects the grid index and associated vertical coordinate to be +// monotonically increasing. This needs to be fixed as this assumption +// often does not hold true. However it is a big lift. For now, just +// remove the atmosphere_hybrid_sigma_pressure_coordinate converter from +// the object factory. +// + + static DerivedCFVertCoordVarFactoryRegistrar registrar_atmosphere_hybrid_sigma_pressure_coordinate("atmosphere_hybrid_sigma_pressure_coordinate"); +#endif + DerivedCoordVarStandardAHSPC::DerivedCoordVarStandardAHSPC(DC *dc, string mesh, string formula) : DerivedCFVertCoordVar("", dc, mesh, formula) { _standard_name = "atmosphere_hybrid_sigma_pressure_coordinate";