def writeGastoDust(temp, model, ming2d=1.0):
    """Gas-to-dust ratios."""
    temp.append('void gasIIdust(double x, double y,')
    temp.append(' double z, double *gtd) {\n\n')
    if type(model.g2d) is float:
        temp.append('\t*gtd = %.1f;\n\n' % model.g2d)
    else:
        temp.append('\t*gtd = findvalue(x, y, z, gastodust);\n\n')
    temp.append('\tif (*gtd < 1e-4) {\n\t\t*gtd = 1e-4;\n\t}\n}\n\n\n')
    return
