File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 123
123
sp = 1
124
124
ep = 0
125
125
126
- do
126
+ grps: do
127
127
ep = index (group_path(sp+1 :L), " /" )
128
-
129
- ! no subgroup found
130
128
if (ep == 0 ) return
131
129
132
130
! check subgroup exists
133
131
sp = sp + ep
134
132
call h5lexists_f(self% file_id, group_path(:sp-1 ), gexist, ier)
135
133
if (ier /= 0 ) error stop " ERROR:h5fortran:write_group: check exists group " // group_path // " in " // self% filename
136
134
137
- if (.not. gexist) then
138
- call h5gcreate_f(self% file_id, group_path(:sp-1 ), gid, ier)
139
- if (ier /= 0 ) error stop " ERROR:h5fortran:write_group: create group " // group_path // " in " // self% filename
135
+ if (gexist) cycle grps
140
136
141
- call h5gclose_f(gid, ier)
142
- if (ier /= 0 ) error stop " ERROR:h5fortran:write_group: close new group " // group_path // " in " // self% filename
143
- endif
144
- end do
137
+ call h5gcreate_f(self% file_id, group_path(:sp-1 ), gid, ier)
138
+ if (ier /= 0 ) error stop " ERROR:h5fortran:write_group: create group " // group_path // " in " // self% filename
139
+
140
+ call h5gclose_f(gid, ier)
141
+ if (ier /= 0 ) error stop " ERROR:h5fortran:write_group: close new group " // group_path // " in " // self% filename
142
+ end do grps
145
143
146
144
end procedure write_group
147
145
You can’t perform that action at this time.
0 commit comments