Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygrib as pg
- grb = pg.open(file_name.grib)
- temperature = grb.select(name='Temperature')
- geop_height = grb.select(name='Geopotential')
- import multiprocessing as mp
- params = ['Temperature', 'Geopotential']
- pool = mp.Pool(processes = len(params))
- def readparam(grb_file, param):
- return grb_file.select(name=param)
- pool.map(readparam, params)
Add Comment
Please, Sign In to add comment