Skip to content

Commit

Permalink
Merge branch 'iulian787/ghost_layers_bilinear' (PR #6851)
Browse files Browse the repository at this point in the history
number of ghost layers needs to be setup correctly for the bilinear maps;
different PE layouts should result in the same map.

[BFB]
  • Loading branch information
rljacob authored Jan 9, 2025
2 parents 6e40aeb + 86ad5ff commit 9743e2b
Showing 1 changed file with 9 additions and 1 deletion.
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
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

0 comments on commit 9743e2b

Please sign in to comment.