Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

number of ghost layers needs to be set for bilinear maps #6851

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion driver-moab/main/prep_ocn_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ subroutine prep_ocn_init(infodata, atm_c2_ocn, atm_c2_ice, ice_c2_ocn, rof_c2_oc
use iMOAB, only: iMOAB_ComputeMeshIntersectionOnSphere, iMOAB_RegisterApplication, &
iMOAB_WriteMesh, iMOAB_DefineTagStorage, iMOAB_ComputeCommGraph, iMOAB_ComputeScalarProjectionWeights, &
iMOAB_MigrateMapMesh, iMOAB_WriteLocalMesh, iMOAB_GetMeshInfo, iMOAB_SetDoubleTagStorage, &
iMOAB_WriteMappingWeightsToFile
iMOAB_WriteMappingWeightsToFile, iMOAB_SetGhostLayers
!---------------------------------------------------------------
! Description
! Initialize module attribute vectors and all other non-mapping
Expand Down Expand Up @@ -269,6 +269,7 @@ subroutine prep_ocn_init(infodata, atm_c2_ocn, atm_c2_ice, ice_c2_ocn, rof_c2_oc
integer ent_type ! for setting tags
integer noflds ! used for number of fields in allocating moab accumulated array x2oacc_om
real (kind=R8) , allocatable :: tmparray (:) ! used to set the r2x fields to 0
integer nghlay ! used to set the number of ghost layers, needed for bilinear map

!---------------------------------------------------------------

Expand Down Expand Up @@ -426,6 +427,13 @@ subroutine prep_ocn_init(infodata, atm_c2_ocn, atm_c2_ice, ice_c2_ocn, rof_c2_oc
! next, let us compute the ATM and OCN data transfer
if (.not. samegrid_ao) then ! not a data OCN model

! for bilinear maps, we need to have a layer of ghosts on source
nghlay = 1 ! number of ghost layers
ierr = iMOAB_SetGhostLayers( mbaxid, nghlay )
if (ierr .ne. 0) then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested an app that computes both conservative and bilinear in the same instance, when bilinear requires a ghost layer. Did you verify that conservative maps then remain the same? They should since we are adding more information to the mesh but I want to ensure the ghosted elements don't get counted twice. @iulian787

The change itself looks fine to, pending MOAB changes to get the functionality working correctly.

write(logunit,*) subname,' error in setting the number of layers'
call shr_sys_abort(subname//' error in setting the number of layers')
endif
! first compute the overlap mesh between mbaxid (ATM) and mboxid (OCN) on coupler PEs
ierr = iMOAB_ComputeMeshIntersectionOnSphere (mbaxid, mboxid, mbintxao)
if (ierr .ne. 0) then
Expand Down
Loading