Loading...
Searching...
No Matches
gdncfileinquirename.f90
Go to the documentation of this file.
1subroutine gdncfileinquirename(fileid, name)
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
24999 continue
25 call storeerror(nf90_enotnc, subname)
26 call endsub(subname, 'err')
27end subroutine gdncfileinquirename
subroutine gdncfileinquirename(fileid, name)
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