def create_ndfd_url(lat, lon, ndfd = [''], units = 'e', start_date=(''), end_date=('')):
    """

    Args:
        lat:        latitude.
        
        lon:       longitude
        
        ndfd:       list of NDFD parameters that you are requesting.  For valid inputs 
                    see the NDFD Element Names Page below
                    https://graphical.weather.gov/xml/docs/elementInputNames.php
                    
        units:      "e" for English "m" for SI
        
        start_date: (yyyy, mm, dd) The beginning time for which you want NDFD data.   
                    If empty, the beginnng time is assumed to be the earliest available 
                    time in the database. Time should be in UTC time.
                    
        end_date:   (yyyy, mm, dd) The ending time for which you want NDFD data.   
                    If empty, the ending time is assumed to be the last available 
                    time in the database. Time should be in UTC time.
        
    Returns:
        url:        Formed url for National Digital Forecast Database (NDFD) web service


    """
    
    BASE_URL ="https://graphical.weather.gov/xml/sample_products/browser_interface/ndfdXMLclient.php?lat=LATITUDE&lon=LONGITUDE&product=time-series&begin=START_DATET00:00:00&end=END_DATET00:00:00&Unit=UNITS&NDFD"

    
    if start_date:
        start_date = [str(x) for x in start_date]
        start_date = '-'.join(start_date)
    if end_date:
        end_date = [str(x) for x in end_date]
        end_date = '-'.join(end_date)
    if list(filter(None, ndfd)):
        ndfd = [x + '=' + x for x in ndfd]
        ndfd = '&'.join(ndfd)
    else:
        ndfd = ''
    lat, lon = str(lat), str(lon)
    
    url = (BASE_URL
           .replace('LATITUDE', lat)
           .replace('LONGITUDE', lon)
           .replace('START_DATE', start_date)
           .replace('END_DATE', end_date)
           .replace('UNITS', units)
           .replace('NDFD', ndfd))
    
    return url