Skip to content

Commit

Permalink
Update the temporal interpolation in GLASS LAI reader
Browse files Browse the repository at this point in the history
The GLASS LAI reader segfaults when the 'GLASS LAI apply temporal smoother between 8-day intervals:' option is turned on, due to improper initialization of variables. This updates fixes these errors.

resolves issue NASA-LIS#2
  • Loading branch information
sujayvkumar committed Nov 13, 2018
1 parent f39ba74 commit 79dfed9
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions lis/dataassim/obs/GLASS_LAI/read_GLASSlai.F90
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,22 @@ subroutine read_GLASSlai(n, k, OBS_State, OBS_Pert_State)
endif
endif

dataCheck = .false.
if(GLASSlai_struc(n)%tsmooth.eq.1) then
if(GLASSlai_struc(n)%fnd.ne.0) then
dataCheck = .true.
dataCheck = .false.
if(alarmCheck) then
if(GLASSlai_struc(n)%tsmooth.eq.1) then
if(GLASSlai_struc(n)%fnd.ne.0) then
dataCheck = .true.
fnd = 1
endif
else
if(fnd.eq.1) then
dataCheck = .true.
endif
endif
else
if(fnd.eq.1) then
dataCheck = .true.
endif
fnd = 0
dataCheck = .false.
endif

if(dataCheck) then

! open(100,file='test_out.bin',form='unformatted')
Expand Down

0 comments on commit 79dfed9

Please sign in to comment.