From 9dff4bb2f139a12376d219a72da175672a202035 Mon Sep 17 00:00:00 2001 From: "James V. Geiger" Date: Tue, 3 Sep 2024 12:07:21 -0400 Subject: [PATCH 1/4] Correct spatial interpolation of GEFS forcing fields The GEFS reader did not correctly reset the pcp_flag, which could cause both the swdown and the lwdown fields to be spatially interpolated using the budget_bilinear/conservative method. Note that the forcing fields in the GEFS files are found in this order: READ: sp skip: st skip: soilw skip: sdwe skip: sde skip: unknown READ: 2t READ: 2r skip: tmax skip: tmin READ: 10u READ: 10v READ: tp skip: csnow skip: cicep skip: cfrzr skip: crain skip: mslhf skip: msshf skip: pwat skip: tcc READ: dswrf READ: dlwrf skip: uswrf skip: ulwrf skip: cape skip: cin skip: prmsl --- lis/metforcing/gefs/read_gefs_operational.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lis/metforcing/gefs/read_gefs_operational.F90 b/lis/metforcing/gefs/read_gefs_operational.F90 index fa1fe7d94..42c9e8fd2 100644 --- a/lis/metforcing/gefs/read_gefs_operational.F90 +++ b/lis/metforcing/gefs/read_gefs_operational.F90 @@ -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) From efa65a58d81b88a1579b6c687d71289f3f4b5cf8 Mon Sep 17 00:00:00 2001 From: "James V. Geiger" Date: Tue, 24 Sep 2024 12:48:10 -0400 Subject: [PATCH 2/4] Correct temporal interpolation of GEFS swdown forcing field zdoy was not correctly initialized to the current day of year before calling zterp. It was incorrectly initialized outside the tile loop, resulting in zdoy decrementing by 1 for each pass through the tile loop because zdoy is an intent(inout) argument to zterp. In my particular test, zdoy started at 2 and ended at -26859. zdoy is now initialized inside the tile loop, right before the call to zterp. --- lis/metforcing/gefs/timeinterp_gefs.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lis/metforcing/gefs/timeinterp_gefs.F90 b/lis/metforcing/gefs/timeinterp_gefs.F90 index 6cb3a4fe3..610c77702 100644 --- a/lis/metforcing/gefs/timeinterp_gefs.F90 +++ b/lis/metforcing/gefs/timeinterp_gefs.F90 @@ -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 @@ -130,7 +130,6 @@ 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 @@ -138,6 +137,7 @@ subroutine timeinterp_gefs(n,findex) 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 ) From a37e1f5c6ee49f18f1d764d0fa17e0ad37a7d08a Mon Sep 17 00:00:00 2001 From: "James V. Geiger" Date: Fri, 27 Sep 2024 12:47:39 -0400 Subject: [PATCH 3/4] Correct GrADS descriptor files --- lis/testcases/metforcing/gefs/output.ctl | 2 +- lis/testcases/metforcing/gefs/testcase.ctl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lis/testcases/metforcing/gefs/output.ctl b/lis/testcases/metforcing/gefs/output.ctl index b465a4196..cc48988ec 100755 --- a/lis/testcases/metforcing/gefs/output.ctl +++ b/lis/testcases/metforcing/gefs/output.ctl @@ -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 diff --git a/lis/testcases/metforcing/gefs/testcase.ctl b/lis/testcases/metforcing/gefs/testcase.ctl index a9339b1ec..ce879cbd2 100755 --- a/lis/testcases/metforcing/gefs/testcase.ctl +++ b/lis/testcases/metforcing/gefs/testcase.ctl @@ -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 From e67139cd395ec3d28b55c7eb8ad52e22b5383b99 Mon Sep 17 00:00:00 2001 From: "James V. Geiger" Date: Fri, 27 Sep 2024 12:49:15 -0400 Subject: [PATCH 4/4] Reset file permissions --- lis/testcases/metforcing/gefs/MODEL_OUTPUT_LIST.TBL | 0 lis/testcases/metforcing/gefs/README | 0 lis/testcases/metforcing/gefs/input.ctl | 0 lis/testcases/metforcing/gefs/input_testcase.ctl | 0 lis/testcases/metforcing/gefs/ldt.config | 0 lis/testcases/metforcing/gefs/lis.config | 0 lis/testcases/metforcing/gefs/output.ctl | 0 lis/testcases/metforcing/gefs/testcase.ctl | 0 8 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 lis/testcases/metforcing/gefs/MODEL_OUTPUT_LIST.TBL mode change 100755 => 100644 lis/testcases/metforcing/gefs/README mode change 100755 => 100644 lis/testcases/metforcing/gefs/input.ctl mode change 100755 => 100644 lis/testcases/metforcing/gefs/input_testcase.ctl mode change 100755 => 100644 lis/testcases/metforcing/gefs/ldt.config mode change 100755 => 100644 lis/testcases/metforcing/gefs/lis.config mode change 100755 => 100644 lis/testcases/metforcing/gefs/output.ctl mode change 100755 => 100644 lis/testcases/metforcing/gefs/testcase.ctl diff --git a/lis/testcases/metforcing/gefs/MODEL_OUTPUT_LIST.TBL b/lis/testcases/metforcing/gefs/MODEL_OUTPUT_LIST.TBL old mode 100755 new mode 100644 diff --git a/lis/testcases/metforcing/gefs/README b/lis/testcases/metforcing/gefs/README old mode 100755 new mode 100644 diff --git a/lis/testcases/metforcing/gefs/input.ctl b/lis/testcases/metforcing/gefs/input.ctl old mode 100755 new mode 100644 diff --git a/lis/testcases/metforcing/gefs/input_testcase.ctl b/lis/testcases/metforcing/gefs/input_testcase.ctl old mode 100755 new mode 100644 diff --git a/lis/testcases/metforcing/gefs/ldt.config b/lis/testcases/metforcing/gefs/ldt.config old mode 100755 new mode 100644 diff --git a/lis/testcases/metforcing/gefs/lis.config b/lis/testcases/metforcing/gefs/lis.config old mode 100755 new mode 100644 diff --git a/lis/testcases/metforcing/gefs/output.ctl b/lis/testcases/metforcing/gefs/output.ctl old mode 100755 new mode 100644 diff --git a/lis/testcases/metforcing/gefs/testcase.ctl b/lis/testcases/metforcing/gefs/testcase.ctl old mode 100755 new mode 100644