Skip to content

Conversation

@sanAkel
Copy link
Contributor

@sanAkel sanAkel commented Dec 28, 2025

This PR resolves: #91

What does it provide?

In response to what is needed it provides scripts to:

Input global netcdf with surface fields.
Write corresponding global grib file.

And it is agnostic to the source of netcdf file, i.e., the python script does not care if the netcdf file is an
output from the UFS/MOM and CICE or RTOFS v2.5 (archive converted to nc).

@DanIredell-NOAA Please:

Proof that it worked

santha.akella@dlogin03:~/large_fs/nc2grib_issue_91> ./run_nc2grib.sh 
Detected Grid: IMAX=4500, JMAX=3298
Step 2: Encoding to GRIB2...
 lengrib returned from gribend=    15290258
 Return code from baclose=           0
----------------------------------------------
Success! GRIB2 file created: rtofs_output.grb2
santha.akella@dlogin03:~/large_fs/nc2grib_issue_91> ls -alt
total 146760
-rw-r--r-- 1 santha.akella couple  15290258 Dec 27 23:46 rtofs_output.grb2
drwxr-sr-x 4 santha.akella couple      4096 Dec 27 23:45 .
-rw-r--r-- 1 santha.akella couple         4 Dec 27 23:45 fort.30
...
...

Grib2 file is valid!

wgrib2 -v rtofs_output.grb2 
1:0:d=2025122712:WTMP Water Temperature [K]:0 m below sea level:anl:

@sanAkel sanAkel self-assigned this Dec 28, 2025
@sanAkel sanAkel added the enhancement New feature or request label Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grib/regional files

2 participants