-
Notifications
You must be signed in to change notification settings - Fork 109
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 use_rh and calrh for grib2 humidity processing #566
add use_rh and calrh for grib2 humidity processing #566
Conversation
@GeorgeGayno-NOAA Not sure how to fix the Doxygen warning to pass check tests: /home/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/chgres_cube.fd/grib2_util.F90:147: error: argument 'fpvsnew' of command @param is not found in the argument list of grib2_util::fpvsnew(real, intent(in) t) (warning treated as error, aborting now) fpvsnew is a function to calculate saturation water vapor pressure. And I have: !> Compute saturation vapor pressure |
When removing !! @param[out] fpvsnew, I got the following Doxygen error: /home/runner/work/UFS_UTILS/UFS_UTILS/ufs_utils/sorc/chgres_cube.fd/grib2_util.F90:154: error: return type of member grib2_util::fpvsnew is not documented (warning treated as error, aborting now) |
I will take a look. |
@JiliDong-NOAA For functions, doxygen requires a "@return" entry. Here is what I did to fix it:
|
Thanks @GeorgeGayno-NOAA . Now the check tests all passed. BTW, is there a way to do the compiling with debug options including Doxygen on Linux? Having to debug it online is sort of frustrating. |
In the 'build_all.sh' script, turn on the following CMAKE_FLAG: |
@GeorgeGayno-NOAA @LarissaReames-NOAA @JeffBeck-NOAA could you review this PR? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JiliDong-NOAA We are now committed to doing unit tests. So your new functions will need some tests.
@GeorgeGayno-NOAA Unit test (ftst_rh2spfh_gfs) added and passed for new rh to spfh subroutines. |
@JiliDong-NOAA, based on your issue for this PR, I assume FV3 can initialize off of RH or SPFH? Also, can you comment on how the new RH-to-SPFH calculation differs from what's already in chgres_cube, and whether that would be best for all external model data? Thanks! |
@JeffBeck-NOAA I will upload several slides to show the difference. |
@JeffBeck-NOAA Here are the comparison of different rh to spfh conversions, verified against original spfh as truth by calculating rms difference between them for three sets of grib2 files (GFSv15, v16 and grib2 from rt). Also compared with interpolating 41 levels spfh to 57 levels for one set grib2 file. Using the newly added rh2spfh conversion shows the smallest rms differences. The new conversion is directly extracted from UPP/EMC_post and consistent with operational GFSv15/16. Some recommendations are listed in the last slide. |
… default use_rh to true
Thanks, @JiliDong-NOAA. It certainly looks like the new formulation of SPFH is much better! |
…n the same levels with UGRD
@GeorgeGayno-NOAA could you update the new chgres rt baseline related to GFS grib2? I have the new runs on Hera: /scratch2/NCEPDEV/stmp1/Jili.Dong/reg-tests/chgres-cube/ Thanks. |
@GeorgeGayno-NOAA Please let me know if there is any change you would like me to make. |
@JiliDong-NOAA Is |
No, rh2spfh_nam is not used for now. It is for the future GFSv17. |
@JiliDong-NOAA, why use another formulation for GFSv17? Is there another way to calculate spfh from rh that is better than what is proposed in this PR? |
GFSv17 will use a different spfh to rh conversion from the previous GFS versions. For chgres, I think we would like to apply a conversion consistent with the parent or original model to be ingested (either GFS or HRRR) when calculating spfh back from rh. In this context, I think a "consistent" conversion means a "better" solution here. |
@JiliDong-NOAA GFS v17 parallels may not start for a while. And there is no logic to detect GFS v17 data and call that function accordingly. So, until then it a 'dead' routine. If you insist on keeping it as part of chgres, I would at least rename it - something like |
@GeorgeGayno-NOAA Sure, I will have rh2gfs_nam removed. Good suggestion to add some comments/details on those subroutines. I am working on it. |
@GeorgeGayno-NOAA rh2spfh_nam removed and documentation added for different rh2spfh conversions. Thanks. |
Thanks. I will update the baseline directories. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no further comments. @JeffBeck-NOAA and @LarissaReames-NOAA are the experts with the grib2 option. I will merge after they also approve.
@GeorgeGayno-NOAA @JeffBeck-NOAA @LarissaReames-NOAA Please let me know if there is anything I can do for this PR. |
It looks good to me. But since I am not an expert on the grib2 option, I would like either @JeffBeck-NOAA and/or @LarissaReames-NOAA to give their approval. |
Thanks, @LarissaReames-NOAA @JiliDong-NOAA I will merge. |
Thanks for you all. |
This PR is to add two namelist entries and additional rh to spfh calculation for GFSv15/16 grib2:
"use_rh": if using rh or spfh in grib2 files for humidity (False: use spfh if existing. True: use RH no matter spfh exists or not. Default is False)
"calrh": which rh to spfh calculation will be used. ( = 0 as default to use the current calculation, =1 to use calculation consistent with GFSv15/16).
When setting these two parameters as default (or not specified in namelist), the regression tests won't change.
Related to #565