1 subroutine da_get_bdytimestr_cdf(file, time_flag, bdytimestr, max_times, debug)
7 integer, intent(in) :: max_times
8 logical, intent(in) :: debug
9 character(len=*), intent(in) :: file
10 character(len=*), intent(in) :: time_flag
11 character(len=80), intent(out) :: bdytimestr(max_times)
13 character(len=80) :: varnam, time1
15 integer :: cdfid, rcode, id_time
16 integer :: ndims, natts, idims(10), istart(10),iend(10), dimids(10)
19 ! if (trace_use) call da_trace_entry("da_get_bdytimestr_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 varnam = 'md___' // trim(time_flag) // 'e_x_t_d_o_m_a_i_n_m_e_t_a_data_'
32 id_time = ncvid(cdfid, varnam, rcode)
34 rcode = nf_inq_var(cdfid, id_time, varnam, ivtype, ndims, dimids, natts)
37 write(unit=stdout,fmt=*) ' number of dims for bdytime ',ndims
41 rcode = nf_inq_dimlen(cdfid, dimids(i), idims(i))
42 if (debug) write(unit=stdout,fmt=*) ' dimension ',i,idims(i)
53 rcode = NF_GET_VARA_TEXT (cdfid, id_time, &
58 if (debug) write(unit=stdout,fmt=*) trim(file), time1(1:19)
59 bdytimestr(i) = time1(1:19)
62 call ncclos(cdfid,rcode)
64 ! if (trace_use) call da_trace_exit("da_get_bdytimestr_cdf")
66 end subroutine da_get_bdytimestr_cdf