Functions/Subroutines
gdncfileinquirename.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine gdncfileinquirename (fileid, name)
 

Function/Subroutine Documentation

◆ gdncfileinquirename()

subroutine gdncfileinquirename ( integer, intent(in)  fileid,
character(len = *), intent(out)  name 
)

Definition at line 2 of file gdncfileinquirename.f90.

References gtdata_netcdf_file_internal::id_head, gtdata_netcdf_file_internal::id_used, and dc_error::storeerror().

2  use gtdata_netcdf_file_types, only: gd_nc_file_id_entry
4  use netcdf, only: nf90_enotnc
5  use dc_error
6  use dc_trace, only: beginsub, endsub, dbgmessage
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')
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
Here is the call graph for this function: