easier to understand

the condition is there to avoid problems if the dataset is not created
because it is empty (e.g. requesting xi_sl for Nslip=[0])
This commit is contained in:
Martin Diehl 2022-02-27 03:12:30 +01:00
parent c7b512a94e
commit f78c422af9
1 changed files with 4 additions and 10 deletions

View File

@ -388,14 +388,11 @@ subroutine results_writeVectorDataset_real(dataset,group,label,description,SIuni
integer(HID_T) :: groupHandle
if (present(systems)) then
if (size(systems)*size(dataset,2) == 0 ) return !ToDo: maybe also implement for other results_write (not sure about scalar)
end if
groupHandle = results_openGroup(group)
call HDF5_write(dataset,groupHandle,label)
call executionStamp(group//'/'//label,description,SIunit)
if (present(systems)) call HDF5_addAttribute(resultsFile,'systems',systems,group//'/'//label)
if (present(systems) .and. HDF5_objectExists(groupHandle,label)) &
call HDF5_addAttribute(resultsFile,'systems',systems,group//'/'//label)
call HDF5_closeGroup(groupHandle)
end subroutine results_writeVectorDataset_real
@ -454,14 +451,11 @@ subroutine results_writeVectorDataset_int(dataset,group,label,description,SIunit
integer(HID_T) :: groupHandle
if (present(systems)) then
if (size(systems) == 0 ) return !ToDo: maybe also implement for other results_write (not sure about scalar)
end if
groupHandle = results_openGroup(group)
call HDF5_write(dataset,groupHandle,label)
call executionStamp(group//'/'//label,description,SIunit)
if (present(systems)) call HDF5_addAttribute(resultsFile,'systems',systems,group//'/'//label)
if (present(systems) .and. HDF5_objectExists(groupHandle,label)) &
call HDF5_addAttribute(resultsFile,'systems',systems,group//'/'//label)
call HDF5_closeGroup(groupHandle)
end subroutine results_writeVectorDataset_int