Guest User

Untitled

a guest
Oct 20th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import pygrib as pg
  2.  
  3. grb = pg.open(file_name.grib)
  4. temperature = grb.select(name='Temperature')
  5. geop_height = grb.select(name='Geopotential')
  6.  
  7. import multiprocessing as mp
  8.  
  9. params = ['Temperature', 'Geopotential']
  10. pool = mp.Pool(processes = len(params))
  11.  
  12. def readparam(grb_file, param):
  13. return grb_file.select(name=param)
  14.  
  15. pool.map(readparam, params)
Add Comment
Please, Sign In to add comment