title: How can I filter netCDF variables with specific conditions in Python?
body: <p>I am reading in a netCDF file and want to keep data from other variables based on the filter condition (vwc &lt; 5) where vwc is a variable. </p>
  
  <p>My errors include AttributeError: NetCDF: Attribute not found and AttributeError: 'numpy.ndarray' object has no attribute 'where' since I tried using the where function but I could have been using incorrect syntax.</p>
  
  <pre><code># read in netCDF file
  f = nc4.Dataset(fn[0], 'r')
  
  # read in group from file
  sm_am = f.groups['Retrieval_Data_AM']
  
  # extract variables
  vwc = np.asarray(sm_am.variables['water_content'][:,:])
  any_variable = np.asarray(sm_am.variables['generic_variables'][:,:])
  </code></pre>
  
  <p>Then I want to extract other variables only when vwc&lt;5.</p>