diff --git a/base/MAPL_VerticalMethods.F90 b/base/MAPL_VerticalMethods.F90 index ae883a437f8c..2a6793aee30b 100644 --- a/base/MAPL_VerticalMethods.F90 +++ b/base/MAPL_VerticalMethods.F90 @@ -622,8 +622,9 @@ subroutine VertInterp(v2,v3,pp,ple_,pl_,rc) end where end if - deallocate(plx,_STAT) - + if (flip) then + deallocate(plx,_STAT) + endif _RETURN(ESMF_SUCCESS) end subroutine VertInterp