-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Grib2 writing capabilities to the ocnicepost module #96
base: develop
Are you sure you want to change the base?
Conversation
@AminIlia-NOAA - I looked at the ocean.0p25.gb2 file with Grads. Here is the water temperature record. Something is not correct. See the gif. It looks like there is an array mismatch somewhere. Are the dimensions of the data array what the g2 library is expecting? Is the array 8-byte, but the g2 library is expecting 4-byte? To simplify debugging, I might turn off the bitmap (you can set the land points to a value like 999) and try the simple packing. |
@GeorgeGayno-NOAA thank you for your suggestion and plotting. I already had done/tested most of your suggestions. While I found minor typo in my code and fixed them however, the main issue here is the section 5 and scaling the numbers. The 8 bytes vs 4 bytes is not an issue as addfield also has not specified them. I did a lot of work on it and performed a lot of search even went through the netcdf file to see different between C style written netCDF file and Fortran style written netCDF file. However there wasn't an issue from this point. The main issue is that the g2 library select a large negative number for reference value in section 5. That causes these large negative values and wrong scaled value parameters. Per your and others recommendation I set only idrtmpl(3). I think someone should check to see if there is an issue in g2 library. Also, could you please let me know what equation g2 lib use for scaling the parameters. I found this at ECMWF website, Y * 10^D= R + (X1+X2) * 2^E. In addition I saw an wired behavior from the compiler for the original "ocnicepost". If you look at the cmakelist file, the arrays_mod.F90 which is depend on init_mod.F90 compiled before init_mod.F90. We should get an error here however we don't get an error. |
@AminIlia-NOAA - not sure what the issue is. Which version of the G2 library are you using? Can you try an older version? Tagging the NCEPLIBS team for assistance - @edwardhartnett @AlexanderRichert-NOAA @Hang-Lei-NOAA |
The system is on maintenance today. I guess I loaded the latest version. Will check the version later and try with another. |
finalized
fixed issue in write_grib2_3d
Description
The ocnicepost has been modified to include grib2 writing capabilities. The codes has been written and tested. The code creates grib2 files (2D and 3D) however the data is not on proper range. It seems some fill value remain and written into the data although I masked them with bitmap. Here are some points:
A working test case is available at /scratch2/NCEPDEV/ovp/Amin.Ilia/new/test_f6 on HERA. Please let me know if you have any questions.
Any suggestion or help on resolving the large negative numbers will be apricated.
Thanks All,
@edwardhartnett, @AlysonStahl-NOAA or @Hang-Lei-NOAA.
@WenMeng-NOAA or @GeorgeGayno-NOAA
Ref #89
Type of change
Change characteristics
How has this been tested?
Checklist