gdncfileinquirename.f90
Go to the documentation of this file.
1 subroutine gdncfileinquirename(fileid, name)
4  use netcdf, only: nf90_enotnc
5  use dc_error
7  integer, intent(in):: fileid
8  character(len = *), intent(out):: name
9  type(gd_nc_file_id_entry), pointer:: identptr
10  character(*), parameter:: subname = "GDNcFileName"
11  continue
12  call beginsub(subname, 'fileid=%d', i=(/fileid/))
13  if (.not. id_used) goto 999
14  identptr => id_head
15  do
16  if (.not. associated(identptr)) exit
17  if (identptr % id == fileid) then
18  name = identptr % filename
19  call endsub(subname, 'name=<%c>', c1=trim(name))
20  return
21  endif
22  identptr => identptr % next
23  enddo
24 999 continue
25  call storeerror(nf90_enotnc, subname)
26  call endsub(subname, 'err')
27 end subroutine gdncfileinquirename
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 gdncfileinquirename(fileid, name)
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446