Skip to content

Commit

Permalink
Merge pull request #1612 from jvgeiger/fix/gefs_interpolation
Browse files Browse the repository at this point in the history
Correct interpolation in GEFS reader
  • Loading branch information
emkemp authored Sep 27, 2024
2 parents 08f8028 + e67139c commit c70a372
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lis/metforcing/gefs/read_gefs_operational.F90
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,10 @@ subroutine read_gefs_operational(n, m, findex, order, filename, ferror)
call gefs_shift_longitude( gefs_struc(n)%nc, gefs_struc(n)%nr, &
numpts, gefs_grib_data )

pcp_flag = .true.
! Spatially interp GEFS forcing field to LIS domain:
pcp_flag = .true.
call interp_gefs(n, findex, gefs_grib_data, pcp_flag, varfield )
pcp_flag = .false.

do r=1,LIS_rc%lnr(n)
do c=1,LIS_rc%lnc(n)
Expand Down
4 changes: 2 additions & 2 deletions lis/metforcing/gefs/timeinterp_gefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ subroutine timeinterp_gefs(n,findex)
call LIS_time2date(btime,bdoy,gmt2,byr,bmo,bda,bhr,bmn)


!== Interpolate data in time
!== Interpolate data in time

! Check if bookend times differ, else stop ...
if( (gefs_struc(n)%fcsttime2-gefs_struc(n)%fcsttime1)==0 ) then
Expand Down Expand Up @@ -130,14 +130,14 @@ subroutine timeinterp_gefs(n,findex)
call ESMF_FieldGet(swdField,localDE=0,farrayPtr=swd,rc=status)
call LIS_verify(status)

zdoy=LIS_rc%doy
do t=1,LIS_rc%ntiles(n)/LIS_rc%nensem(n)
do m=1,gefs_struc(n)%max_ens_members
do k=1,mfactor
tid = (t-1)*LIS_rc%nensem(n)+(m-1)*mfactor+k
index1 = LIS_domain(n)%tile(tid)%index

! Compute and apply zenith angle weights
zdoy=LIS_rc%doy
call zterp( 0, LIS_domain(n)%grid(index1)%lat, &
LIS_domain(n)%grid(index1)%lon, gmt1, gmt2, &
LIS_rc%gmt,zdoy,zw1,zw2,czb,cze,czm,LIS_rc )
Expand Down
Empty file modified lis/testcases/metforcing/gefs/MODEL_OUTPUT_LIST.TBL
100755 → 100644
Empty file.
Empty file modified lis/testcases/metforcing/gefs/README
100755 → 100644
Empty file.
Empty file modified lis/testcases/metforcing/gefs/input.ctl
100755 → 100644
Empty file.
Empty file modified lis/testcases/metforcing/gefs/input_testcase.ctl
100755 → 100644
Empty file.
Empty file modified lis/testcases/metforcing/gefs/ldt.config
100755 → 100644
Empty file.
Empty file modified lis/testcases/metforcing/gefs/lis.config
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion lis/testcases/metforcing/gefs/output.ctl
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DSET ./OUTPUT/SURFACEMODEL/%y4%m2/LIS_HIST_%y4%m2%d2%h200.d01.nc
DSET ^OUTPUT/SURFACEMODEL/%y4%m2/LIS_HIST_%y4%m2%d2%h200.d01.nc
DTYPE netcdf
OPTIONS template
UNDEF -9999
Expand Down
2 changes: 1 addition & 1 deletion lis/testcases/metforcing/gefs/testcase.ctl
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DSET ./TARGET_OUTPUT/SURFACEMODEL/%y4%m2/LIS_HIST_%y4%m2%d2%h200.d01.nc
DSET ^TARGET_OUTPUT/SURFACEMODEL/%y4%m2/LIS_HIST_%y4%m2%d2%h200.d01.nc
DTYPE netcdf
OPTIONS template
UNDEF -9999
Expand Down

0 comments on commit c70a372

Please sign in to comment.