diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
 # HGrib Change Log
 
+## 0.3.1.0
+
+* Added `skipMessage`, `skipMessageIf`, and `skipMessageIf_` to
+  `Data.Grib`, three functions to easily skip unwanted GRIB messages
+  in a file.
+
+
 ## 0.3.0.0
 
 * Added a `GribIO` monad in `Data.Grib`, which is a higher-level
diff --git a/hgrib.cabal b/hgrib.cabal
--- a/hgrib.cabal
+++ b/hgrib.cabal
@@ -1,7 +1,7 @@
 -- Package description for HGrib.
 
 name:                hgrib
-version:             0.3.0.0
+version:             0.3.1.0
 synopsis:            Unofficial bindings for GRIB API
 description:
     Unofficial bindings to ECMWF's GRIB API library for reading WMO
@@ -33,7 +33,7 @@
 source-repository this
   type:      git
   location:  https://github.com/mjakob/hgrib.git
-  tag:       0.3.0.0
+  tag:       0.3.1.0
 
 library
   default-language:  Haskell2010
diff --git a/src/Data/Grib.hs b/src/Data/Grib.hs
--- a/src/Data/Grib.hs
+++ b/src/Data/Grib.hs
@@ -9,11 +9,15 @@
 Portability : portable
 -}
 
