def read_ecmwf_macc(filename, latitude, longitude, utc_time_range=None):
ecmwf_macc = ECMWF_MACC(filename)<EOL>try:<EOL><INDENT>ilat, ilon = ecmwf_macc.get_nearest_indices(latitude, longitude)<EOL>nctime = ecmwf_macc.data['<STR_LIT:time>']<EOL>if utc_time_range:<EOL><INDENT>start_idx = netCDF4.date2index(<EOL>utc_time_range[<NUM_LIT:0>], nctime, select='<STR_LIT>')<EOL>stop_idx = netCDF4.date2index(<EOL>utc_time_range[-<NUM_LIT:1>], nctime, select='<STR_LIT>')<EOL>time_slice = slice(start_idx, stop_idx + <NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>time_slice = slice(<NUM_LIT:0>, ecmwf_macc.time_size)<EOL><DEDENT>times = netCDF4.num2date(nctime[time_slice], nctime.units)<EOL>df = {k: ecmwf_macc.data[k][time_slice, ilat, ilon]<EOL>for k in ecmwf_macc.keys}<EOL>if ECMWF_MACC.TCWV in df:<EOL><INDENT>df['<STR_LIT>'] = df[ECMWF_MACC.TCWV] / <NUM_LIT><EOL><DEDENT><DEDENT>finally:<EOL><INDENT>ecmwf_macc.data.close()<EOL><DEDENT>return pd.DataFrame(df, index=times.astype('<STR_LIT>'))<EOL>
Read data from ECMWF MACC reanalysis netCDF4 file.

Parameters
----------
filename : string
    full path to netCDF4 data file.
latitude : float
    latitude in degrees
longitude : float
    longitude in degrees
utc_time_range : sequence of datetime.datetime
    pair of start and stop naive or UTC date-times

Returns
-------
data : pandas.DataFrame
    dataframe for specified range of UTC date-times