Closed sandrolubis closed 8 months ago
I can reproduce the problem with QGFieldNHN22
. QGFieldNH18
does not seem to be affected.
I think the loop in
needs to be adapted to the value of is_nhem
as in the loop earlier in the function. Maybe remove
and replace everything with
if (is_nhem) then
do j = jstart,jend
ubaro(:,j) = ubaro(:,j)+uu(:,j+nd-1,k)*exp(-zk/h)*dc
urefbaro(j) = urefbaro(j)+uref(j-jb,k)*exp(-zk/h)*dc
enddo
else
do j = jstart,jend
ubaro(:,j) = ubaro(:,j)+uu(:,j,k)*exp(-zk/h)*dc
urefbaro(j) = urefbaro(j)+uref(j,k)*exp(-zk/h)*dc
enddo
endif
@csyhuang, do you think this works with the indices? It seems to resolve the issue in my test notebook, but I'm worried about an off-by-one error...
@sandrolubis Thanks for reporting the bug!
@chpolste Thanks for figuring out the cause of this issue! I think your solution works (maybe also define explicitly jstart
and jend
in the loop?)! Would you like to submit a bugfix PR (and update version number to v1.2.1
)? If not, I can do it this weekend after work.
Thanks again 🙏 😊
Hi all, after updating to FALWA v1.2.0, I spotted a potential bug in u_baro calculation where the output mirrors - i.e., SH = NH. I checked the 'interpolated_u' data; they are correct. Only 'u_baro' shows this issue. See the attached plot.