gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
gdncattrinquire.f90
Go to the documentation of this file.
1! -*- mode: f90; coding: utf-8 -*-
16
34subroutine gdncattrinquire(var, attrname, xtype)
38 use netcdf, only: nf90_max_name, nf90_noerr, nf90_inquire_attribute
39 implicit none
40 type(gd_nc_variable), intent(in):: var
41 character(len=*), intent(in):: attrname
42 character(len=*), intent(out), optional:: xtype
43 type(gd_nc_variable_entry):: ent
44 integer:: varid, i_xtype, stat
45 character(len=NF90_MAX_NAME):: anam
46 stat = vtable_lookup(var, ent)
47 if (stat /= nf90_noerr) return
48 if (present(xtype)) then
49 call inquireplus(var, attrname, varid, anam)
50 stat = nf90_inquire_attribute(ent%fileid, varid, anam, xtype=i_xtype)
51 if (stat /= nf90_noerr) i_xtype = 0
52 call gdncxtypename(i_xtype, xtype)
53 endif
54end subroutine
55
78subroutine gdncattrinquireplus(var, attrname, varid, nf_attrname)
81 use dc_url, only: gt_plus
82 use netcdf, only: nf90_global, nf90_noerr, nf90_inquire_attribute
83 type(gd_nc_variable), intent(in):: var
84 character(len=*), intent(in):: attrname
85 integer, intent(out):: varid
86 type(gd_nc_variable_entry):: ent
87 character(len=*), intent(out):: nf_attrname
88 integer:: stat, n
89 stat = vtable_lookup(var, ent)
90 if (stat /= nf90_noerr) return
91 if (attrname(1:1) == gt_plus) then
92 varid = nf90_global
93 nf_attrname = attrname(2: )
94 else if (attrname(1:1) == '-') then
95 varid = ent%varid
96 nf_attrname = attrname(2: )
97 stat = nf90_inquire_attribute(ent%fileid, varid, nf_attrname, len = n)
98 if (stat == nf90_noerr) return
99 varid = nf90_global
100 else
101 varid = ent%varid
102 nf_attrname = attrname
103 endif
104end subroutine gdncattrinquireplus
subroutine gdncattrinquire(var, attrname, xtype)
subroutine gdncattrinquireplus(var, attrname, varid, nf_attrname)
an 層の内部使用ルーチン
変数 URL の文字列解析
Definition dc_url.f90:61
character, parameter, public gt_plus
Definition dc_url.f90:109
integer function, public vtable_lookup(var, entry)