Skip to content

Commit

Permalink
Attempt to modify solar radiation downscaling to apply to topounits
Browse files Browse the repository at this point in the history
  • Loading branch information
rfiorella committed Jun 10, 2024
1 parent ac694a3 commit 1942e06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/elm/src/main/surfrdMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1631,6 +1631,7 @@ subroutine surfrd_get_topo_for_solar_rad(domain,filename)
! !USES:
use domainMod , only : domain_type
use fileutils , only : getfil
use topounit_varcon , only : max_topounits

! !ARGUMENTS:
implicit none
Expand All @@ -1642,6 +1643,7 @@ subroutine surfrd_get_topo_for_solar_rad(domain,filename)
!
! !REVISION HISTORY:
! Created by Dalei Hao
! Modified for multiple topounits by Rich Fiorella
!
! !LOCAL VARIABLES:
!EOP
Expand Down Expand Up @@ -1681,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))
allocate(latc(beg:end),lonc(beg:end),max_topounits)

call ncd_io(ncid=ncid, varname='LONGXY', flag='read', data=lonc, &
dim1name=grlnd, readvar=readvar)
Expand Down Expand Up @@ -1716,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)
deallocate(latc,lonc,max_topounits)

call ncd_pio_closefile(ncid)

Expand Down

0 comments on commit 1942e06

Please sign in to comment.