def cdf_url_and_filename(dmsp_number, year, month, day):
    """ Download a DMSP file from NOAA

    Parameters
    ----------
    dmsp_number : int
        DMSP satellite number (e.g. 15)
    year : int
        Data year
    month : int
        Data month (1-12)
    day : int
        Data day of month

    Returns
    -------
    cdf_url : string
        URL to retrieve file at
    cdffn : string
        CDF filename

    """

    cdffn = ('dmsp-f%.2d' % (dmsp_number)
             +'_ssj_precipitating-electrons-ions_'
            +'%d%.2d%.2d_v1.1.2.cdf' % (year,month,day))

    root_url = 'https://satdat.ngdc.noaa.gov/dmsp/data/'
    one_month_ssj_data_url = 'f%.2d/ssj/%d/%.2d/' % (dmsp_number, year,
                             month)
    #Expected CDF file
    cdf_url = root_url + one_month_ssj_data_url + cdffn

    return cdf_url, cdffn