Skip to content

Commit 28f8501

Browse files
committed
index for aream
1 parent 3742c43 commit 28f8501

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

driver-moab/main/component_mod.F90

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,8 @@ subroutine component_init_aream(infodata, rof_c2_ocn, samegrid_ao, samegrid_al,
615615
tagname='aream'//C_NULL_CHAR
616616
nloc = mct_avect_lsize(dom_s%data)
617617
allocate(data1(nloc))
618-
data1 = dom_s%data%rAttr(ka,:)
618+
km = mct_aVect_indexRa(dom_s%data, "aream" )
619+
data1 = dom_s%data%rAttr(km,:)
619620
ent_type = 1 ! element dense double tags
620621
allocate(gids(nloc))
621622
gids = dom_s%data%iAttr(mct_aVect_indexIA(dom_s%data,"GlobGridNum"),:)
@@ -628,6 +629,14 @@ subroutine component_init_aream(infodata, rof_c2_ocn, samegrid_ao, samegrid_al,
628629
endif
629630
deallocate(gids)
630631
deallocate(data1)
632+
#ifdef MOABDEBUG
633+
ierr = iMOAB_WriteMesh(mbrxid, trim('recRofWithAream.h5m'//C_NULL_CHAR), &
634+
trim(';PARALLEL=WRITE_PART'//C_NULL_CHAR))
635+
if (ierr .ne. 0) then
636+
write(logunit,*) subname,' error in writing rof mesh coupler '
637+
call shr_sys_abort(subname//' ERROR in writing rof mesh coupler ')
638+
endif
639+
#endif
631640
endif
632641
endif
633642
end if

0 commit comments

Comments
 (0)