From 3dcff2519f7a1f42730e9f0cf4f3aedbcf12902f Mon Sep 17 00:00:00 2001 From: Tom Clune Date: Tue, 28 Nov 2023 10:37:02 -0500 Subject: [PATCH] Update fv_grid_tools.F90 When introducing non-global mechanism for computing coordinates, a copy-paste mistake broke the Schmidt transform. Does not affect legacy coordinate algorithm. Basically the loop over tiles should just be a single iteration for the local tile. Obvious in hindsiht. --- tools/fv_grid_tools.F90 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/fv_grid_tools.F90 b/tools/fv_grid_tools.F90 index 40550921d..d8d7abd6e 100644 --- a/tools/fv_grid_tools.F90 +++ b/tools/fv_grid_tools.F90 @@ -772,11 +772,9 @@ subroutine init_grid(Atm, grid_name, grid_file, npx, npy, npz, ndims, nregions, grid_local(:,:,1) = grid_local(:,:,1) + 2*pi end where where (abs(grid_local(:,:,:)) < 1.d-10) grid_local = 0 - do n=1,nregions - call direct_transform(Atm%flagstruct%stretch_fac, is, ie+1, js, je+1, & - Atm%flagstruct%target_lon, Atm%flagstruct%target_lat, & - n, grid_local(:,:,1), grid_local(:,:,2)) - enddo + call direct_transform(Atm%flagstruct%stretch_fac, is, ie+1, js, je+1, & + Atm%flagstruct%target_lon, Atm%flagstruct%target_lat, & + tile, grid_local(:,:,1), grid_local(:,:,2)) grid(is:ie+1,js:je+1,:) = grid_local(:,:,:) deallocate(grid_local) endif