Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: ncdigest V1 #727

Hi,

As Martin points out, ncks -A fl_1.nc fl_2.nc puts the
contents of fl_1.nc into fl_2.nc. The -A is optional.
On output, fl_2.nc is the union of the input file variables,
regardless of whether they are disjoint.
This does not work if the input files have differently
named record dimensions (since netCDF supports only one),
or have differently sized dimensions of the same name.

The manual now clarifies that ncks defaults to append
mode when given two file arguments:

http://nco.sf.net/nco.html#apn

Thanks,
Charlie

zender@elnino:~/nco/data$ ncks -O -v lon in.nc fl_1.nc
zender@elnino:~/nco/data$ ncks -O -v lat in.nc fl_2.nc
zender@elnino:~/nco/data$ ncks -A fl_1.nc fl_2.nc
ncks: WARNING Overwriting global attribute Conventions
ncks: WARNING Overwriting global attribute history
ncks: WARNING Overwriting global attribute julian_day
ncks: WARNING Overwriting global attribute RCS_Header
zender@elnino:~/nco/data$ ncks -H fl_2.nc
lat[0]=-90
lat[1]=90

lon[0]=0
lon[1]=90
lon[2]=180
lon[3]=270
zender@elnino:~/nco/data$
--
Charlie Zender, zender at uci dot edu, (949) 824-2987, Department of
Earth System Science, University of California, Irvine CA 92697-3100




 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690