Skip to content

Conversation

@jiaruidong2017
Copy link
Collaborator

@jiaruidong2017 jiaruidong2017 commented Dec 28, 2025

Description

The current C++ IMS preprocessing code supports only ASCII-format input files. This PR adds support for netCDF input files to meet the requirements of reanalysis projects.

Contributes to NOAA-EMC/global-workflow#4387

Companion PRs

NOAA-EMC/jcb-gdas#221

Issues

Resolves #2022

Automated CI tests to run in Global Workflow

  • atm_jjob
  • C96C48_ufs_hybatmDA
  • C96C48_hybatmsnowDA
  • C96_gcafs_cycled
  • C48mx500_3DVarAOWCDA
  • C48mx500_hybAOWCDA
  • C96C48_ufsgsi_hybatmDA
  • C96C48_hybatmDA

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds netCDF format support to the IMS (Ice Mapping System) preprocessing code, which previously only supported ASCII format input files. This enhancement is required for reanalysis projects.

Key changes:

  • Implemented netCDF file reading with dimension and variable extraction in the C++ IMS reader
  • Changed the staged file extension from .asc to .dat to accommodate both ASCII and netCDF formats
  • Maintained backward compatibility by attempting netCDF first, then falling back to ASCII if that fails

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
utils/land/gdas_fv3jedi_calc_scf_to_ioda.cc Implements netCDF reading logic including dimension retrieval, variable extraction, and data buffer processing for IMS surface values
parm/snow/snow_stage_ims_scf2ioda.yaml.j2 Updates file extension from .asc to .dat to support both ASCII and netCDF formats

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ClaraDraper-NOAA
Copy link
Collaborator

Thanks @jiaruidong2017. have you confirmed that we get the same output with a netcdf and an ascii file? They should be identical.

@jiaruidong2017
Copy link
Collaborator Author

Thanks @jiaruidong2017. have you confirmed that we get the same output with a netcdf and an ascii file? They should be identical.

I just made a comparison for one time and confirmed that the outputs are identical by using a netcdf file and an ascii file.

@ClaraDraper-NOAA
Copy link
Collaborator

Thanks @jiaruidong2017. have you confirmed that we get the same output with a netcdf and an ascii file? They should be identical.

I just made a comparison for one time and confirmed that the outputs are identical by using a netcdf file and an ascii file.

Great - thanks. I'll approve now.

Copy link
Collaborator

@ClaraDraper-NOAA ClaraDraper-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, subject to adding the checks requested by co-pilot (where appropriate).

Copy link
Contributor

@CoryMartin-NOAA CoryMartin-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C++ looks good but I think we should be more explicit with the file suffixes

CoryMartin-NOAA added a commit to NOAA-EMC/jcb-gdas that referenced this pull request Jan 2, 2026
Update the input file suffixes from `.asc` to `.dat`, including those
for ASCII and NetCDF formats.

Contributes to NOAA-EMC/GDASApp#2023

---------

Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>
@CoryMartin-NOAA
Copy link
Contributor

@jiaruidong2017 update the jcb-gdas hash to the head of develop and then I can get this approved and merged. Thanks!

@jiaruidong2017
Copy link
Collaborator Author

@CoryMartin-NOAA Thanks and update the jcb-gdas repo

Copy link
Contributor

@CoryMartin-NOAA CoryMartin-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test but it looks good from what I can tell, thanks Jiarui!

@CoryMartin-NOAA CoryMartin-NOAA merged commit e563476 into develop Jan 2, 2026
5 checks passed
@CoryMartin-NOAA CoryMartin-NOAA deleted the feature/ims_nc branch January 2, 2026 18:32
DavidNew-NOAA pushed a commit that referenced this pull request Jan 6, 2026
Update the input file suffixes from `.asc` to `.dat`, including those
for ASCII and NetCDF formats.

Contributes to #2023

---------

Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>
DavidNew-NOAA pushed a commit that referenced this pull request Jan 16, 2026
# Description

The current C++ IMS preprocessing code supports only ASCII-format input
files. This PR adds support for netCDF input files to meet the
requirements of reanalysis projects.

Contributes to NOAA-EMC/global-workflow#4387

# Companion PRs
NOAA-EMC/jcb-gdas#221

# Issues

Resolves #2022 

# Automated CI tests to run in Global Workflow
<!-- Which Global Workflow CI tests are required to adequately test this
PR? -->
- [ ] atm_jjob <!-- JEDI atm single cycle DA !-->
- [ ] C96C48_ufs_hybatmDA <!-- JEDI atm cycled DA !-->
- [ ] C96C48_hybatmsnowDA <!-- JEDI snow cycled DA !-->
- [ ] C96_gcafs_cycled <!-- JEDI aerosol cycled DA !-->
- [ ] C48mx500_3DVarAOWCDA <!-- JEDI low-res marine 3DVar cycled DA !-->
- [ ] C48mx500_hybAOWCDA <!-- JEDI marine hybrid envar cycled DA !-->
- [ ] C96C48_ufsgsi_hybatmDA <!-- JEDI atm Var with GSI EnKF cycled DA
!-->
- [ ] C96C48_hybatmDA <!-- GSI atm cycled DA !-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable IMS preprocessing support for netCDF input files

4 participants