ufs-community / ccpp-physics

UFS fork for CCPP
Other
4 stars 33 forks source link

grv function used by NST assumes wrong argument #130

Closed DeniseWorthen closed 10 months ago

DeniseWorthen commented 10 months ago

Description

The NST model uses the function grv to give the latitude dependence of gravity.

https://github.com/ufs-community/ccpp-physics/blob/c2ec9e5e165dac07a991424bd22bb0667cf32017/physics/module_nst_water_prop.f90#L485-L500

This function assumes the argument is the latitude but the value actually used by sfc_nst.f is the sin(latitude).

https://github.com/ufs-community/ccpp-physics/blob/c2ec9e5e165dac07a991424bd22bb0667cf32017/physics/sfc_nst.f#L372

Steps to Reproduce

Additional Context

See gravity forumla 1980 for the definition of gravity=f(latitude) used in this module.

junwang-noaa commented 10 months ago

Thanks to Denise for this bug fix. @yangfanglin @Qingfu-Liu @XuLi-NOAA FYI. Also would you like to do some testing to see the impact of this bug fix?

yangfanglin commented 10 months ago

maybe start with comparing results between two regression tests ? @XuLi-NOAA

XuLi-NOAA commented 10 months ago

maybe start with comparing results between two regression tests ? @XuLi-NOAA

I can do that once these two regression tests are available (or already, juts point them to me). As I understand, it purly/only affects the latittude dependent gravity accelaration variation, as Denise pointed, at 45 degree, the error due the bug is about 0.26%. And the impact of this parameter (g) on the NSST model must be very limited.

yangfanglin commented 10 months ago

@XuLi-NOAA making a few plots of NSST related variables and posting here should suffice for closing this PR