Skip to content

Commit

Permalink
fix from Denise for crash when diagnose is on by initializing
Browse files Browse the repository at this point in the history
  • Loading branch information
uturuncoglu committed Jan 25, 2024
1 parent a1cbcbc commit fb993eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mediator/med_map_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -893,12 +893,14 @@ subroutine med_map_packed_field_create(destcomp, flds_scalar_name, &
if (npacked(mapindex) > 0) then
! Create the packed source field bundle for mapindex
allocate(ptrsrc_packed(npacked(mapindex), lsize_src))
ptrsrc_packed(npacked(mapindex),:) = 0._R8
packed_data(mapindex)%field_src = ESMF_FieldCreate(lmesh_src, &
ptrsrc_packed, gridToFieldMap=(/2/), meshloc=ESMF_MESHLOC_ELEMENT, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

! Create the packed destination field bundle for mapindex
allocate(ptrdst_packed(npacked(mapindex), lsize_dst))
ptrdst_packed(npacked(mapindex),:) = 0._R8
packed_data(mapindex)%field_dst = ESMF_FieldCreate(lmesh_dst, &
ptrdst_packed, gridToFieldMap=(/2/), meshloc=ESMF_MESHLOC_ELEMENT, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
Expand Down

0 comments on commit fb993eb

Please sign in to comment.