Skip to content

Commit

Permalink
bugfix/topo_filter
Browse files Browse the repository at this point in the history
Remove seg faulting loop from filter_topo.F90.  Instead
always compute dy from lat/lon.

Issue ufs-community#236.
  • Loading branch information
GeorgeGayno-NOAA committed Dec 10, 2020
1 parent 005f9a0 commit f238997
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions sorc/grid_tools.fd/filter_topo.fd/filter_topo.F90
Original file line number Diff line number Diff line change
Expand Up @@ -706,27 +706,17 @@ subroutine read_grid_file(regional)
dx(i,j,t) = great_circle_dist( g2, g1, radius )
enddo ; enddo
enddo
if( stretch_fac /= 1 ) then
do t = 1, ntiles
do j = js, je
do i = is, ie+1
g1(1) = geolon_c(i,j, t)
g1(2) = geolat_c(i,j, t)
g2(1) = geolon_c(i,j+1,t)
g2(2) = geolat_c(i,j+1,t)
dy(i,j,t) = great_circle_dist( g2, g1, radius )
enddo
enddo
enddo
else
do t = 1, ntiles
do j = js, je
do i = is, ie+1
dy(i,j,t) = dx(j,i,t)
enddo
do t = 1, ntiles
do j = js, je
do i = is, ie+1
g1(1) = geolon_c(i,j, t)
g1(2) = geolat_c(i,j, t)
g2(1) = geolon_c(i,j+1,t)
g2(2) = geolat_c(i,j+1,t)
dy(i,j,t) = great_circle_dist( g2, g1, radius )
enddo
enddo
endif
enddo

if( .not. regional ) then
!--- make sure it is consitent between tiles. The following maybe not necessary.
Expand Down

0 comments on commit f238997

Please sign in to comment.