def ncread_ts(ncvar, tidx_start=None, tidx_end=None):
    """Read in timeseries [ntime] from a netCDF variable.

    :ncvar: (netCDF variable) input variable
    :tidx_start: (int) starting index
    :tidx_end: (int) ending index
    :returns: (numpy array) timeseries data

    """
    # read in profile
    nsize = ncvar.ndim
    if nsize == 4:
        dat = ncvar[tidx_start:tidx_end,0,0,0]
    elif nsize == 3:
        dat = ncvar[tidx_start:tidx_end,0,0]
    elif nsize == 1:
        dat = ncvar[tidx_start:tidx_end]
    else:
        dat = None
    return dat