7 use netcdf, only: &
8 & nf90_put_att, &
9 & nf90_noerr, &
10 & nf90_del_att, &
11 & nf90_enotindefine, &
12 & nf90_global
15 implicit none
16 type(GD_NC_VARIABLE), intent(in):: var
17 character(len = *), intent(in):: name
18 type(GD_NC_VARIABLE_ENTRY):: ent
19 integer, intent(in):: value(:)
20 logical, intent(out), optional:: err
21 integer:: stat
22 continue
24 if (stat /= nf90_noerr) goto 999
25 if (size(value) == 0) then
27 stat = nf90_del_att(ent%fileid, nf90_global, name(2:))
28 else
29 stat = nf90_del_att(ent%fileid, ent%varid, name)
30 endif
31 goto 999
32 endif
34 if (stat /= nf90_noerr) goto 999
36 stat = nf90_put_att(ent%fileid, nf90_global, name(2:), value)
37 else
38 stat = nf90_put_att(ent%fileid, ent%varid, name, value)
39 endif
40999 continue
41 call storeerror(stat,
'GDNcVarPutAttrInt', err)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
character, parameter, public gt_plus
integer function, public vtable_lookup(var, entry)