In [ ]:
import iris
iris.FUTURE.netcdf_promote = True

url='http://comt.sura.org/thredds/dodsC/data/comt_1_archive/inundation_tropical/MDL_SLOSH/Hurricane_Ike_final_run_egm3'

name_list=['water_surface_height_above_reference_datum',
    'sea_surface_height_above_geoid','sea_surface_elevation',
    'sea_surface_height_above_reference_ellipsoid','sea_surface_height_above_sea_level',
    'sea_surface_height','water level']

def name_in_list(cube):
    return cube.standard_name in name_list

In [44]:
def my_func(cube):
    if cube.standard_name in name_list:
        if cube.b2 = not any(m.method == 'maximum' for m in cube.cell_methods)
    b = b1 and b2
    return b

In [52]:
def my_func(cube):
    return(cube.standard_name in name_list) and (not any(m.method == 'maximum' for m in cube.cell_methods))

In [53]:
my_func(cube)


Out[53]:
True

In [54]:
my_constraint = iris.Constraint(cube_func=my_func)

In [55]:
cube = iris.load_cube(url,my_constraint)

In [56]:
print cube


water_surface_height_above_reference_datum / (m) (time: 511; -- : 567; -- : 327)
     Dimension coordinates:
          time                                        x         -         -
     Auxiliary coordinates:
          latitude                                    -         x         x
          longitude                                   -         x         x
     Attributes:
          Conventions: CF-1.0
          Source: SLOSH
          VerticalDatum: urn:ogc:def:datum:epsg::5103
          _ChunkSize: [  1 567 327]
          cdm_data_type: grid
          id: inundation_tropical.MDL_SLOSH.Hurricane_Ike_final_run_egm3
          institution: MDL - NOAA/NWS/MDL, inundation
          summary: A hindcast of Hurricane Ike (2008) using SLOSH on the egm3 mesh with SLOSH's...
          title: Inundation Tropical : MDL : SLOSH : Hurricane Ike final run egm3
     Cell methods:
          point: time

In [ ]:
cube.attrs()

In [ ]: