- To: "Lynnes, Christopher S. (GSFC-6102)" <christopher.s.lynnes@xxxxxxxx>
- Subject: Re: [netcdfgroup] ncdump with just the variable's values?
- From: Russ Rew <russ@xxxxxxxxxxxxxxxx>
- Date: Wed, 07 Sep 2011 12:43:41 -0600
Hi Chris, > Is there a way to get ncdump to output just the values of a given variable? > (The -v option gives me the header info as well.) No, but this works pretty well, if you want to print just the values of var1 and var2 from netCDF file foo.nc: ncdump -v var1,var2 foo.nc | sed -e '1,/data:/d' -e '$d' It eliminates all the header info and the last line that's just "}". It doesn't work for netCDF-4 files that have nested groups. --Russ
- References:
- [netcdfgroup] ncdump with just the variable's values?
- From: Lynnes, Christopher S. (GSFC-6102)
- [netcdfgroup] ncdump with just the variable's values?