From 5d47b9b99b8dace2536d675e09b1a1db84c89c23 Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Thu, 7 May 2020 10:09:06 -0700 Subject: [PATCH 1/2] Removed setting of ??_corner flags Will move this to fv_grid_tools.F90 in next commit. --- model/fv_grid_utils.F90 | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/model/fv_grid_utils.F90 b/model/fv_grid_utils.F90 index 9e150859a..ef8af8239 100644 --- a/model/fv_grid_utils.F90 +++ b/model/fv_grid_utils.F90 @@ -215,18 +215,6 @@ subroutine grid_utils_init(Atm, npx, npy, npz, non_ortho, grid_type, c2l_order) cos_sg(:,:,:) = big_number sin_sg(:,:,:) = tiny_number - sw_corner = .false. - se_corner = .false. - ne_corner = .false. - nw_corner = .false. - - if (grid_type < 3 .and. .not. Atm%gridstruct%bounded_domain) then - if ( is==1 .and. js==1 ) sw_corner = .true. - if ( (ie+1)==npx .and. js==1 ) se_corner = .true. - if ( (ie+1)==npx .and. (je+1)==npy ) ne_corner = .true. - if ( is==1 .and. (je+1)==npy ) nw_corner = .true. - endif - if ( sw_corner ) then tmp1 = great_circle_dist(grid(1,1,1:2), agrid(1,1,1:2)) tmp2 = great_circle_dist(grid(1,1,1:2), agrid(2,2,1:2)) From aaede94fe99cc9eafbd38f72f1bc1e02300a1f0f Mon Sep 17 00:00:00 2001 From: Oliver Fuhrer Date: Thu, 7 May 2020 10:15:09 -0700 Subject: [PATCH 2/2] Set ??_corner flags in init_grid() This has been moved from grid_utils_init() in model/fv_grid_utils.F90 --- tools/fv_grid_tools.F90 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/fv_grid_tools.F90 b/tools/fv_grid_tools.F90 index 3eae83358..5d0f955cc 100644 --- a/tools/fv_grid_tools.F90 +++ b/tools/fv_grid_tools.F90 @@ -565,6 +565,18 @@ subroutine init_grid(Atm, grid_name, grid_file, npx, npy, npz, ndims, nregions, latlon = .false. cubed_sphere = .false. + ! set corner flags + sw_corner = .false. + se_corner = .false. + ne_corner = .false. + nw_corner = .false. + if (Atm%flagstruct%grid_type < 3 .and. .not. Atm%gridstruct%bounded_domain) then + if ( is==1 .and. js==1 ) sw_corner = .true. + if ( (ie+1)==npx .and. js==1 ) se_corner = .true. + if ( (ie+1)==npx .and. (je+1)==npy ) ne_corner = .true. + if ( is==1 .and. (je+1)==npy ) nw_corner = .true. + endif + if ( (Atm%flagstruct%do_schmidt .or. Atm%flagstruct%do_cube_transform) .and. abs(atm%flagstruct%stretch_fac-1.) > 1.E-5 ) then stretched_grid = .true. if (Atm%flagstruct%do_schmidt .and. Atm%flagstruct%do_cube_transform) then