Skip to content

Commit

Permalink
Change allocatable array to extend over topounits
Browse files Browse the repository at this point in the history
Previous allocatable statement had just had
max_topounits instaed of 1:max_topounits
  • Loading branch information
rfiorella committed Jun 10, 2024
1 parent 9958291 commit 1bb5c05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/elm/src/main/surfrdMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 1bb5c05

Please sign in to comment.