Naoki
For NCO related questions, please post in the NCO forum, here
http://sourceforge.net/p/nco/discussion/?source=navbar
ncks -O -x -v time_bounds Season_ET.nc Season_ET.nc
The ncks syntax is
ncks [options] input_file.nc [output_file.nc]
where values inside [ ] are optional
In your case, you need to specify the output file different from the input 
file
From your case, I did, to generate the netCDF file from CDL
ncgen -o  my_in_file.nc my_in_file.cdl
to see the file in ncks
ncks -m  my_in_file.nc
to geneare a new file without the 'ET' variable
ncks -v ET -x  my_in_file.nc my_out_file.nc
to see the new file
ncks -m  my_out_file.nc
------------
pvicente@xxxxxxx
Department of Earth System Science
3200 Croul Hall
University of California, Irvine
Irvine, CA 92697-3100
----- Original Message ----- 
From: "Naoki Mizukami" <mizukami@xxxxxxxx>
To: <netcdfgroup@xxxxxxxxxxxxxxxx>
Sent: Tuesday, November 05, 2013 4:12 PM
Subject: [netcdfgroup] Problem in deleting variables with ncks
Hi,
For some reason, I am not able to delete a variable with ncks (with -x -v 
option).  Wondering why.....
I am typing
ncks -O -x -v time_bounds Season_ET.nc Season_ET.nc
My netcdf (Season_ET.nc) looks like -
netcdf Season_ET {
dimensions:
        time = UNLIMITED ; // (112 currently)
        lat = 76 ;
        lon = 120 ;
        hist_interval = 2 ;
variables:
        float ET(time, lat, lon) ;
                ET:_FillValue = 1.e+36f ;
                ET:cell_methods = "time: mean" ;
                ET:long_name = "ET" ;
                ET:missing_value = 1.e+36f ;
                ET:units = "mm/s" ;
        float lat(lat) ;
                lat:long_name = "coordinate latitude" ;
                lat:units = "degrees_north" ;
        float lon(lon) ;
                lon:long_name = "coordinate longitude" ;
                lon:units = "degrees_east" ;
        float time(time) ;
                time:long_name = "time" ;
                time:units = "days since 1980-10-01 00:00:00" ;
                time:calendar = "noleap" ;
                time:bounds = "time_bounds" ;
        double time_bounds(time, hist_interval) ;
                time_bounds:long_name = "history time interval endpoints" 
;
// global attributes:
                :title = "CLM History file information" ;
                :comment = "NOTE: None of the variables are weighted by 
land fraction!" ;
                :Conventions = "CF-1.0" ;
                :source = "Community Land Model CLM4.0" ;
                :hostname = "saudi" ;
                :username = "mizukami" ;
                :version = "cesm1_0_3" ;
                :revision_id = "$Id: histFileMod.F90 28831 2011-06-07 
06:14:20Z erik $" ;
                :case_title = "UNSET" ;
                :case_id = "MAURER12K_PN" ;
                :Surface_dataset = "surfdata_PN12K.nc" ;
                :Initial_conditions_dataset = 
"MAURER12K_PN_TEST.clm2.r.spin.nc" ;
                :PFT_physiological_constants_dataset = 
"pft-physiology.c110425.nc" ;
                :RTM_input_dataset = "rdirc_0.5x0.5_simyr2000_c101124.nc" 
;
                :nco_openmp_thread_number = 1 ;
                :NCO = "20131105" ;
}
--
Naoki Mizukami
National Center for Atmospheric Research
3450 Mitchell Lane
Boulder, CO 80301
office FL2 3094H
phone  303-497-2739
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/