1 subroutine da_get_gl_att_int_cdf(file, att_name, value, debug, return_code)
3 !-----------------------------------------------------------------------
5 !-----------------------------------------------------------------------
11 character (len=*), intent(in) :: file
12 character (len=*), intent(in) :: att_name
13 logical, intent(in) :: debug
14 integer, intent(out) :: value
15 integer, optional, intent(out) :: return_code
17 integer :: cdfid, rcode
19 ! if (trace_use_dull) call da_trace_entry("da_get_gl_att_int_cdf")
21 cdfid = ncopn(file, NCNOWRIT, rcode)
24 if (debug) write(unit=stdout,fmt=*) ' open netcdf file ', trim(file)
26 write(unit=stdout,fmt=*) ' error openiing netcdf file ', trim(file)
30 rcode = NF_GET_ATT_inT(cdfid, nf_global, att_name, value)
32 if ( present(return_code) ) then
36 call ncclos(cdfid,rcode)
38 if (debug) write(unit=stdout,fmt=*) ' global attribute ',att_name,' is ',value
40 ! if (trace_use_dull) call da_trace_exit("da_get_gl_att_int_cdf")
42 end subroutine da_get_gl_att_int_cdf