Skip to content

Commit

Permalink
add u,v, the vars on elems for hecuba
Browse files Browse the repository at this point in the history
  • Loading branch information
suvarchal committed Mar 25, 2024
1 parent fafac96 commit 64e239c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/io_meandata.F90
Original file line number Diff line number Diff line change
Expand Up @@ -736,22 +736,27 @@ subroutine write_mean(entry, entry_index)
if(mype==entry%root_rank) then
if(.not. allocated(entry%aux_r8)) allocate(entry%aux_r8(size2))
end if

do lev=1, size1
if(.not. entry%is_elem_based) then
#if defined (__netcdfout)
call gather_nod2D (entry%local_values_r8_copy(lev,1:size(entry%local_values_r8_copy,dim=2)), entry%aux_r8, entry%root_rank, tag, entry%comm)
#endif
! hecuba IO
#if defined (__hecubaio)
!WRITE (*,*), "sending to hecuba", entry%ctime_copy, entry%iostep, trim(runid)
call write_array(trim(runid)//C_NULL_CHAR, trim(entry%name)//C_NULL_CHAR, entry%iostep, entry%mype_workaround, entry%ptr3, myDim_nod2D)
if (mype==entry%root_rank) then
call write_time(trim(runid)//C_NULL_CHAR, entry%iostep, entry%ctime_copy)
end if
!call write_array(trim(runid)//C_NULL_CHAR, trim(entry%name)//C_NULL_CHAR, entry%iostep, entry%mype_workaround, entry%ptr3, myDim_nod2D)
call write_array(trim(runid)//C_NULL_CHAR, trim(entry%name)//C_NULL_CHAR, entry%iostep, entry%mype_workaround, entry%local_values_r8_copy(lev,1:size(entry%local_values_r8_copy,dim=2)), myDim_nod2D)
!below may have too many calls to cass so drop for now
!if (mype==entry%root_rank) then
! call write_time(trim(runid)//C_NULL_CHAR, entry%iostep, entry%ctime_copy)
!end if
#endif
else
#if defined (__netcdfout)
call gather_elem2D(entry%local_values_r8_copy(lev,1:size(entry%local_values_r8_copy,dim=2)), entry%aux_r8, entry%root_rank, tag, entry%comm)
#endif
#if defined (__hecubaio)
call write_array(trim(runid)//C_NULL_CHAR, trim(entry%name)//C_NULL_CHAR, entry%iostep, entry%mype_workaround,entry%local_values_r8_copy(lev,1:size(entry%local_values_r8_copy,dim=2)), myDim_elem2D)
#endif
end if
#if defined (__netcdfout)
Expand Down

0 comments on commit 64e239c

Please sign in to comment.