Skip to content

Commit

Permalink
Minor corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
tclune committed Jul 24, 2023
1 parent 0c281e3 commit 4925e40
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions base/HorizontalFluxRegridder.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module mapl_HorizontalFluxRegridder
use mapl_RegridMethods
use mapl_KeywordEnforcerMod
use mapl_ErrorHandlingMod
use mapl_BaseMod
use mapl_MaplGrid
use mapl_Base
use mapl_SphericalGeometry
implicit none
private
Expand Down Expand Up @@ -75,7 +76,7 @@ subroutine initialize_subclass(this, unusable, rc)
integer :: counts(5)
integer :: status
integer :: units ! unused
real(kind=ESMF_KIND_R8), allocatable :: corner_lonsn(:,:), corner_lats(:,:)
real(kind=ESMF_KIND_R8), allocatable :: corner_lons(:,:), corner_lats(:,:)

_UNUSED_DUMMY(unusable)
spec = this%get_spec()
Expand All @@ -100,7 +101,7 @@ subroutine initialize_subclass(this, unusable, rc)

allocate(corner_lons(IM_in+1,JM_in+1), corner_lats(IM_in+1,JM_in+1))
associate(lons => corner_lons, lats => corner_lats)
call MAPL_GridGetCorners(gridCornerLons=lons, gridCornerLats=lats, _RC)
call MAPL_GridGetCorners(grid_in, gridCornerLons=lons, gridCornerLats=lats, _RC)

this%dx_in = distance( &
lons(1:IM_in,1:JM_in), lats(1:IM_in,1:JM_in), &
Expand All @@ -111,9 +112,10 @@ subroutine initialize_subclass(this, unusable, rc)
lons(1:IM_in,2:JM_in+1), lats(1:IM_in,2:JM_in+1))
end associate

deallocate(corner_lons, corner_lats)
allocate(corner_lons(IM_out+1,JM_out+1), corner_lats(IM_out+1,JM_out+1))
associate(lons => corner_lons, lats => corner_lats)
call MAPL_GridGetCorners(gridCornerLons=lons, gridCornerLats=lats, _RC)
call MAPL_GridGetCorners(grid_out, gridCornerLons=lons, gridCornerLats=lats, _RC)

this%dx_out = distance( &
lons(1:IM_in,1:JM_in), lats(1:IM_in,1:JM_in), &
Expand Down

0 comments on commit 4925e40

Please sign in to comment.