Skip to content

Conversation

@sbanihash
Copy link
Collaborator

@sbanihash sbanihash commented Sep 23, 2025

Change packing from jpeg to complex

Pull Request Summary

This PR will change the grib2 packing in order to reduce file sizes and resolves warning issue #923

Description

The issue was originally brought up in 2023 with the GLWU implementation. When grib2 commands were executed a warning would show up that "jpeg encode/deocde may differ from WMO standard". The solution that was suggested was changing the grib2 packing in the WW3 code directly.

Issue(s) addressed

Commit Message

Update grib2 outputs to have complex packing

Check list

Testing

  • How were these changes tested? regtest + glwu workflow+ global-workflow
  • Are the changes covered by regression tests? yes, some regtests create grib outputs
  • Have the matrix regression tests been run (if yes, please note HPC and compiler)? Yes on Ursa with intel. grib files in ufs regtests will differ due to packing change.

Change packing from jpeg to complex
@JessicaMeixner-NOAA
Copy link
Collaborator

@ukmo-kitstokes - Just wanted to check in with you to see if you use this routine or not.

@mingchen-NOAA
Copy link
Collaborator

Regression tests and matrix comparisons have been completed on Ursa-Intel. The differences observed in .grb2 and gribfile outputs are expected and directly attributable to the fix introduced in this PR. No unexpected differences were identified.

Expected differences:

**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR3_UNO_MPI_d2                     (16 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (19 files differ)
mww3_test_03/./work_PR2_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e_c                     (1 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (16 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (16 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (16 files differ)
mww3_test_03/./work_PR2_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (16 files differ)
mww3_test_03/./work_PR1_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (14 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e_c                     (1 files differ)
mww3_test_09/./work_MPI_ASCII                     (0 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (6 files differ)
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)
ww3_ufs1.3/./work_a                     (3 files differ)

Changes due to this PR:

ww3_tp2.17/./work_ma                     (1 files differ)            inla.grb2 (binary)
ww3_tp2.17/./work_b                     (1 files differ)               gribfile (binary)
ww3_tp2.17/./work_ma1                     (1 files differ)          inla.grb2 (binary)
ww3_tp2.17/./work_c                     (1 files differ)               gribfile (binary)
ww3_tp2.17/./work_mc                     (1 files differ)            inlc.grb2 (binary)
ww3_tp2.17/./work_a                     (1 files differ)               gribfile (binary)
ww3_tp2.17/./work_mc1                     (1 files differ)          inlc.grb2 (binary)
ww3_tp2.17/./work_mb                     (1 files differ)            inlb.grb2 (binary)
ww3_ufs1.1/./work_d                     (1 files differ)                glo_5deg.grb2 (binary)
ww3_ufs1.1/./work_c                     (1 files differ)                 glo_5deg.grb2 (binary)
ww3_ufs1.1/./work_c_nth                     (1 files differ)          glo_5deg.grb2 (binary)
ww3_ufs1.1/./work_c_npl                     (1 files differ)          glo_5deg.grb2 (binary)
ww3_ufs1.2/./work_b                     (4 files differ)                aoc_9km.grb2 (binary) 
                                                                       glo_15mxt.grb2 (binary) 
                                                                       gnh_10m.grb2 (binary) 
                                                                       gsh_15m.grb2 (binary)
ww3_ufs1.2/./work_c                     (3 files differ)                aoc_9km.grb2 (binary) 
                                                                       gnh_10m.grb2 (binary) 
                                                                       gsh_15m.grb2 (binary)
ww3_ufs1.2/./work_a                     (4 files differ)                aoc_9km.grb2 (binary) 
                                                                       glo_15mxt.grb2 (binary) 
                                                                       gnh_10m.grb2 (binary) 
                                                                       gsh_15m.grb2 (binary)
ww3_ufs1.2/./work_l                     (1 files differ)                hafsl.grb2 (binary)
ww3_ufs1.3/./work_a                     (4 files differ)               ao_20m.grb2 (binary) 
                                                                       glo_15m.grb2 (binary) 
                                                                       glo_15mxt.grb2 (binary)
                                                                       so_20m.grb2 (binary)

matrixCompFull.txt
matrixCompSummary.txt
matrixDiff.txt

@mingchen-NOAA
Copy link
Collaborator

@JessicaMeixner-NOAA Will merge after receiving feedback from @ukmo-kitstokes

@JessicaMeixner-NOAA
Copy link
Collaborator

@ukmo-kitstokes - I think you said you did not use this routine, but just wanted to double check.

@ukmo-kitstokes
Copy link
Collaborator

Apologies for the slow reply. I've just checked and it doesn't look like we use this routine in our operational wave workflow, but there is a reference to it in our coupled suite. @ukmo-juan-castillo can you check whether the above would have any impact on the coupled suite please?

@JessicaMeixner-NOAA
Copy link
Collaborator

If it would, we can use the NCO switch to have our option we want and leave others as they are.

That being said - this is being done on our end because it makes our grib2 files smaller, which might also be a welcomed update for you.

@ukmo-juan-castillo
Copy link
Collaborator

I confirm that the changes will not affect our current coupled configurations, as we do not use the ww3_grib executable. On the other hand, this looks like a useful change to have.

@JessicaMeixner-NOAA
Copy link
Collaborator

I confirm that the changes will not affect our current coupled configurations, as we do not use the ww3_grib executable. On the other hand, this looks like a useful change to have.

Thanks for checking @ukmo-juan-castillo !

@JessicaMeixner-NOAA JessicaMeixner-NOAA merged commit e3b1f1c into NOAA-EMC:develop Oct 1, 2025
3 of 6 checks passed
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.

grib2 warning issue for jpeg packing (default in ww3 with NCEP2)

5 participants