Skip to content

Commit 26f997c

Browse files
authored
Merge pull request #364 from jedwards4b/xgrid_reproducability_fix
fix issue with xgrid reproducibility
2 parents 22dbf82 + 61cf378 commit 26f997c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mediator/med_phases_aofluxes_mod.F90

+4-2
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@ subroutine med_aofluxes_init_xgrid(gcomp, aoflux_in, aoflux_out, rc)
768768
type(ESMF_Mesh) :: xch_mesh
769769
real(r8), pointer :: dataptr(:)
770770
integer :: fieldcount
771+
integer :: stp ! srcTermProcessing is declared inout and must have variable not constant
771772
type(ESMF_CoordSys_Flag) :: coordSys
772773
real(ESMF_KIND_R8) ,allocatable :: garea(:)
773774
character(len=*),parameter :: subname=' (med_aofluxes_init_xgrid) '
@@ -870,11 +871,12 @@ subroutine med_aofluxes_init_xgrid(gcomp, aoflux_in, aoflux_out, rc)
870871
regridmethod=ESMF_REGRIDMETHOD_CONSERVE_2ND, rc=rc)
871872
if (chkerr(rc,__LINE__,u_FILE_u)) return
872873
if (trim(coupling_mode) == 'cesm') then
874+
stp = 1
873875
call ESMF_FieldRegridStore(field_a, field_x, routehandle=rh_agrid2xgrid_bilinr, &
874-
regridmethod=ESMF_REGRIDMETHOD_BILINEAR, dstMaskValues=(/0/), rc=rc)
876+
regridmethod=ESMF_REGRIDMETHOD_BILINEAR, dstMaskValues=(/0/), srcTermProcessing=stp, rc=rc)
875877
if (chkerr(rc,__LINE__,u_FILE_u)) return
876878
call ESMF_FieldRegridStore(field_a, field_x, routehandle=rh_agrid2xgrid_patch, &
877-
regridmethod=ESMF_REGRIDMETHOD_PATCH, dstMaskValues=(/0/), rc=rc)
879+
regridmethod=ESMF_REGRIDMETHOD_PATCH, dstMaskValues=(/0/), srcTermProcessing=stp, rc=rc)
878880
if (chkerr(rc,__LINE__,u_FILE_u)) return
879881
end if
880882

0 commit comments

Comments
 (0)