14
15
16
17
18
19
20
21
22
23
24
25
26
28 use gtdata_generic, only: get_attr, put_attr
32 use dc_trace, only: beginsub, endsub
35 implicit none
36 type(GT_VARIABLE), intent(inout):: to
37 character(len = *), intent(in):: attrname
38 type(GT_VARIABLE), intent(in):: from
39 logical, intent(out), optional:: err
40 character(STRING):: svalue
41 integer:: from_class, from_cid, to_class, to_cid, stat
42continue
43 if (present(err)) err = .false.
44 call beginsub('gtvarcopyattr', 'mapid to=%d from=%d name=%c', &
45 & i=(/to%mapid, from%mapid/), c1=attrname)
46 call var_class(from, from_class, from_cid)
48 if (from_class == vtb_class_netcdf .and. to_class == vtb_class_netcdf) then
51 else
52
53 call get_attr(from, attrname, svalue, default=
'')
54 call put_attr(to, attrname, svalue,
'', err)
56 endif
58 call endsub('gtvarcopyattr', 'stat = %d', i=(/stat/))
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
Provides kind type parameter values.
integer, parameter, public string
Character length for string
subroutine, public var_class(var, class, cid)