+{-# LANGUAGE DeriveDataTypeable #-}
+
 module Data.Grib ( -- *The GRIB Monad
                    GribIO
                  , runGribIO
                  , runGribIO_
-                 , GribEnv
+                 , skipMessage
+                 , skipMessageIf
+                 , skipMessageIf_
 
                    -- **Get values
                    --
@@ -45,11 +49,17 @@
                  , getIndex
                  , getHandle
                  , liftIO
+
+                   -- **Auxiliary types
+                 , GribEnv
+                 , SkipMessage
                  ) where
 
-import Control.Monad              ( void )
+import Control.Exception          ( Exception, throwIO, try )
+import Control.Monad              ( void, when )
 import Control.Monad.IO.Class     ( liftIO )
 import Control.Monad.Trans.Reader ( ReaderT, ask, runReaderT )
+import Data.Typeable              ( Typeable )
 import Foreign                    ( allocaArray, allocaBytes )
 
 -- Hack to have Applicative in base < 4.8 but avoid warning in base >= 4.8:
@@ -77,6 +87,43 @@
 envs :: FilePath -> IO [GribEnv]
 envs path = fmap (zipWith3 GribEnv (repeat path) [0..]) (handles path)
 
+-- |If this exception is raised in 'GribIO', the message will be
+-- discarded.  Normally, you simply call 'skipMessage' instead of
+-- throwing this exception manually.
+data SkipMessage = SkipMessage deriving (Show, Typeable)
+instance Exception SkipMessage
+
+-- |Skip the current GRIB message.  No result will be put in the
+-- output list of 'runGribIO' for this message.
+skipMessage :: GribIO a
+skipMessage = liftIO . throwIO $ SkipMessage
+
+-- |Skip the current GRIB message if the predicate is true.  No result
+-- will be put in the output list of 'runGribIO' in this case.
+skipMessageIf :: (a -> Bool)  -- ^a predicate that will be given the
+                              -- result of the action
+              -> GribIO a     -- ^an action to perform
+              -> GribIO a
+skipMessageIf p m = do { x <- m; when (p x) skipMessage; return x }
+
+-- |Like 'skipMessageIf', but discard the result of the action.
+--
+-- ==== __Examples__
+--
+-- Sum all grid points of the first vertical level in a GRIB message:
+--
+-- > runGribIO "test/stage/test_uuid.grib2" $ do
+-- >   skipMessageIf_ (/= 1) $ getLong "topLevel"
+-- >   fmap sum getValues
+skipMessageIf_ :: (a -> Bool)
+               -> GribIO a
+               -> GribIO ()
+skipMessageIf_ p m = do { x <- m; when (p x) skipMessage }
+
+-- A try that catches the SkipMessage exception.
+trySkipMessage :: IO a -> IO (Either SkipMessage a)
+trySkipMessage = try
+
 -- |The 'GribIO' monad is a 'ReaderT' monad transformer over the
 -- 'IO' monad with a 'GribEnv' environment.
 type GribIO = ReaderT GribEnv IO
@@ -95,7 +142,9 @@
 runGribIO :: FilePath  -- ^a path to a GRIB file
           -> GribIO a  -- ^an action to take on each GRIB message in the file
           -> IO [a]    -- ^the results of the actions
-runGribIO path m = envs path >>= mapM (runReaderT m)
+runGribIO path m = envs path >>= foldr k (return [])
+  where k env res = trySkipMessage (runReaderT m env) >>=
+                    either (const res) (\x -> fmap (x :) res)
 
 -- |Like 'runGribIO', but discard the results.
 runGribIO_ :: FilePath -> GribIO a -> IO ()
diff --git a/test/Data/GribSpec.hs b/test/Data/GribSpec.hs
--- a/test/Data/GribSpec.hs
+++ b/test/Data/GribSpec.hs
@@ -38,7 +38,7 @@
 
     it "should fail with any exception raised by the action" $
       runGribIO testUuidPath (liftIO $ throwIO NullPtrReturned)
-        `shouldThrow` isNullPtrReturned
+      `shouldThrow` isNullPtrReturned
 
   describe "runGribIO_" $ do
     it "should return unit" $
@@ -52,49 +52,71 @@
 
     it "should fail with any exception raised by the action" $
       runGribIO_ testUuidPath (liftIO $ throwIO NullPtrReturned)
-        `shouldThrow` isNullPtrReturned
+      `shouldThrow` isNullPtrReturned
 
+  describe "skipMessage" $
+    it "should make runGribIO not return the result" $ do
+      r <- runGribIO testUuidPath $ do
+        l <- getLong "topLevel"
+        if l == 1 then skipMessage else return l
+      r `shouldBe` [2]
+
+  describe "skipMessageIf" $
+    it "should make runGribIO not return the result if the predicate is true" $
+      runGribIO testUuidPath (skipMessageIf (== 1) $ getLong "topLevel")
+      `shouldReturn` [2]
+
+  describe "skipMessageIf_" $ do
+    it "should make runGribIO not return () if the predicate is true" $
+      runGribIO testUuidPath (skipMessageIf_ (== 1) $ getLong "topLevel")
+      `shouldReturn` [()]
+    it "should behave like in the documented example" $ do
+      runGribIO testUuidPath $ do
+        skipMessageIf_ (/= 1) $ getLong "topLevel"
+        fmap sum getValues
+      `shouldReturn` [31595.198486328125]
+
   describe "getDouble" $
     it "should fail with GribNotFound if the key does not exist" $
       runGribIO_ testUuidPath (getDouble "missingKey")
-        `shouldThrow` isGribException GribNotFound
+      `shouldThrow` isGribException GribNotFound
 
   describe "getLong" $
     it "should fail with GribNotFound if the key does not exist" $
       runGribIO_ testUuidPath (getLong "missingKey")
-        `shouldThrow` isGribException GribNotFound
+      `shouldThrow` isGribException GribNotFound
 
   describe "getString" $
     it "should fail with GribNotFound if the key does not exist" $
       runGribIO_ testUuidPath (getString "missingKey")
-        `shouldThrow` isGribException GribNotFound
+      `shouldThrow` isGribException GribNotFound
 
   describe "setDouble" $ do
     it "should fail with GribNotFound if the key does not exist" $
       runGribIO_ testUuidPath (setDouble "missingKey" 0)
-        `shouldThrow` isGribException GribNotFound
+      `shouldThrow` isGribException GribNotFound
 
     it "should fail with GribReadOnly if the key is read-only" $
       runGribIO_ testUuidPath (setDouble "referenceValue" 0)
-        `shouldThrow` isGribException GribReadOnly
+      `shouldThrow` isGribException GribReadOnly
 
   describe "setLong" $ do
     it "should fail with GribNotFound if the key does not exist" $
       runGribIO_ testUuidPath (setLong "missingKey" 0)
-        `shouldThrow` isGribException GribNotFound
+      `shouldThrow` isGribException GribNotFound
 
     it "should fail with GribReadOnly if the key is read-only" $
       runGribIO_ testUuidPath (setLong "getNumberOfValues" 0)
-        `shouldThrow` isGribException GribReadOnly
+      `shouldThrow` isGribException GribReadOnly
 
   describe "setString" $ do
     it "should fail with GribNotFound if the key does not exist" $
       runGribIO_ testUuidPath (setString "missingKey" "value")
-        `shouldThrow` isGribException GribNotFound
+      `shouldThrow` isGribException GribNotFound
 
     it "should fail with GribReadOnly if the key is read-only" $
       runGribIO_ testUuidPath (setString "referenceValue" "value")
-        `shouldThrow` isGribException GribReadOnly
+      `shouldThrow` isGribException GribReadOnly
 
   describe "getFilename" $
     it "should return the name of the file being read" $
