gdncfilereopen.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine gdncfilereopen (fileid, err)
 

Function/Subroutine Documentation

◆ gdncfilereopen()

subroutine gdncfilereopen ( integer, intent(in)  fileid,
logical, intent(out), optional  err 
)

Definition at line 2 of file gdncfilereopen.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_trace::endsub(), gtdata_netcdf_file_internal::id_head, gtdata_netcdf_file_internal::id_used, and dc_error::storeerror().

Referenced by gdncvaropenbydimord().

2  ! 同じファイル番号の参照カウントを増加する。
5  use netcdf, only: nf90_enotnc
6  use dc_error, only: storeerror
8  implicit none
9  integer, intent(in):: fileid
10  logical, intent(out), optional:: err
11  type(gd_nc_file_id_entry), pointer:: identptr
12  character(*), parameter:: subname = "GDNcFileReopen"
13 continue
14  call beginsub(subname, 'file=%d', i=(/fileid/))
15  if (id_used) then
16  identptr => id_head
17  do
18  if (identptr % id == fileid) then
19  identptr % count = identptr % count + 1
20  if (present(err)) err = .false.
21  call endsub(subname, 'count=%d', i=(/identptr % count/))
22  return
23  endif
24  identptr => identptr % next
25  if (.not. associated(identptr)) exit
26  enddo
27  endif
28  call storeerror(nf90_enotnc, 'GDNcFileReopen', err, cause_i=fileid)
29  call endsub(subname, 'err')
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
type(gd_nc_file_id_entry), pointer, save id_head
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
Here is the call graph for this function:
Here is the caller graph for this function: