40 use netcdf,
only: nf90_close, nf90_enotnc, nf90_noerr
43 integer,
intent(in):: fileid
44 logical,
intent(out),
optional:: err
47 character(*),
parameter:: subname =
"GDNcFileClose"
55 if (.not.
associated(identptr))
goto 999
56 if (identptr % id == fileid)
exit
58 identptr => identptr % next
60 identptr % count = identptr % count - 1
61 if (identptr % count <= 0)
then
62 stat = nf90_close(fileid)
63 if (
associated(prev))
then
64 prev%next => identptr % next
69 call dbgmessage(subname //
': <%c> closed', c1=trim(identptr % filename))
72 call dbgmessage(subname //
': %d<%c> skipped for refcount=%d', &
73 & c1=trim(identptr % filename), i=(/fileid, identptr % count/))
subroutine gdncfileclose(fileid, err)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
subroutine, public dbgmessage(fmt, i, r, d, l, n, c1, c2, c3, ca)
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
logical, save id_used
id_head が初期化済みかを示すフラグ
type(gd_nc_file_id_entry), pointer, save id_head
netCDF ファイルのオープンクローズのための ID テーブル