From 1bb5c059b3e506d785adb06a4be995ad1c85dd41 Mon Sep 17 00:00:00 2001 From: Rich Fiorella Date: Mon, 10 Jun 2024 17:23:40 -0600 Subject: [PATCH] Change allocatable array to extend over topounits Previous allocatable statement had just had max_topounits instaed of 1:max_topounits --- components/elm/src/main/surfrdMod.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/elm/src/main/surfrdMod.F90 b/components/elm/src/main/surfrdMod.F90 index 28f505432685..7cc7d095855a 100755 --- a/components/elm/src/main/surfrdMod.F90 +++ b/components/elm/src/main/surfrdMod.F90 @@ -1683,7 +1683,7 @@ subroutine surfrd_get_topo_for_solar_rad(domain,filename) beg = domain%nbeg end = domain%nend - allocate(latc(beg:end),lonc(beg:end),max_topounits(beg:end)) + allocate(latc(beg:end),lonc(beg:end),1:max_topounits(beg:end)) call ncd_io(ncid=ncid, varname='LONGXY', flag='read', data=lonc, & dim1name=grlnd, readvar=readvar) @@ -1718,7 +1718,7 @@ subroutine surfrd_get_topo_for_solar_rad(domain,filename) dim1name=grlnd, readvar=readvar) If (.not. readvar) call endrun( trim(subname)//' ERROR: SINSL_SINAS NOT on fsurdat file' ) - deallocate(latc,lonc,max_topounits) + deallocate(latc,lonc,1:max_topounits) call ncd_pio_closefile(ncid)