Skip to content

Commit

Permalink
bugfix: changing arrays from allocatable to optional and intent to in…
Browse files Browse the repository at this point in the history
…out. Allocated array glact was becoming unallocated upon entry to the readland_hrldas subroutine cause it was intent(in). Changing variable attribute to optional fixes or changing intent to inout fixes this. Variable is allocated before and never in the function, so both are appropriate.
  • Loading branch information
scrasmussen committed Sep 26, 2024
1 parent 8e226ce commit e307942
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Land_models/NoahMP/IO_code/module_hrldas_netcdf_io.F
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,8 @@ subroutine readland_hrldas(wrfinput_flnm, &
real, dimension(xstart:xend,ystart:yend), intent(out) :: seaice
real, dimension(xstart:xend,ystart:yend), intent(out) :: msftx
real, dimension(xstart:xend,ystart:yend), intent(out) :: msfty
! the following two vars have xstart:xend,ystart:yend bounds
real, dimension(:,:), intent(out), allocatable :: glact
real, dimension(:,:), intent(out), allocatable :: vis_icealb
real, dimension(xstart:xend,ystart:yend), intent(inout), optional :: glact
real, dimension(xstart:xend,ystart:yend), intent(inout), optional :: vis_icealb

character(len=256) :: units
integer :: ierr
Expand Down

0 comments on commit e307942

Please sign in to comment.