import os
print os.environ
{'LESSOPEN': '| /usr/bin/lesspipe %s', 'LOGNAME': 'usgs', 'USER': 'usgs', 'HOME': '/home/usgs', 'PATH': '/usr/local/python27_epd/bin:/usr/lib/gmt/bin:/usr/local/python27_epd/bin:/usr/lib/gmt/bin:/usr/local/python27_epd/bin:/usr/lib/gmt/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/hdf5/bin:/usr/local/matlab/bin:/usr/local/nco/bin:/usr/local/netcdf/bin:/usr/local/udunits2/bin:/home/rsignell/bin', 'LANG': 'en_US.UTF-8', 'GRIB_SAMPLES_PATH': '/home/rsignell/share/samples', 'TERM': 'xterm-color', 'SHELL': '/bin/bash', 'XDG_SESSION_COOKIE': 'd51b9220f21c4436f8cd43d34b5daafe-1366664435.83924-2094974906', 'SHLVL': '1', 'MANPATH': ':/usr/local/nco/share/man:/usr/local/netcdf/share/man:/usr/local/udunits2/share/man', 'GIT_PAGER': 'cat', '_': '/usr/bin/nohup', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'OLDPWD': '/home/usgs', 'GRIB_DEFINITION_PATH': '/home/rsignell/share/definitions', 'CLICOLOR': '1', 'PWD': '/usgs/data2/notebook', 'MAIL': '/var/mail/usgs' }
#save slice as grib2
iris.save(slice,'hsig.grib2')
---------------------------------------------------------------------------
GribInternalError Traceback (most recent call last)
<ipython-input-10-4411f5d85f01> in <module>()
1 #save slice as grib2
----> 2 iris.save(slice,'hsig.grib2')
/home/rsignell/epd-7.2-1/lib/python2.7/site-packages/Iris-1.4.0_dev-py2.7.egg/iris/io/__init__.pyc in save(source, target, saver, **kwargs)
330 # Single cube?
331 if isinstance(source, iris.cube.Cube):
--> 332 saver(source, target, **kwargs)
333
334 # CubeList or sequence of cubes?
/home/rsignell/epd-7.2-1/lib/python2.7/site-packages/Iris-1.4.0_dev-py2.7.egg/iris/fileformats/grib.pyc in save_grib2(cube, target, append, **kwargs)
605
606 # Save this slice to the grib file
--> 607 grib_message = gribapi.grib_new_from_samples("GRIB2")
608 grib_save_rules.run(slice2D, grib_message)
609 gribapi.grib_write(grib_message, grib_file)
/home/rsignell/epd-7.2-1/lib/python2.7/site-packages/gribapi.pyc in modified(*args, **kw)
58 assert type(param) in allowed_types, \
59 "Parameter '%s' should be type %s" % (name, " or ".join([t.__name__ for t in allowed_types]))
---> 60 return _func_(**kw)
61 return modified
62 return check_types
/home/rsignell/epd-7.2-1/lib/python2.7/site-packages/gribapi.pyc in grib_new_from_samples(samplename)
601 """
602 err,gribid = _internal.grib_c_new_from_samples(0,samplename)
--> 603 GRIB_CHECK(err)
604 return gribid
605
/home/rsignell/epd-7.2-1/lib/python2.7/site-packages/gribapi.pyc in modified(*args, **kw)
58 assert type(param) in allowed_types, \
59 "Parameter '%s' should be type %s" % (name, " or ".join([t.__name__ for t in allowed_types]))
---> 60 return _func_(**kw)
61 return modified
62 return check_types
/home/rsignell/epd-7.2-1/lib/python2.7/site-packages/gribapi.pyc in GRIB_CHECK(errid)
125 """
126 if errid:
--> 127 raise GribInternalError(errid)
128
129 @require(file=file)
GribInternalError: File not found