NOAA-GFDL/GFDL_atmos_cubed_sphere

Typo/bug in fv_grid_tools.F90 in dev/emc branch when print out grid corner indexes and locations

Closed this issue · 3 comments

Describe the bug
There is a typo/bug in fv_grid_tools.F90 when print out the grid SW, NW, NE, SE CORNER indexes and lat/lon locations.
The source code lines of
ic = p_ind(1,1,1) ; jc = p_ind(1,1,1)
should be updated into:
ic = p_ind(1,1,1) ; jc = p_ind(1,1,2)
so that the jc gets the correct index. Otherwise, jc is always identical to ic, leading to wrong printout jc and lat/lon locations for the grid corners.

Additional context
This bug/typo was found/identified when checking UFS-HAFS moving-nesting forecast log. And you can see an proposed/example fix from this commit 4162fad.

Sorry for the delay @BinLiu-NOAA . I think you are correct. Could you go ahead and create an MR?

Thanks,
Lucas

Sorry for the delay @BinLiu-NOAA . I think you are correct. Could you go ahead and create an MR?

Thanks, Lucas

Thanks, @lharris4! PR #341 has been created accordingly to address this issue.

merged into dev/emc branch with PR #341