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  ... ] [-g old_name,new_name] [-g  ... ] [--glb att_name= att_val]]
11       [-h]  [--hdr_pad sz_byt][--hpss_try] [-l path] [-O] [-p path] [-R] [-r]
12       [--ram_all] [-v old_name,new_name] [-v  ... ] input-file [ output-file]
13

DESCRIPTION

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

OPTIONS

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

EXAMPLES

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

AUTHOR

87       NCO manual pages written by Charlie Zender and originally formatted  by
88       Brian Mays.
89
90

REPORTING BUGS

92       Report bugs to <http://sf.net/bugs/?group_id=3331>.
93
94
96       Copyright © 1995-2018 Charlie Zender
97       This is free software; see the source for copying conditions.  There is
98       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR
99       PURPOSE.
100
101

SEE ALSO

103       The full documentation for NCO is maintained as a Texinfo manual called
104       the NCO Users Guide.  Because NCO is mathematical in nature, the  docu‐
105       mentation  includes  TeX-intensive  portions not viewable on character-
106       based displays.  Hence the only complete and authoritative versions  of
107       the NCO Users Guide are the PDF (recommended), DVI, and Postscript ver‐
108       sions at <http://nco.sf.net/nco.pdf>, <http://nco.sf.net/nco.dvi>,  and
109       <http://nco.sf.net/nco.ps>,  respectively.   HTML  and XML versions are
110       available         at          <http://nco.sf.net/nco.html>          and
111       <http://nco.sf.net/nco.xml>, respectively.
112
113       If  the  info and NCO programs are properly installed at your site, the
114       command
115
116              info nco
117
118       should give you access to the complete  manual,  except  for  the  TeX-
119       intensive portions.
120
121       ncap(1), ncap2(1), ncatted(1), ncbo(1), ncclimo(1), nces(1), ncecat(1),
122       ncflint(1), ncks(1), nco(1), ncpdq(1), ncra(1), ncrcat(1),  ncremap(1),
123       ncrename(1), ncwa(1)
124
125

HOMEPAGE

127       The NCO homepage at <http://nco.sf.net> contains more information.
128
129
130
131                                                                   NCRENAME(1)
Impressum