Skip to content

Commit

Permalink
IMERG Precipitation Reader for LVT
Browse files Browse the repository at this point in the history
This update adds a reader to LVT that reads in GPM IMERG precipitation
data. This reader only works with the latest IMERG release (V05B) and
includes a configuration option that allows the user to switch between
the early, late, and final versions of the IMERG product.

Version NASA-LIS#2: Removed excessive whitespace from code.
  • Loading branch information
Daniel Sarmiento committed Feb 22, 2019
1 parent 3613d47 commit 727899f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lvt/datastreams/IMERG/readIMERGdata.F90
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ subroutine readIMERGdata(source)
! Initialize variables
prcp(:) = LVT_rc%udef
prcp_final(:,:) = LVT_rc%udef

currTime = float(LVT_rc%dhr(source))*3600+ &
60*LVT_rc%dmn(source) + LVT_rc%dss(source)
! Read every 30 minutes
alarmCheck = (mod(currtime,1800.0).eq.0)

! Read precipitation. IMERG data are available every 30 minutes.
yr1 = LVT_rc%dyr(source)
mo1 = LVT_rc%dmo(source)
Expand All @@ -67,7 +65,6 @@ subroutine readIMERGdata(source)
call ESMF_TimeSet(time1,yy=yr1, mm=mo1, dd=da1, &
h=hr1,m=mn1,s=ss1,calendar=LVT_calendar,rc=status)
call LVT_verify(status)

! If it is 00Z, use previous day's time level
if (mod(currtime,86400.0).eq.0) then
call ESMF_TimeIntervalSet(lis_ts, s = 86400, &
Expand All @@ -79,7 +76,6 @@ subroutine readIMERGdata(source)
call LVT_verify(status)
end if
time2 = time1 - lis_ts

call ESMF_TimeGet(time2,yy=yr2, mm=mo2, dd=da2, &
h=hr2,m=mn2,s=ss2,calendar=LVT_calendar, &
dayOfYear=jda2, rc=status)
Expand All @@ -88,7 +84,6 @@ subroutine readIMERGdata(source)
if (alarmCheck) then
call create_IMERG_filename(imergdata(source)%odir, &
yr1,mo1,da1,hr1,mn1,filename)

inquire(file=trim(filename),exist=file_exists)

if(file_exists) then
Expand Down

0 comments on commit 727899f

Please sign in to comment.