Skip to content

Commit

Permalink
fix: deallocate arrays in interpolator_end (#1297)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlee03 authored Aug 24, 2023
1 parent 3ffc427 commit dd53551
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions interpolator/interpolator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3423,6 +3423,8 @@ subroutine interpolator_end(clim_type)
if (allocated (clim_type%field_name)) deallocate(clim_type%field_name)
if (allocated (clim_type%time_init )) deallocate(clim_type%time_init)
if (allocated (clim_type%mr )) deallocate(clim_type%mr)
if (allocated (clim_type%out_of_bounds )) deallocate(clim_type%out_of_bounds)
if (allocated (clim_type%vert_interp )) deallocate(clim_type%vert_interp)
if (allocated (clim_type%data)) then
deallocate(clim_type%data)
endif
Expand All @@ -3432,6 +3434,10 @@ subroutine interpolator_end(clim_type)
deallocate(clim_type%nmon_nyear)
deallocate(clim_type%nmon_pyear)
endif
if (allocated(clim_type%indexm)) deallocate(clim_type%indexm)
if (allocated(clim_type%indexp)) deallocate(clim_type%indexp)
if (allocated(clim_type%climatology)) deallocate(clim_type%climatology)
if (allocated(clim_type%clim_times)) deallocate(clim_type%clim_times)

!! RSH mod
if( .not. (clim_type%TIME_FLAG .eq. LINEAR .and. &
Expand Down

0 comments on commit dd53551

Please sign in to comment.