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] [-d old_name,new_name]
10       [-d   ... ]  [-h]  [-l   path]   [-O]   [-p   path]   [-R]   [-r]   [-v
11       old_name,new_name] [-v  ... ] input-file [ output-file]
12

DESCRIPTION

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

OPTIONS

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

EXAMPLES

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

AUTHOR

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

REPORTING BUGS

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

SEE ALSO

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

HOMEPAGE

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