gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
Functions/Subroutines
gdncfileinquirename.f90 File Reference

オープン中の netCDF ファイルのファイル名を取得 More...

Go to the source code of this file.

Functions/Subroutines

subroutine gdncfileinquirename (fileid, name)
 

Detailed Description

オープン中の netCDF ファイルのファイル名を取得

Author
Yasuhiro MORIKAWA, Eizi TOYODA

Definition in file gdncfileinquirename.f90.

Function/Subroutine Documentation

◆ gdncfileinquirename()

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

オープン中の netCDF ファイルのファイル名を取得

内部ファイルリストから指定されたファイル ID を検索し、 関連付けられたファイル名を返します。ファイル ID が見つからない場合は エラーを発生させます。

Parameters
[in]fileidnetCDF ファイル ID
[out]nameファイル名

Definition at line 36 of file gdncfileinquirename.f90.

39 use netcdf, only: nf90_enotnc
40 use dc_error
42 integer, intent(in):: fileid
43 character(len = *), intent(out):: name
44 type(GD_NC_FILE_ID_ENTRY), pointer:: identptr
45 character(*), parameter:: subname = "GDNcFileName"
46 continue
47 call beginsub(subname, 'fileid=%d', i=(/fileid/))
48 if (.not. id_used) goto 999
49 identptr => id_head
50 do
51 if (.not. associated(identptr)) exit
52 if (identptr % id == fileid) then
53 name = identptr % filename
54 call endsub(subname, 'name=<%c>', c1=trim(name))
55 return
56 endif
57 identptr => identptr % next
58 enddo
59999 continue
60 call storeerror(nf90_enotnc, subname)
61 call endsub(subname, 'err')
エラー処理用モジュール
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
デバッグ時の追跡用モジュール
Definition dc_trace.f90:150
subroutine, public dbgmessage(fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:680
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:476
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:599
logical, save id_used
id_head が初期化済みかを示すフラグ
type(gd_nc_file_id_entry), pointer, save id_head

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().

Here is the call graph for this function: