Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion components/elm/src/cpl/lnd_comp_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ subroutine lnd_export_moab(EClock, bounds, lnd2atm_vars, lnd2glc_vars)
end do
tagname=trim(seq_flds_l2x_fields)//C_NULL_CHAR
ent_type = 0 ! vertices only, from now on
ierr = iMOAB_SetDoubleTagStorage ( mlnid, tagname, totalmbls , ent_type, l2x_lm(1,1) )
ierr = iMOAB_SetDoubleTagStorage ( mlnid, tagname, totalmbls , ent_type, l2x_lm )
if (ierr > 0 ) &
call shr_sys_abort( sub//' Error: fail to set moab l2x '// trim(seq_flds_l2x_fields) )

Expand Down
4 changes: 2 additions & 2 deletions components/mosart/src/cpl/rof_comp_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ subroutine rof_init_mct( EClock, cdata_r, x2r_r, r2x_r, NLFilename)
! set those fields to 0 in moab
r2x_rm = 0._r8
ent_type = 0 ! rof is point cloud on this side
ierr = iMOAB_SetDoubleTagStorage ( mrofid, tagname, totalmbls , ent_type, r2x_rm(1,1))
ierr = iMOAB_SetDoubleTagStorage ( mrofid, tagname, totalmbls , ent_type, r2x_rm)
if (ierr > 0 ) &
call shr_sys_abort( sub//' Error: fail to set to 0 seq_flds_x2r_fields ')

Expand All @@ -350,7 +350,7 @@ subroutine rof_init_mct( EClock, cdata_r, x2r_r, r2x_r, NLFilename)

! set those fields to 0 in moab
x2r_rm = 0._r8
ierr = iMOAB_SetDoubleTagStorage ( mrofid, tagname, totalmbls_r , ent_type, x2r_rm(1,1))
ierr = iMOAB_SetDoubleTagStorage ( mrofid, tagname, totalmbls_r , ent_type, x2r_rm)
if (ierr > 0 ) &
call shr_sys_abort( sub//' Error: fail to set to 0 seq_flds_x2r_fields ')
! also load initial data to moab tags, fill with some initial data
Expand Down
6 changes: 3 additions & 3 deletions components/mpas-ocean/driver/ocn_comp_mct.F
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ end subroutine xml_stream_get_attributes
endif
! set all tags to 0 in one method
ent_type = 1! cells
ierr = iMOAB_SetDoubleTagStorage ( MPOID, tagname, totalmbls , ent_type, o2x_om(1, 1) )
ierr = iMOAB_SetDoubleTagStorage ( MPOID, tagname, totalmbls , ent_type, o2x_om )
if ( ierr /= 0 ) then
write(ocnLogUnit,*) 'Fail to set MOAB fields '
endif
Expand All @@ -684,7 +684,7 @@ end subroutine xml_stream_get_attributes
call mpas_log_write('cannot define tags for MOAB x2o fields ' // trim(seq_flds_x2o_fields), MPAS_LOG_ERR)
endif
! set all tags to 0 in one method
ierr = iMOAB_SetDoubleTagStorage ( MPOID, tagname, totalmbls_r , ent_type, x2o_om(1, 1) )
ierr = iMOAB_SetDoubleTagStorage ( MPOID, tagname, totalmbls_r , ent_type, x2o_om )
if ( ierr /= 0 ) then
write(ocnLogUnit,*) 'Fail to set MOAB fields '
endif
Expand Down Expand Up @@ -4785,7 +4785,7 @@ subroutine ocn_export_moab(EClock) !{{{
ent_type = 1 ! cells
! set all tags in one method
tagname = trim(seq_flds_o2x_fields)//C_NULL_CHAR
ierr = iMOAB_SetDoubleTagStorage ( MPOID, tagname, totalmbls , ent_type, o2x_om(1, 1) )
ierr = iMOAB_SetDoubleTagStorage ( MPOID, tagname, totalmbls , ent_type, o2x_om)
if ( ierr /= 0 ) then
write(ocnLogUnit,*) 'Fail to set o2x MOAB fields '
endif
Expand Down
6 changes: 3 additions & 3 deletions components/mpas-seaice/driver/ice_comp_mct.F
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ end subroutine xml_stream_get_attributes
if ( ierrmb == 1 ) then
call mpas_log_write('cannot define tags for MOAB i2x fields ' // trim(seq_flds_i2x_fields), MPAS_LOG_ERR)
endif
ierrmb = iMOAB_SetDoubleTagStorage ( MPSIID, tagname, totalmbls , ent_type, i2x_im(1, 1) )
ierrmb = iMOAB_SetDoubleTagStorage ( MPSIID, tagname, totalmbls , ent_type, i2x_im )
if ( ierrmb /= 0 ) then
call mpas_log_write('cannot set tags for MOAB i2x fields to zero' // trim(seq_flds_i2x_fields), MPAS_LOG_ERR)
endif
Expand All @@ -760,7 +760,7 @@ end subroutine xml_stream_get_attributes
if ( ierrmb == 1 ) then
call mpas_log_write('cannot define tags for MOAB i2x fields ' // trim(seq_flds_x2i_fields), MPAS_LOG_ERR)
endif
ierrmb = iMOAB_SetDoubleTagStorage ( MPSIID, tagname, totalmblr , ent_type, x2i_im(1, 1) )
ierrmb = iMOAB_SetDoubleTagStorage ( MPSIID, tagname, totalmblr , ent_type, x2i_im )
if ( ierrmb /= 0 ) then
call mpas_log_write('cannot set tags for MOAB x2i fields to zero' // trim(seq_flds_x2i_fields), MPAS_LOG_ERR)
endif
Expand Down Expand Up @@ -3620,7 +3620,7 @@ subroutine ice_export_moab(EClock)
ent_type = 1 ! cells
! set all tags in one method
tagname = trim(seq_flds_i2x_fields)//C_NULL_CHAR
ierr = iMOAB_SetDoubleTagStorage ( MPSIID, tagname, totalmbls , ent_type, i2x_im(1, 1) )
ierr = iMOAB_SetDoubleTagStorage ( MPSIID, tagname, totalmbls , ent_type, i2x_im )
if ( ierr /= 0 ) then
write(iceLogUnit,*) 'Fail to set MOAB fields '
endif
Expand Down
2 changes: 1 addition & 1 deletion driver-moab/main/prep_aoflux_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ subroutine prep_aoflux_init (infodata)
allocate(tagValues(arrSize) )
ent_type = 1 ! cell type
tagValues = 0._r8
ierr = iMOAB_SetDoubleTagStorage ( mbofxid, tagname, arrSize , ent_type, tagValues(1))
ierr = iMOAB_SetDoubleTagStorage ( mbofxid, tagname, arrSize , ent_type, tagValues)
deallocate(tagValues)
if (ierr .ne. 0) then
write(logunit,*) subname,' error in zeroing out xao_fields '
Expand Down
5 changes: 0 additions & 5 deletions driver-moab/main/prep_ice_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,6 @@ subroutine prep_ice_init(infodata, ocn_c2_ice, glc_c2_ice, glcshelf_c2_ice, rof_
mapper_SFo2i%src_context = ocn(1)%cplcompid
mapper_SFo2i%intx_context = ice(1)%cplcompid
mapper_SFo2i%mbname = 'mapper_SFo2i'

if(mapper_SFo2i%copy_only) then
call seq_map_set_type(mapper_SFo2i, mboxid, 1) ! type is cells
endif

endif
#endif
endif
Expand Down
7 changes: 1 addition & 6 deletions driver-moab/main/prep_ocn_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module prep_ocn_mod

use seq_infodata_mod, only: seq_infodata_type, seq_infodata_getdata
use seq_map_type_mod
use seq_map_mod ! will have also moab_map_init_rcfile , seq_map_set_type
use seq_map_mod ! will have also moab_map_init_rcfile
use seq_flds_mod
use t_drv_timers_mod
use mct_mod
Expand Down Expand Up @@ -711,11 +711,6 @@ subroutine prep_ocn_init(infodata, atm_c2_ocn, atm_c2_ice, ice_c2_ocn, rof_c2_oc
mapper_SFi2o%src_context = ice(1)%cplcompid
mapper_SFi2o%intx_context = ocn(1)%cplcompid
mapper_SFi2o%mbname = 'mapper_SFi2o'

if(mapper_SFi2o%copy_only) then
call seq_map_set_type(mapper_SFi2o, mbixid, 1) ! type is cells
endif

endif
#endif
endif ! if (ice_present)
Expand Down
23 changes: 0 additions & 23 deletions driver-moab/main/seq_map_type_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ subroutine seq_map_mapinit(mapper,mpicom)
mapper%src_mbid = -1
mapper%tgt_mbid = -1
mapper%intx_mbid = -1
mapper%nentities = 0
mapper%tag_entity_type = 1 ! cells most of the time when we need it
mapper%mbname = "undefined"
#ifdef MOABCOMP
Expand Down Expand Up @@ -210,26 +209,4 @@ subroutine seq_map_gsmapcheck(gsmap1,gsmap2)

end subroutine seq_map_gsmapcheck

!===============================================================================

subroutine seq_map_set_type(mapper, mbid, ent_type)
use iMOAB, only: iMOAB_GetMeshInfo
type(seq_map) ,intent(in),pointer :: mapper
integer ,intent(in) :: mbid
integer ,intent(in) :: ent_type

integer nvert(3), nvise(3), nbl(3), nsurf(3), nvisBC(3), ierr


ierr = iMOAB_GetMeshInfo ( mbid, nvert, nvise, nbl, nsurf, nvisBC );
if (ent_type .eq. 0) then
mapper%nentities = nvert(1)
else if (ent_type .eq. 1) then
mapper%nentities = nvise(1)
endif

mapper%tag_entity_type = ent_type

end subroutine seq_map_set_type

end module seq_map_type_mod