def addOptionalParms(defaultTC,tcParmDict,parmDict,modelDict):
    """Adds parms from optionalParmsDict to the Fcst database.
    This is a convience function if most parms use the default time constraint.
    Otherwise, its just as easy to hard code what needs to be added for a
    optionalParmsDict entry.

    defaultTC: Default time constraint to if a parameter specific TC is not
               defined in tcParmDict.
    tcParmDict: Dictionary with keys of time constraints. Value is a list of
                parameter names to be added with that time constraint. Empty
                dictionary ok if everything should use the default. Example:
                tcParmDict={TC6NG:['IceLineAcc','IceFlatAcc',]}
    parmDict: Parameter dictionary with keys of parameter name and value is
              the parameter definition tuple. Keys must match keys in tcParmDict.
    modelDict: The serverConfig modelDict dictionary. Must already have Fcst
               defined. Changed in place.
    Returns: The parameter definition added to Fcst
    """

    tcParms={defaultTC:[]}
    for tc in tcParmDict:
        tcParms[tc]=[]
    if len(tcParmDict) == 0:
        tcParmDict['dummyTC']=['dummyParm']
    for pname,value in parmDict.iteritems():
        # Find the time constrait to use for this parm
        theTC=defaultTC
        for tc in tcParmDict:
            if pname in tcParmDict[tc]:
                theTC=tc
                break
        tcParms[theTC].append(value)

    theParms=[]
    for tc in tcParms:
        theParms.append((tcParms[tc],tc))
    modelDict['Fcst']['Parms'] += theParms
    return theParms