#+
    # CNES2MODIS : Convert CNES julian days to MODIS data format (YYYYDDD)
    # 
    # @author: Renaud DUSSURGET (LEGOS/CTOH)
    # @history: Created by RD on 2/12/2011
    #           Adapted to Python on 29/10/2012 by RD (now at LER PAC/IFREMER)
    #
    #-

def cnes2modis(cnes_date,YYYYDDDHHMM=None,YYYYDDD=True):
    """
    #+
    # CNES2MODIS : Convert CNES julian days to MODIS data format (YYYYDDD)
    # 
    # @author: Renaud DUSSURGET (LEGOS/CTOH)
    # @history: Created by RD on 2/12/2011
    #           Adapted to Python on 29/10/2012 by RD (now at LER PAC/IFREMER)
    #
    #-
    """

    #Setup defaults
    if YYYYDDDHHMM is None : YYYYDDDHHMM = False
    if YYYYDDD : YYYYDDDHHMM = False
    if YYYYDDDHHMM : YYYYDDD = False

    str,obj=cnes_convert(cnes_date)
    dat=[o.strftime("%Y%j%H%M") for o in obj]
    
    return dat