title: Python remove coordinates with all especific variables - netcdf
body: <p>I have several netcdf files and wanted to delete data with certain characteristic and save to a new netcdf file.</p>
  
  <p>The file has the latitude, longitude and time coordinates, with the variable temperature and wind. The idea is that if the wind variable is less than 6 m / s, all information (for this latitude, longitude and time) will be deleted for the wind and temperature variables. How can I do this in python?</p>
  
  <p>I have it so far</p>
  
  <p>EDIT: a file <a href="https://1drv.ms/u/s!Ak2pOptPmINYozcgeP91RLzdC4Jb?e=dKlZ6k" rel="nofollow noreferrer">.nc</a></p>
  
  <pre><code>from netCDF4 import Dataset
  from datetime import * 
  import os
  
  #-----------------------------------------------------------------------------------------------------------------------------------
  path = '/home/Downloads/Arquivos_GOES_2018_OSISAF_NC/'
  
  data_ini = datetime(2018,1,1,1,0,0) 
  data_end = datetime(2018,7,1,1,0,0) 
  
  IDval = 6 # minimo quality_level aceito
  
  #-----------------------------------------------------------------------------------------------------------------------------------
  DateTimeNow = data_ini 
  
  while DateTimeNow&lt;=data_end:
  
  
     namefile_net = DateTimeNow.strftime('%Y%m%d%H%M')+'00-OSISAF-L3C_GHRSST-SSTsubskin-GOES16-ssteqc_goes16_'+DateTimeNow.strftime('%Y%m%d_%H%M')+'00-v02.0-fv01.0.nc'
  
  
     if os.path.isfile(path+namefile_net) == True:
  
  
        data_net = Dataset(path+namefile_net)
        tsm = data_net.variables['sea_surface_temperature'][0,:]-273.15 
        lat = data_net.variables['lat'][:]
        lon = data_net.variables['lon'][:]
        wind = data_net.variables['wind_speed'][0,:]
  
        wind = np.where(qlv.mask==True,-1.0, qlv) 
  
        lon, lat = np.meshgrid(lon, lat) # criar uma matriz com lat e lon
  
  
        tsm_area = tsm[yid,xid] 
        lon_area = lon[yid,xid] 
        lat_area = lat[yid,xid] 
        wind_area = wind[yid,xid] 
  
        if np.sum(wind&gt;=IDval) &gt; 0:
  
           lon_area = np.where(qlv_area&lt;IDval,-999.9,lon_area)
           lat_area = np.where(qlv_area&lt;IDval,-999.9,lat_area)
  
           yid2, xid2 = seach_point(lon_area, lat_area, lon_point, lat_point)
           ```
  
  
  </code></pre>