1NCRENAME(1)                 General Commands Manual                NCRENAME(1)
2
3
4

NAME

6       ncrename - netCDF Renamer
7

SYNTAX

9       ncrename  [-a  old_name, new_name] [-a [-d old_name, new_name] [-d [-R]
10       [-r] [-v old_name, new_name] [-v input-file [ output-file]
11

DESCRIPTION

13       ncrename renames dimensions, variables,  and  attributes  in  a  netCDF
14       file.   Each object that has a name in the list of old names is renamed
15       using the corresponding name in the list of new  names.   All  the  new
16       names  must  be  unique.   Every old name must exist in the input file,
17       unless the name is preceded by the character ..  The  validity  of  the
18       old  names  is not checked prior to the renaming.  Thus, if an old name
19       is specified without the the .  prefix and is  not  present  in  input-
20       file, ncrename will abort.
21
22       ncrename  is  the  exception  to the normal rules that the user will be
23       interactively prompted before an existing file is changed, and  that  a
24       temporary  copy  of an output file is constructed during the operation.
25       If only input-file is specified, then ncrename will change the names of
26       the input-file in place without prompting and without creating a tempo‐
27       rary copy of input-file.  This is because  the  renaming  operation  is
28       considered  reversible  if  the user makes a mistake.  The new_name can
29       easily be changed back to old_name by using ncrename one more time.
30
31       Note that renaming a dimension to the name of a dependent variable  can
32       be  used  to  invert the relationship between an independent coordinate
33       variable and a dependent variable.  In this case, the  named  dependent
34       variable  must  be  one-dimensional  and should have no missing values.
35       Such a variable will become a coordinate variable.
36
37       According to the netCDF User's Guide,  renaming  properties  in  netCDF
38       files  does not incur the penalty of recopying the entire file when the
39       new_name is shorter than the old_name.
40

OPTIONS

42       -a     old_name, new_name Attribute renaming.  The old and new names of
43              the  attribute  are  specified  by  the  associated old_name and
44              new_name values.  Global attributes are treated  no  differently
45              than  variable  attributes.   This  option may be specified more
46              than once.  You cannot change the attribute name for one partic‐
47              ular  variable (unless it is uniquely named); all occurrences of
48              the attribute of a given name will be renamed.  This is  consid‐
49              ered  an  oversight and will be addressed in a future version of
50              NCO.
51
52       -d     old_name, new_name Dimension renaming.  The old and new names of
53              the  dimension  are  specified  by  the  associated old_name and
54              new_name values.  This option may be specified more than once.
55
56       -v     old_name, new_name Variable renaming.  The old and new names  of
57              the  variable  are  specified  by  the  associated  old_name and
58              new_name values.  This option may be specified more than once.
59
60       -i     Interactive.  ncrename will prompt for confirmation before over‐
61              writing an existing file.
62

EXAMPLES

64       Rename the variable p to pressure and t to temperature in netCDF in.nc.
65       In this case p must exist in the input file (or ncrename  will  abort),
66       but the presence of t is optional:
67              ncrename -v p,pressure -v .t,temperature in.nc
68       ncrename  does  not automatically attach dimensions to variables of the
69       same name.  If you want to rename a  coordinate  variable  so  that  it
70       remains  a  coordinate  variable,  you  must separately rename both the
71       dimension and the variable:
72              ncrename -d lon,longitude -v lon,longitude in.nc
73
74       Create netCDF out.nc identical to in.nc except the attribute _FillValue
75       is changed to missing_value (in all variables which possess it) and the
76       global attribute Zaire is changed to Congo:
77              ncrename -a _FillValue,missing_value -a Zaire,Congo in.nc out.nc
78
79

AUTHOR

81       NCO manual pages written by Charlie Zender and Brian Mays.
82
83

REPORTING BUGS

85       Report bugs to <http://sf.net/bugs/?group_id=3331>.
86
87
89       Copyright © 1995-2004 Charlie Zender
90       This is free software; see the source for copying conditions.  There is
91       NO  warranty;  not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
92       PURPOSE.
93
94

SEE ALSO

96       The full documentation for NCO is maintained as a Texinfo manual called
97       the NCO User's Guide.  Because NCO is mathematical in nature, the docu‐
98       mentation includes TeX-intensive portions not  viewable  on  character-
99       based  displays.  Hence the only complete and authoritative versions of
100       the NCO User's Guide are the PDF  (recommended),  DVI,  and  Postscript
101       versions  at  <http://nco.sf.net/nco.pdf>, <http://nco.sf.net/nco.dvi>,
102       and <http://nco.sf.net/nco.ps>, respectively.  HTML  and  XML  versions
103       are       available       at      <http://nco.sf.net/nco.html>      and
104       <http://nco.sf.net/nco.xml>, respectively.
105
106       If the info and NCO programs are properly installed at your  site,  the
107       command
108
109              info nco
110
111       should  give  you  access  to  the complete manual, except for the TeX-
112       intensive portions.
113
114

HOMEPAGE

116       The NCO homepage at <http://nco.sf.net> contains more information.
117
118
119
120                                                                   NCRENAME(1)
Impressum