Debug gdas.x NaN abort: update sorc/fv3-jedi to Gaussian-grid read path (RussTreadon-NOAA fork @81a8e1c)#2098
Draft
Debug gdas.x NaN abort: update sorc/fv3-jedi to Gaussian-grid read path (RussTreadon-NOAA fork @81a8e1c)#2098
Conversation
Copilot
AI
changed the title
[WIP] Debug NaN issue in gdas.x forward model calculation
Debug: identify NaN source in gdas.x forward model — missing std::isnan check in IOStructuredGrid Gaussian read path
Mar 20, 2026
Contributor
|
The attached file, atmanlvar.yaml, is the input yaml read by gdas.x Note: https://github.com/RussTreadon-NOAA/fv3-jedi/tree/copilot/debug-segmentation-fault-issue at RussTreadon-NOAA/fv3-jedi@81a8e1c contains code to read backgrounds from gaussian grid GFS atmospheric and surface files. |
…ad path and MPI fixes - .gitmodules: change url from jcsda/fv3-jedi.git@develop to RussTreadon-NOAA/fv3-jedi.git@copilot/debug-segmentation-fault-issue. Added TODO comment to restore the upstream URL once all Gaussian-grid IO changes (including the std::isnan NaN guard in readVarToStructuredAtlasField) are merged back into jcsda/fv3-jedi develop. - sorc/fv3-jedi: bump submodule pointer from 3d29a037 (feature/read_gaussian, only partial Gaussian read path) to 81a8e1c (copilot/debug-segmentation-fault-issue, full Gaussian read/write path + MPI GlobalInterpolator desync fixes). Root cause of the NaN in gdas.x (found from atmanlvar.yaml analysis): IOStructuredGrid::readVarToStructuredAtlasField() was missing std::isnan(val) in the isMissing check. In IEEE 754, std::abs(NaN)>threshold and NaN==x both return false, so NaN values in the Gaussian background files passed silently through to H(x). Companion fix in RussTreadon-NOAA/fv3-jedi is required. Co-authored-by: RussTreadon-NOAA <26926959+RussTreadon-NOAA@users.noreply.github.com> Agent-Logs-Url: https://github.com/NOAA-EMC/GDASApp/sessions/5c1d6952-3e2f-4cda-8ce5-0c1b37000d73
Copilot
AI
changed the title
Debug: identify NaN source in gdas.x forward model — missing std::isnan check in IOStructuredGrid Gaussian read path
Debug gdas.x NaN abort: update sorc/fv3-jedi to Gaussian-grid read path (RussTreadon-NOAA fork @81a8e1c)
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gdas.x(3D-Var) aborts with NaN in H(x) when reading backgrounds from Gaussian-grid GFS files via the newIOStructuredGridread path. Root cause: missingstd::isnanguard inreadVarToStructuredAtlasField.Root cause
In IEEE 754,
std::abs(NaN) > thresholdandNaN == xboth returnfalse, so the existing fill-value check inIOStructuredGrid::readVarToStructuredAtlasFieldsilently passes NaN float values from the NetCDF background files into the Atlas FieldSet. Those NaN values surviveGlobalInterpolator::apply()onto the cubed-sphere grid and propagate into H(x).Confirmed by examining
atmanlvar.yaml: background usesfiletype: structured grid, gridtype: gaussianwith filesgdas.t18z.atm.f006.nc/gdas.t18z.sfc.f006.ncon a C96 (F96) geometry.Changes
.gitmodules—sorc/fv3-jediURL/branch updated fromjcsda/fv3-jedi@develop(SHA3d29a037, partial Gaussian path) toRussTreadon-NOAA/fv3-jedi@copilot/debug-segmentation-fault-issue(SHA81a8e1c), which provides the complete Gaussian-grid read/write path and MPIGlobalInterpolatordesync fixes. TODO comment added to restore upstream once fixes land injcsda/fv3-jedi.sorc/fv3-jedi— submodule pointer bumped3d29a037→81a8e1c.Companion PRs
RussTreadon-NOAA/fv3-jedi— addstd::isnan(val)as the first term ofisMissinginIOStructuredGrid::readVarToStructuredAtlasField(required before the NaN abort is fully resolved; submodule pointer will need a second bump to that SHA).Issues
Automated CI tests to run in Global Workflow
⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.