Skip to content

Commit

Permalink
feature/pole_bug: This commit references ufs-community#23.
Browse files Browse the repository at this point in the history
sfc_climo_gen and chgres_cube programs:  For regrid options
other than conservative and neighbor, change pole method from
NONE to ALLAVG.
  • Loading branch information
GeorgeGayno-NOAA committed Oct 8, 2019
1 parent adf493d commit 1341a9d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
6 changes: 3 additions & 3 deletions sorc/chgres_cube.fd/atmosphere.F90
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ subroutine atmosphere_driver(localpet)

call ESMF_FieldRegridStore(temp_input_grid, &
temp_b4adj_target_grid, &
polemethod=ESMF_POLEMETHOD_NONE, &
polemethod=ESMF_POLEMETHOD_ALLAVG, &
srctermprocessing=isrctermprocessing, &
extrapmethod=ESMF_EXTRAPMETHOD_NEAREST_STOD, &
routehandle=regrid_bl, &
Expand Down Expand Up @@ -333,7 +333,7 @@ subroutine atmosphere_driver(localpet)
print*,"- CALL FieldRegridStore FOR 3D-WIND WEST EDGE."
call ESMF_FieldRegridStore(wind_target_grid, &
wind_w_target_grid, &
polemethod=ESMF_POLEMETHOD_NONE, &
polemethod=ESMF_POLEMETHOD_ALLAVG, &
srctermprocessing=isrctermprocessing, &
extrapMethod=ESMF_EXTRAPMETHOD_NEAREST_STOD, &
routehandle=regrid_bl, &
Expand All @@ -360,7 +360,7 @@ subroutine atmosphere_driver(localpet)
print*,"- CALL FieldRegridStore FOR 3D-WIND SOUTH EDGE."
call ESMF_FieldRegridStore(wind_target_grid, &
wind_s_target_grid, &
polemethod=ESMF_POLEMETHOD_NONE, &
polemethod=ESMF_POLEMETHOD_ALLAVG, &
srctermprocessing=isrctermprocessing, &
extrapMethod=ESMF_EXTRAPMETHOD_NEAREST_STOD, &
routehandle=regrid_bl, &
Expand Down
2 changes: 1 addition & 1 deletion sorc/chgres_cube.fd/surface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ subroutine interp(localpet)
print*,"- CALL FieldRegridStore FOR NON-MASKED BILINEAR INTERPOLATION."
call ESMF_FieldRegridStore(t2m_input_grid, &
t2m_target_grid, &
polemethod=ESMF_POLEMETHOD_NONE, &
polemethod=ESMF_POLEMETHOD_ALLAVG, &
srctermprocessing=isrctermprocessing, &
routehandle=regrid_bl_no_mask, &
regridmethod=method, rc=rc)
Expand Down
9 changes: 8 additions & 1 deletion sorc/sfc_climo_gen.fd/interp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ subroutine interp(localpet, method, input_file)
type(esmf_regridmethod_flag),intent(in) :: method
type(esmf_field) :: data_field_src
type(esmf_routehandle) :: regrid_data
type(esmf_polemethod_flag) :: pole

print*,"- CALL FieldCreate FOR SOURCE GRID DATA."
data_field_src = ESMF_FieldCreate(grid_src, &
Expand Down Expand Up @@ -121,13 +122,19 @@ subroutine interp(localpet, method, input_file)

if (record == 1) then

if (method == ESMF_REGRIDMETHOD_BILINEAR) then
pole = ESMF_POLEMETHOD_ALLAVG
else
pole = ESMF_POLEMETHOD_NONE
endif

print*,"- CALL FieldRegridStore."
nullify(unmapped_ptr)
call ESMF_FieldRegridStore(data_field_src, &
data_field_mdl, &
srcmaskvalues=(/0/), &
dstmaskvalues=(/0/), &
polemethod=ESMF_POLEMETHOD_NONE, &
polemethod=pole, &
unmappedaction=ESMF_UNMAPPEDACTION_IGNORE, &
normtype=ESMF_NORMTYPE_FRACAREA, &
srctermprocessing=isrctermprocessing, &
Expand Down

0 comments on commit 1341a9d

Please sign in to comment.