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

RE: Manipulating netCDF files

Hi Waylon,
 
As a follow-up to my previous email (which wasn't sent to the whole group), 
here is a solution that will work using nc_eqn in the ARM NetCDF Tool Suite:
 
nc_eqn -i F.nc "[X]=[X]*([X]!=32) + 45*([X]==32)"
 
It doesn't look exactly intuitive, but it will work.  Let me know if you have 
any questions about this or any of the ANTS tools.
 
Sherman Beus

________________________________

From: owner-netcdfgroup@xxxxxxxxxxxxxxxx on behalf of Waylon.Collins
Sent: Fri 11/11/2005 6:32 AM
To: netcdfgroup@xxxxxxxxxxxxxxxx
Subject: Manipulating netCDF files



Dear group members,

After reviewed the Unidata list of software that manipulates netCDF
files, I have yet to find one that can perform the following task -- I
need command-line software (that can run in a Redhat Enterprise Linux
environment) that will allow me to replace data values, associated with
a particular variable, with values that I can specify. It needs to allow
for a logical operation. For example, the software needs to be able to
perform the following -- "Any datum of variable X, within netCDF file
with filename F.nc, that equals 32, change it to the value 45. Thus, the
original file F.nc is now altered, or the altered file is now named
G.nc". Any help will be greatly appreciated.

Sincerely,

Waylon

--
**********************************************************************
* Waylon G. Collins                  Voice: (361)289-0959            *  
* NOAA/National Weather Service      E-Mail: Waylon.Collins@xxxxxxxx *
* 300 Pinson Drive                                                   *
* Corpus Christi, TX 78406                                           *
* USA                                                                *
**********************************************************************





 
 
  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