Writes grid attributes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(h5hut_obj), | intent(inout) | :: | this |
A H5hut object |
||
| character(len=*), | intent(in) | :: | name |
Variable name |
||
| real(kind=wp), | intent(in) | :: | xlo(3) |
Coordinate of the low bound |
||
| real(kind=wp), | intent(in) | :: | dx(3) |
Grid spacing |
impure subroutine h5hut_obj_WriteGrid(this,name,xlo,dx) !> Writes grid attributes. implicit none class(h5hut_obj), intent(inout) :: this !! A H5hut object character(len=*), intent(in) :: name !! Variable name real(wp), intent(in) :: xlo(3) !! Coordinate of the low bound real(wp), intent(in) :: dx(3) !! Grid spacing ! Work variables real(leapDP) :: xlo_(3),dx_(3) xlo_=real(xlo, leapDP) dx_ =real(dx, leapDP) ! Create paraent block group if needed if (.not.this%block_group_exists) then call this%hdf5%CreateGroup(trim(adjustl(this%step_name))//'Block/') this%block_group_exists = .true. end if ! Set block attributes call this%hdf5%WriteAttributes(trim(adjustl(this%step_name))//'Block/'//trim(adjustl(name))//'/','__Origin__',xlo_) call this%hdf5%WriteAttributes(trim(adjustl(this%step_name))//'Block/'//trim(adjustl(name))//'/','__Spacing__',dx_) return end subroutine h5hut_obj_WriteGrid