Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def step5_input(data):
    if not data:
        land = SubboxReader(open(STEP3_OUT, 'rb'))
        ocean = SubboxReader(open('result/SBBX.HadR2', 'rb'))
        data = itertools.izip(land, ocean)
    else:
        data = ensure_landocean(data)
    # Add optional mask.
    try:
        p = os.path.join('input', 'step5mask')
        mask = open(p)
        print "Using mask from", p
    except IOError:
        mask = None
    meta = data.next()
    if mask is None:
        yield (None,) + tuple(meta)
        for land, ocean in data:
            yield None, land, ocean
    else:
        yield ('mask from %s' % mask.name,) + tuple(meta)
        for maskrow, (land, ocean) in itertools.izip(mask, data):
            maskv = float(maskrow[16:21])
            yield maskv, land, ocean
        


src/c/c/ccc-gistemp-0.6.1/CCCgistemp/tool/ccc-gistemp.py   ccc-gistemp(Download)
def run_step5(data):
    from CCCgistemp.code import step5
    # Step 5 takes a land mask as optional input, this is all handled in
    # the step5_input() function.
    data = gio.step5_input(data)