38 use netcdf,
only: nf90_max_name, nf90_noerr, nf90_inquire_attribute
41 character(len=*),
intent(in):: attrname
42 character(len=*),
intent(out),
optional:: xtype
44 integer:: varid, i_xtype, stat
45 character(len=NF90_MAX_NAME):: anam
47 if (stat /= nf90_noerr)
return
48 if (
present(xtype))
then
50 stat = nf90_inquire_attribute(ent%fileid, varid, anam, xtype=i_xtype)
51 if (stat /= nf90_noerr) i_xtype = 0
82 use netcdf,
only: nf90_global, nf90_noerr, nf90_inquire_attribute
84 character(len=*),
intent(in):: attrname
85 integer,
intent(out):: varid
87 character(len=*),
intent(out):: nf_attrname
90 if (stat /= nf90_noerr)
return
91 if (attrname(1:1) ==
gt_plus)
then
93 nf_attrname = attrname(2: )
94 else if (attrname(1:1) ==
'-')
then
96 nf_attrname = attrname(2: )
97 stat = nf90_inquire_attribute(ent%fileid, varid, nf_attrname, len = n)
98 if (stat == nf90_noerr)
return
102 nf_attrname = attrname