27 integer,
parameter ::
ncfloat = nf90_double
44 type(mpl_type),
intent(in) :: mpl
45 integer,
intent(in) :: ncid
46 character(len=*),
intent(in) :: varname
47 integer,
intent(in) :: var
50 character(len=1024) :: subr=
'put_att_integer' 53 call mpl%ncerr(subr,nf90_put_att(ncid,nf90_global,trim(varname),var))
66 type(mpl_type),
intent(in) :: mpl
67 integer,
intent(in) :: ncid
68 character(len=*),
intent(in) :: varname
69 integer,
intent(in) :: n
70 integer,
intent(in) :: var(n)
74 character(len=1024) :: str,fullstr
75 character(len=1024) :: subr=
'put_att_integer_array' 79 write(fullstr,
'(i3.3)') var(1)
81 write(str,
'(i3.3)') var(i)
82 fullstr = trim(fullstr)//
':'//trim(str)
84 call mpl%ncerr(subr,nf90_put_att(ncid,nf90_global,trim(varname),trim(fullstr)))
98 type(mpl_type),
intent(in) :: mpl
99 integer,
intent(in) :: ncid
100 character(len=*),
intent(in) :: varname
101 real(kind_real),
intent(in) :: var
104 character(len=1024) :: subr=
'put_att_real' 107 call mpl%ncerr(subr,nf90_put_att(ncid,nf90_global,trim(varname),var))
120 type(mpl_type),
intent(in) :: mpl
121 integer,
intent(in) :: ncid
122 character(len=*),
intent(in) :: varname
123 integer,
intent(in) :: n
124 real(kind_real),
intent(in) :: var(n)
128 character(len=1024) :: str,fullstr
129 character(len=1024) :: subr=
'put_att_real_array' 133 write(fullstr,
'(e10.3)') var(1)
135 write(str,
'(e10.3)') var(i)
136 fullstr = trim(fullstr)//
':'//trim(str)
138 call mpl%ncerr(subr,nf90_put_att(ncid,nf90_global,trim(varname),trim(fullstr)))
152 type(mpl_type),
intent(in) :: mpl
153 integer,
intent(in) :: ncid
154 character(len=*),
intent(in) :: varname
155 logical,
intent(in) :: var
158 character(len=1024) :: subr=
'put_att_logical' 162 call mpl%ncerr(subr,nf90_put_att(ncid,nf90_global,trim(varname),
'.true.'))
164 call mpl%ncerr(subr,nf90_put_att(ncid,nf90_global,trim(varname),
'.false.'))
178 type(mpl_type),
intent(in) :: mpl
179 integer,
intent(in) :: ncid
180 character(len=*),
intent(in) :: varname
181 integer,
intent(in) :: n
182 logical,
intent(in) :: var(n)
186 character(len=1024) :: str,fullstr
187 character(len=1024) :: subr=
'put_att_logical_array' 192 write(fullstr,
'(a6)')
'.true.' 194 write(fullstr,
'(a7)')
'.false.' 198 write(str,
'(a6)')
'.true.' 200 write(str,
'(a7)')
'.false.' 202 fullstr = trim(fullstr)//
':'//trim(str)
204 call mpl%ncerr(subr,nf90_put_att(ncid,nf90_global,trim(varname),trim(fullstr)))
218 type(mpl_type),
intent(in) :: mpl
219 integer,
intent(in) :: ncid
220 character(len=*),
intent(in) :: varname
221 character(len=*),
intent(in) :: var
224 character(len=1024) :: subr=
'put_att_string' 227 call mpl%ncerr(subr,nf90_put_att(ncid,nf90_global,trim(varname),trim(var)))
240 type(mpl_type),
intent(in) :: mpl
241 integer,
intent(in) :: ncid
242 character(len=*),
intent(in) :: varname
243 integer,
intent(in) :: n
244 character(len=*),
intent(in) :: var(n)
248 character(len=1024) :: fullstr
249 character(len=1024) :: subr=
'put_att_string_array' 253 fullstr = trim(var(1))
255 fullstr = trim(fullstr)//
':'//trim(var(i))
257 call mpl%ncerr(subr,nf90_put_att(ncid,nf90_global,trim(varname),trim(fullstr)))
integer, parameter, public kind_real