1NETCDF(3f90)               UNIDATA LIBRARY FUNCTIONS              NETCDF(3f90)
2
3
4

NAME

6       netcdf  -  Unidata Network Common Data Form (netCDF) library, version 3
7       interface
8

SYNOPSIS

10       use netcdf
11
12
13   Most Systems:
14       f90 ... -lnetcdf
15
16
17   CRAY PVP Systems:
18       f90 -dp -i64 ... -lnetcdf
19
20

LIBRARY VERSION

22       This document describes version 3 of Unidata netCDF data-access  inter‐
23       face for the Fortran-90 programming language.
24
25       character*80 nf90_inq_libvers()
26              character(len=80) :: nf90_inq_libvers
27
28       Returns  a  string  identifying  the version of the netCDF library, and
29       when it was built, like: "3.1a of Aug 22 1996 12:57:47 $".
30
31       The RCS ident(1) command will find a string like "$Id: @(#) netcdf  li‐
32       brary  version 3.1a of Sep  6 1996 15:56:26 $" in the library. The SCCS
33       what(1) command will find a string like "netcdf library version 3.1a of
34       Aug 23 1996 16:07:40 $".
35

ROUTINE DESCRIPTIONS

37       All  netCDF  functions  (except nf90_inq_libvers() and nf90_strerror())
38       return an integer status.  This behavior replaces  the  rcode  argument
39       used in previous versions of the library.  If this returned status val‐
40       ue is not equal to nf90_noerr (zero), it indicates that  an  error  oc‐
41       curred. The possible status values are defined in the module netcdf.
42
43       function nf90_strerror(ncerr)
44              integer, intent(in) :: ncerr
45              character(len=80) :: nf90_strerror
46
47              Returns  a  string  textual translation of the ncerr value, like
48              "Attribute or variable name contains illegal characters" or  "No
49              such file or directory".
50
51       function nf90_create(path, cmode, ncid)
52              character(len=*), intent(in) :: path
53              integer, intent(in) :: cmode
54              integer, optional, intent(in) :: initialsize
55              integer, optional, intent(inout) :: chunksize
56              integer, intent(out) :: ncid
57              integer :: nf90_create
58
59              (Corresponds to nccre() in version 2)
60
61              Creates  a  new netCDF dataset at path, returning a netCDF ID in
62              ncid.  The argument cmode may include the bitwise-or of the fol‐
63              lowing  flags:  nf90_noclobber to protect existing datasets (de‐
64              fault silently blows  them  away),  nf90_share  for  synchronous
65              dataset  updates  (default is to buffer accesses), and nf90_lock
66              (not yet implemented).  When a netCDF dataset is created, is  is
67              opened nf90_write.  The new netCDF dataset is in define mode.
68
69              The  optional  argument initialsize sets the initial size of the
70              file at creation time.
71
72              See nf__open() below for an explanation of the  optional  chunk‐
73              size argument.
74
75       function nf90_open(path, mode, ncid, chunksize)
76              character(len=*), intent(in) :: path
77              integer, intent(in) :: mode
78              integer, intent(out) :: ncid
79              integer, optional, intent(inout) :: chunksize
80              integer :: nf90_open
81
82              (Corresponds to ncopn() in version 2)
83
84              Opens a existing netCDF dataset at path returning a netCDF ID in
85              ncid.  The type of access is described by  the  mode  parameter,
86              which  may  include  the  bitwise-or  of  the  following  flags:
87              nf90_write for read-write access (default read-only), nf90_share
88              for synchronous dataset updates (default is to buffer accesses),
89              and nf90_lock (not yet implemented).
90
91              The optional argument referenced by chunksize controls  a  space
92              versus  time  tradeoff,  memory  allocated in the netcdf library
93              versus number of system calls.   Because  of  internal  require‐
94              ments,  the value may not be set to exactly the value requested.
95              The actual value chosen is returned  by  reference.   Using  the
96              value  nf90_sizehint_default  causes the library to choose a de‐
97              fault.  How the system choses the default depends on the system.
98              On  many  systems,  the  "preferred I/O block size" is available
99              from the stat() system call, struct stat member st_blksize.   If
100              this is available it is used. Lacking that, twice the system pa‐
101              gesize is used.  Lacking a call to discover the system pagesize,
102              we just set default chunksize to 8192.
103
104              The  chunksize  is  a property of a given open netcdf descriptor
105              ncid: it is not a persistent property of the netcdf dataset.
106
107       function nf90_set_fill(ncid, fillmode, old_mode)
108              integer, intent(in) :: ncid, fillmode
109              integer, intent(out) :: old_mode
110              integer :: nf90_set_fill
111
112              Sets the fill-mode for a netCDF dataset to optimize writes under
113              some  circumstances.   The  fill-mode argument, fillmode, can be
114              either nf90_fill or nf90_nofill.  nf90_fill  causes  fill-values
115              to  be  written  into non-record variables and into skipped-over
116              records when writing beyond the last valid record.   nf90_nofill
117              suspends  this  behavior.   The  default behavior corresponds to
118              nf90_fill.
119
120              The previous fill-mode value is return in old_mode.
121
122              The fill-mode is a property of a given  open  netcdf  descriptor
123              ncid: it is not a persistent property of the netcdf dataset.
124
125       function nf90_redef(ncid)
126              integer, intent(in) :: ncid
127              integer :: nf90_redef
128
129              (Corresponds to ncredf() in version 2)
130
131              Puts  an  open  netCDF  dataset into define mode, so dimensions,
132              variables, and attributes can be added or renamed and attributes
133              can be deleted.
134
135       function nf90_enddef(ncid, h_minfree, v_align, v_minfree, r_align)
136              integer, intent(in) :: ncid
137              integer, optional, intent(in) :: h_minfree, v_align
138              integer, optional, intent(in) :: v_minfree, r_align
139              integer :: nf90_enddef
140
141              (Corresponds to ncendf() in version 2)
142
143              Takes  an  open  netCDF dataset out of define mode.  The changes
144              made to the netCDF dataset while  it  was  in  define  mode  are
145              checked and committed to disk if no problems occurred.  Some da‐
146              ta values may be written as well, see "VARIABLE PREFILLING"  be‐
147              low.   After  a  successful  call,  variable data can be read or
148              written to the dataset.
149
150              The optional arguments are performance tuning parameters.   They
151              exposes  internals  of  the netcdf version 1 file format and may
152              not be available on future netcdf implementations.
153
154              The current netcdf file format has three sections, the  "header"
155              section, the data section for fixed size variables, and the data
156              section for variables which have an unlimited dimension  (record
157              variables).  The header begins at the beginning of the file. The
158              index (offset) of the beginning of the  other  two  sections  is
159              contained  in  the  header. Typically, there is no space between
160              the sections. This causes copying  overhead  to  accrue  if  one
161              wishes  to  change  the size of the sections, as may happen when
162              changing names of things,  text  attribute  values,  adding  at‐
163              tributes  or adding variables. Also, for buffered i/o, there may
164              be advantages to aligning sections in certain ways.
165
166              The minfree parameters allow one  to  control  costs  of  future
167              calls  to nf90_redef(), nf90_enddef() by requesting that minfree
168              bytes be available at the end of the section.  The h_minfree pa‐
169              rameter  sets  the  pad  at the end of the "header" section. The
170              v_minfree parameter sets the pad at the end of the data  section
171              for fixed size variables.
172
173              The  align  parameters allow one to set the alignment of the be‐
174              ginning of the corresponding sections. The beginning of the sec‐
175              tion  is rounded up to an index which is a multiple of the align
176              parameter. The flag value nf90_align_chunk tells the library  to
177              use  the  chunksize  (see  above)  as  the align parameter.  The
178              v_align parameter controls the alignment of the beginning of the
179              data  section  for  fixed size variables.  The r_align parameter
180              controls the alignment of the beginning of the data section  for
181              variables which have an unlimited dimension (record variables).
182
183              The  file  format requires mod 4 alignment, so the align parame‐
184              ters are silently rounded up to multiples of 4. The usual  call,
185              nf90_enddef(ncid) is equivalent to nf__enddef(ncid, 0, 4, 0, 4).
186
187              The  file format does not contain a "record size" value, this is
188              calculated from the sizes of the record variables. This unfortu‐
189              nate  fact prevents us from providing minfree and alignment con‐
190              trol of the "records" in a netcdf file. If you  add  a  variable
191              which  has an unlimited dimension, the third section will always
192              be copied with the new variable added.
193
194       function nf90_sync(ncid)
195              integer, intent(in) :: ncid
196              integer :: nf90_sync
197
198              (Corresponds to ncsnc() in version 2)
199
200              Unless the nf90_share bit is set  in  nf90_open()  or  nf90_cre‐
201              ate(), accesses to the underlying netCDF dataset are buffered by
202              the library. This function synchronizes the state of the  under‐
203              lying  dataset  and  the library.  This is done automatically by
204              nf90_close() and nf90_enddef().
205
206       function nf90_abort(ncid)
207              integer, intent(in) :: ncid
208              integer :: nf90_abort
209
210              (Corresponds to ncabor() in version 2)
211
212              You don't need to call this function.  This function  is  called
213              automatically  by  nf90_close() if the netCDF dataset was in de‐
214              fine mode and something goes wrong  with  the  commit.   If  the
215              netCDF  dataset  isn't  in  define  mode,  then this function is
216              equivalent to nf90_close().  If it is called after nf90_redef(),
217              but  before nf90_enddef(), the new definitions are not committed
218              and the dataset is closed.  If it is called after  nf90_create()
219              but before nf90_enddef(), the dataset disappears.
220
221       function nf90_close(ncid)
222              integer, intent(in) :: ncid
223              integer :: nf90_close
224
225              (Corresponds to ncclos() in version 2)
226
227              Closes  an  open  netCDF  dataset.   If the dataset is in define
228              mode, nf90_enddef() will be  called  before  closing.   After  a
229              dataset is closed, its ID may be reassigned to another dataset.
230
231       function nf90_inquire(ncid, ndims, nvars, natts, unlimdimid, nformat)
232              integer, intent(in) :: ncid
233              integer, optional, intent(out) :: ndims, nvars
234              integer, optional, intent(out) :: natts, unlimdimid
235              integer, optional, intent(out) :: nformat
236              integer :: nf90_inquire
237
238              Inquire  about an open netCDF dataset.  ncid is the netCDF ID of
239              the open dataset.  Upon successful return,  ndims  will  contain
240              the  number of dimensions defined for this netCDF dataset, nvars
241              will contain the number of variables,  natts  will  contain  the
242              number  of attributes, and unlimdimid will contain the dimension
243              ID of the unlimited dimension if one  exists,  or  0  otherwise.
244              nformat  will  contain  the format version number, rarely needed
245              because the library detects the format version and  behaves  ap‐
246              propriately.
247
248       function nf90_def_dim(ncid, name, len, dimid)
249              integer, intent(in) :: ncid
250              character(len=*), intent(in) :: name
251              integer, intent(in) :: len
252              integer, intent(out) :: dimid
253              integer :: nf90_def_dim
254
255              (Corresponds to ncddef() in version 2)
256
257              Adds a new dimension to an open netCDF dataset, which must be in
258              define mode.  name is the dimension name.  len is  the  size  of
259              the  new dimension or nf90_unlimited to define the unlimited di‐
260              mension.  On return, dimid will contain the dimension ID of  the
261              newly created dimension.
262
263       function nf90_inq_dimid(ncid, name, dimid)
264              integer, intent(in) :: ncid
265              character(len=*), intent(in) :: name
266              integer, intent(out) :: dimid
267              integer :: nf90_inq_dimid
268
269              (Corresponds to ncdid() in version 2)
270
271              Given an open netCDF dataset and dimension name, returns the di‐
272              mension ID of the netCDF dimension in dimid.
273
274       function nf90_inquire_dimension(ncid, dimid, name, len)
275              integer, intent(in) :: ncid, dimid
276              character(len=*), optional, intent(out) :: name
277              integer, optional, intent(out) :: len
278              integer :: nf90_inquire_dimension
279
280              Inquire  about  a  dimension.   name  should  be    big   enough
281              (nf90_max_name)  to  hold the dimension name as the name will be
282              copied into your storage.  The length return parameter, len will
283              contain the size of the dimension.  For the unlimited dimension,
284              the returned length is the current maximum value used for  writ‐
285              ing into any of the variables which use the dimension.
286
287       function nf90_rename_dim(ncid, dimid, name)
288              integer, intent(in) :: ncid
289              character(len=*), intent(in) :: name
290              integer, intent(in) :: dimid
291              integer :: nf90_rename_dim
292
293              (Corresponds to ncdren() in version 2)
294
295              Renames an existing dimension in an open netCDF dataset.  If the
296              new name is longer than the old name, the netCDF dataset must be
297              in  define mode.  You cannot rename a dimension to have the same
298              name as another dimension.
299
300       function nf90_def_var(ncid, name, xtype, dimids, varid)
301              integer, intent(in) :: ncid
302              character(len=*), intent(in) :: name
303              integer, intent(in) :: xtype
304              integer, optional, dimension(:), intent(in) :: dimids
305              integer :: nf90_def_var
306
307              (Corresponds to ncvdef() in version 2)
308
309              Adds a new variable to a netCDF dataset. The netCDF must  be  in
310              define  mode.   name  will  be  the name of the netCDF variable.
311              xtype is the external, netCDF type of the variable and should be
312              one  of  nf90_byte, nf90_char, nf90_short, nf90_int, nf90_float,
313              or nf90_double, The optional dimids argument contains the dimen‐
314              sion  ID-s of the domain of the netCDF variable and, consequent‐
315              ly, determines the rank of the created variable:  if  dimids  is
316              omitted, then the netCDF variable will be a scalar; if dimids is
317              a scalar, then the netCDF variable will be 1 dimensional; and if
318              dimids  is  a  vector,  then  the netCDF variable will have rank
319              equal to the number of elements in dimids.  varid will be set to
320              the netCDF variable ID.
321
322       function nf90_inq_varid(ncid, name, varid)
323              integer, intent(in) :: ncid
324              character(len=*), intent(in) :: name
325              integer, intent(out) :: varid
326              integer :: nf90_inq_varid
327
328              (Corresponds to ncvid() in version 2)
329
330              Returns  the  ID  of  a  netCDF  variable in varid given an open
331              netCDF dataset and the name of the variable.
332
333       function nf90_Inqire_Variable(ncid, varid, name, xtype, ndims,  dimids,
334              natts)
335              integer, intent(in) :: ncid, varid
336              character(len=*), optional, intent(out) :: name
337              integer, optional, intent(out) :: xtype, ndims
338              integer, dimension(*), optional, intent(out) :: dimids
339              integer, optional, intent(out) :: natts
340              integer :: nf90_inquire_variable
341
342              Inquire about a netCDF variable in an open netCDF dataset, given
343              its variable ID.  On return, name will contain the name  of  the
344              variable  and should be capacious enough (nf90_max_name).  xtype
345              will contain the external, netCDF type of the  variable.   ndims
346              will  contain  the dimensionality of the netCDF variable: if the
347              variable is a scalar, then size(ndims) will be zero;  otherwise,
348              size(ndims) will be the rank of the variable and ndims will con‐
349              tain the dimension ID-s of the netCDF dimensions that constitute
350              the  domain  of  the variable.  natts will contain the number of
351              attributes associated with the netCDF variable.
352
353       function nf90_rename_var(ncid, varid, name)
354              integer, intent9in) :: ncid, varid
355              character(len=*), intent(in) :: newname
356              integer :: nf90_rename_var
357
358              (Corresponds to ncvren() in version 2)
359
360              Changes the name of a netCDF  variable.   If  the  new  name  is
361              longer  than  the  old  name, the netCDF must be in define mode.
362              You cannot rename a variable to have the name  of  any  existing
363              variable.
364
365       function nf90_put_var(ncid, varid, values, start, stride, imap)
366              integer, intent(in) :: ncid, varid
367              <<whatever>>, intent(in) :: values
368              integer, dimension(:), optional, intent(in) :: start
369              integer, dimension(:), optional, intent(in) ::  stride
370              integer, dimension(:), optional, intent(in) ::  imap
371              integer :: nf90_put_var
372
373              (Replaces ncvpt() in version 2)
374
375              Writes  a  value  or  values  to  a netCDF variable.  The netCDF
376              dataset must be open and in data mode.  values contains the val‐
377              ue(s)  what will be written to the netCDF variable identified by
378              ncid and varid; it may be a scalar or an array and  must  be  of
379              type       character,       integer(kind=OneByteInt),      inte‐
380              ger(kind=TwoByteInt),      integer(kind=FourByteInt),      inte‐
381              ger(kind=EightByteInt),    real(kind=FourByteReal),    or    re‐
382              al(kind=EightByteReal).  All values are converted to the  exter‐
383              nal  type  of  the  netCDF  variable, if possible; otherwise, an
384              nf90_erange error is  returned.   The  optional  argument  start
385              specifies  the starting index in the netCDF variable for writing
386              for each dimension of the netCDF variable.  The  optional  argu‐
387              ment  stride specifies the sampling stride (the interval between
388              accessed values in the netCDF variable) for  each  dimension  of
389              the  netCDF  variable  (see COMMON ARGUMENT DESCRIPTIONS below).
390              The optional argument imap specifies the  in-memory  arrangement
391              of the data values (see COMMON ARGUMENT DESCRIPTIONS below).
392
393       function nf90_get_var(ncid, varid, values, start, stride, imap)
394              integer, intent(in) :: ncid, varid
395              <<whatever>>, intent(out) :: values
396              integer, dimension(:), optional, intent(in) :: start
397              integer, dimension(:), optional, intent(in) ::  stride
398              integer, dimension(:), optional, intent(in) ::  imap
399              integer :: nf90_get_var
400
401              (Replaces ncvgt() in version 2)
402
403              Reads  a  value  or  values  from a netCDF variable.  The netCDF
404              dataset must be open and in data mode.  values will receive  the
405              value(s) what will be read from the netCDF
406               variable identified by ncid and varid; it may be a scalar or an
407              array and must be of type  character,  integer(kind=OneByteInt),
408              integer(kind=TwoByteInt),    integer(kind=FourByteInt),    inte‐
409              ger(kind=EightByteInt),    real(kind=FourByteReal),    or    re‐
410              al(kind=EightByteReal).   All  values are converted from the ex‐
411              ternal type of the netCDF variable, if possible;  otherwise,  an
412              nf90_erange  error  is  returned.   The  optional argument start
413              specifies the starting index in the netCDF variable for  reading
414              for  each  dimension of the netCDF variable.  The optional argu‐
415              ment stride specifies the sampling stride (the interval  between
416              accessed  values  in  the netCDF variable) for each dimension of
417              the netCDF variable (see COMMON  ARGUMENT  DESCRIPTIONS  below).
418              The  optional  argument imap specifies the in-memory arrangement
419              of the data values (see COMMON ARGUMENT DESCRIPTIONS below).
420
421       function nf90_inquire_attribute(ncid, varid, name, xtype, len, attnum)
422              integer, intent(in) :: ncid, varid
423              character(len=*), intent(in) :: name
424              integer, optional, intent(out) :: xtype, len, attnum
425              integer :: nf90_inquire_attribute
426
427              Inquires about the netCDF  attribute  named  name,  of  variable
428              varid,  in the open netCDF dataset ncid.  xtype will contain the
429              external, netCDF type of the variable.   len  will  contain  the
430              number  of  elements  in the attribute.  attnum will contain the
431              attribute number.
432
433       function nf90_inq_attname(ncid, varid, attnum, name)
434              integer, intent(in) :: ncid, varid, attnum
435              character(len=*), intent(out) :: name
436              integer :: nf90_inq_attname
437
438              (Corresponds to ncanam() in version 2)
439
440              Gets the name of an attribute, given its  variable  ID  and  at‐
441              tribute number.  This function is useful in generic applications
442              that need to get the names of all the attributes associated with
443              a  variable  because attributes are accessed by name rather than
444              number in all other attribute functions (the number  of  an  at‐
445              tribute  is  more  volatile  than the name because it can change
446              when other attributes of the same variable  are  deleted).   The
447              attributes  for each variable are numbered from 1 (the first at‐
448              tribute) to natts, where natts is the number of  attributes  for
449              the  variable,  as  returned  from  a call to nf90_inquire_vari‐
450              able().
451
452       function nf90_put_att(ncid, varid, name, values)
453              integer, intent(in) :: ncid, varid
454              character(len=*), intent(in) :: name
455              <<whatever>>, intent(in) :: values
456              integer :: nf90_put_att
457
458              Unlike variables, attributes do not have separate functions  for
459              defining  and  writing  values.  This function defines a new at‐
460              tribute with a value or changes the value  of  an  existing  at‐
461              tribute.   If  the attribute is new, or if the space required to
462              store the attribute value is greater  than  before,  the  netCDF
463              dataset  must  be in define mode.  values contains the attribute
464              values to be written; it may be a scalar or a vector and must be
465              of     type     character,    integer(kind=OneByteInt),    inte‐
466              ger(kind=TwoByteInt),      integer(kind=FourByteInt),      inte‐
467              ger(kind=EightByteInt),    real(kind=FourByteReal),    or    re‐
468              al(kind=EightByteReal).
469
470       function nf90_get_att(ncid, varid, name, fIvalues)
471              integer, intent(in) :: ncid, varid
472              character(len=*), intent(in) :: name
473              <<whatever>>, intent(out) :: values
474              integer :: nf90_get_att
475
476              (Replaces ncagt() in version 2)
477
478              Gets the value(s) of a netCDF attribute, given its  variable  ID
479              and  name.   The values are returned in values, which must be of
480              type      character,       integer(kind=OneByteInt),       inte‐
481              ger(kind=TwoByteInt),      integer(kind=FourByteInt),      inte‐
482              ger(kind=EightByteInt),    real(kind=FourByteReal),    or    re‐
483              al(kind=EightByteReal).   Converts from the external type to the
484              type of the receiving variable, if possible;  otherwise  returns
485              an nf90_erange error.  All values of the attribute are returned,
486              so you must allocate enough space to hold them.   If  you  don't
487              know  how  much  space to reserve, call nf90_inquire_attribute()
488              first to find out the length of the attribute.
489
490       function nf90_copy_att(ncid_in, varid_in, name, ncid_out, varid_out)
491              integer, intent(in) :: ncid_in, varid_in
492              character(len=*), intent(in) :: name
493              integer, intent(in) :: ncid_out, varid_out
494              integer :: nf90_copy_att
495
496              (Corresponds to ncacpy() in version 2)
497
498              Copies an attribute from one netCDF dataset to another.  It  can
499              also  be  used to copy an attribute from one variable to another
500              within the same netCDF dataset.  ncid_in is the netCDF ID of  an
501              input  netCDF  dataset  from which the attribute will be copied.
502              varid_in is the ID of the variable in the input  netCDF  dataset
503              from  which  the  attribute will be copied, or nf90_global for a
504              global attribute.  name is the name of the attribute in the  in‐
505              put  netCDF  dataset to be copied.  ncid_out is the netCDF ID of
506              the output netCDF dataset to which the attribute will be copied.
507              It is permissible for the input and output netCDF ID's to be the
508              same.  The output netCDF dataset should be in define mode if the
509              attribute  to  be  copied  does not already exist for the target
510              variable, or if it would cause an existing target  attribute  to
511              grow.   varid_out is the ID of the variable in the output netCDF
512              dataset to which the attribute will be copied, or nf90_global to
513              copy to a global attribute.
514
515       function nf90_rename_att(ncid, varid, name, newname)
516              integer, intent(in) :: ncid, varid
517              character(len=*), intent(in) :: name, newname
518              integer :: nf90_rename_att
519
520              (Corresponds to ncaren()
521
522              Changes  the  name  of  an attribute.  If the new name is longer
523              than the original name, the netCDF must be in define mode.   You
524              cannot  rename an attribute to have the same name as another at‐
525              tribute of the same variable.  name is  the  original  attribute
526              name.   newname  is the new name to be assigned to the specified
527              attribute.  If the new name is longer than  the  old  name,  the
528              netCDF dataset must be in define mode.
529
530              function nf90_del_att(ncid, varid, name)
531                     integer, intent(in) :: ncid, varid
532                     character(len=*), intent(in) :: name
533                     integer :: nf90_del_att
534
535                     (Corresponds to ncadel() in version 2)
536
537                     Deletes  an attribute from a netCDF dataset.  The dataset
538                     must be in define mode.
539

COMMON ARGUMENT DESCRIPTIONS

541       In this section we define some common arguments which are used  in  the
542       "FUNCTION DESCRIPTIONS" section.
543
544       integer ncid
545              is  the  netCDF  ID returned from a previous, successful call to
546              nf90_open() or nf90_create()
547
548       character(len=*) name
549              is the name of a dimension, variable, or  attribute.   It  shall
550              begin with an alphabetic character, followed by zero or more al‐
551              phanumeric characters including the underscore (`_')  or  hyphen
552              (`-').   Case  is  significant.  The maximum allowable number of
553              characters is nf90_max_name.  Names that begin  with  an  under‐
554              score (`_') are reserved for use by the netCDF interface.
555
556       integer xtype
557              specifies  the  external  data  type of a netCDF variable or at‐
558              tribute and is  one  of  the  following:  nf90_byte,  nf90_char,
559              nf90_short,  nf90_int,  nf90_float,  or  nf90_double.  These are
560              used to specify 8-bit  integers,  characters,  16-bit  integers,
561              32-bit  integers, 32-bit IEEE floating point numbers, and 64-bit
562              IEEE floating-point numbers, respectively.
563
564
565       integer dimids
566              is a vector of dimension ID's and defines the shape of a  netCDF
567              variable.  The size of the vector shall be greater than or equal
568              to the rank (i.e. the number  of  dimensions)  of  the  variable
569              (ndims).   The vector shall be ordered by the speed with which a
570              dimension varies: dimids(1) shall be the  dimension  ID  of  the
571              most  rapidly  varying  dimension and dimids(ndims) shall be the
572              dimension ID of the most slowly varying dimension.  The  maximum
573              possible  number  of  dimensions  for a variable is given by the
574              symbolic constant nf90_max_var_dims.
575
576       integer dimid
577              is the ID of a netCDF dimension.  netCDF dimension ID's are  al‐
578              located  sequentially  from the positive integers beginning with
579              1.
580
581       integer ndims
582              is either the total number of dimensions in a netCDF dataset  or
583              the  rank  (i.e. the number of dimensions) of a netCDF variable.
584              The value shall not be negative or  greater  than  the  symbolic
585              constant nf90_max_var_dims.
586
587       integer varid
588              is  the  ID  of  a  netCDF variable or (for the attribute-access
589              functions) the symbolic constant nf90_global, which is  used  to
590              reference global attributes.  netCDF variable ID's are allocated
591              sequentially from the positive integers beginning with 1.
592
593       integer natts
594              is the number of global attributes in a netCDF dataset  for  the
595              nf90_inquire()  function  or the number of attributes associated
596              with a netCDF variable for the nf90_varinq() function.
597
598       integer start
599              specifies the starting point for accessing a  netCDF  variable's
600              data  values  in terms of the indicial coordinates of the corner
601              of the array section.  The indices start at 1; thus,  the  first
602              data  value  of  a  variable is (1, 1, ..., 1).  The size of the
603              vector shall be at least the rank of the associated netCDF vari‐
604              able  and  its elements shall correspond, in order, to the vari‐
605              able's dimensions.
606
607       integer stride
608              specifies the sampling interval  along  each  dimension  of  the
609              netCDF variable.   The elements of the stride vector correspond,
610              in order, to the netCDF variable's dimensions (stride(1))  gives
611              the  sampling  interval along the most rapidly varying dimension
612              of the netCDF variable).  Sampling intervals  are  specified  in
613              type-independent units of elements (a value of 1 selects consec‐
614              utive elements of the netCDF variable  along  the  corresponding
615              dimension, a value of 2 selects every other element, etc.).
616
617
618       imap   specifies  the  mapping between the dimensions of a netCDF vari‐
619              able and the in-memory structure of  the  internal  data  array.
620              The  elements  of the index mapping vector correspond, in order,
621              to the netCDF variable's dimensions (imap(1) gives the  distance
622              between elements of the internal array corresponding to the most
623              rapidly varying dimension of the  netCDF  variable).   Distances
624              between elements are specified in type-independent units of ele‐
625              ments (the distance between internal elements that occupy  adja‐
626              cent  memory locations is 1 and not the element's byte-length as
627              in netCDF 2).
628
629

VARIABLE PREFILLING

631       By default, the netCDF interface sets the values of  all  newly-defined
632       variables  of  finite length (i.e. those that do not have an unlimited,
633       dimension) to the type-dependent fill-value associated with each  vari‐
634       able.  This is done when nf90_enddef() is called.  The fill-value for a
635       variable may be changed from the default  value  by  defining  the  at‐
636       tribute  `_FillValue'  for  the variable.  This attribute must have the
637       same type as the variable and be of length one.
638
639       Variables with an unlimited dimension are also prefilled, but on an `as
640       needed'  basis.   For example, if the first write of such a variable is
641       to position 5, then positions 1 through 4 (and no others) would be  set
642       to the fill-value at the same time.
643
644       This  default  prefilling  of data values may be disabled by or'ing the
645       nf90_nofill flag into the mode parameter of  nf90_open()  or  nf90_cre‐
646       ate(),  or,  by  calling the function nf90_set_fill() with the argument
647       nf90_nofill.  For variables that do not use  the  unlimited  dimension,
648       this  call  must  be made before nf90_enddef().  For variables that use
649       the unlimited dimension, this call may be made at any time.
650
651       One can obtain increased performance of the netCDF interface  by  using
652       this  feature,  but only at the expense of requiring the application to
653       set every single data value.  The  performance  enhancing  behavior  of
654       this function is dependent on the particulars of the implementation and
655       dataset format.  The flag value controlled by  nf90_set_fill()  is  per
656       netCDF  ID, not per variable or per write.  Allowing this to change af‐
657       fects the degree to which a program can  be  effectively  parallelized.
658       Given  all  of  this,  we state that the use of this feature may not be
659       available (or even needed) in future  releases.  Programmers  are  cau‐
660       tioned against heavy reliance upon this feature.
661

MPP FUNCTION DESCRIPTIONS

663       Additional  functions  for  use  on  SGI/Cray  MPP machines (_CRAYMPP).
664       These are used to set and inquire which PE is the base for  MPP  for  a
665       particular  netCDF.  These  are  only  relevant when using the SGI/Cray
666       ``global'' Flexible File I/O layer and desire to have only a subset  of
667       PEs  to  open  the  specific netCDF file.  For technical reasons, these
668       functions are available on all platforms.  On  a  platform  other  than
669       SGI/Cray MPP, it is as if only processor available were processor 0.
670
671       To  use this feature, you need to specify a communicator group and call
672       glio_group_mpi() or glio_group_shmem() prior to the netCDF  nf90_open()
673       and nf90_create() calls.
674
675       Note  that  the routines described below are Fortran-77 routines rather
676       than Fortran-90 routines (they have an  "nf_"  prefix  rather  than  an
677       "nf90_" prefix).
678
679       integer function nf__create_mp(character*(*) path, integer cmode, inte‐
680              ger initialsize, integer pe, integer chunksize, integer ncid)
681
682              Like nf__create() but allows the base PE to be set.
683
684              The argument pe sets the base PE at creation time.  In  the  MPP
685              environment,  nf__create()  and nf90_create() set the base PE to
686              processor zero by default.
687
688       integer function nf__open_mp(character*(*) path, integer mode,  integer
689              pe, integer chunksize, integer ncid)
690
691              Like  nf__open() but allows the base PE to be set.  The argument
692              pe sets the base PE at creation time. In  the  MPP  environment,
693              nf__open()  and nf90_open() set the base PE to processor zero by
694              default.
695
696       integer function nf_inq_base_pe(integer ncid, integer pe)
697
698              Inquires of the netCDF dataset which PE is  being  used  as  the
699              base for MPP use.  This is safe to use at any time.
700
701       integer function nf_set_base_pe(integer ncid, integer pe)
702
703              Resets  the  base  PE for the netCDF dataset.  Only perform this
704              operation when the affected communicator group synchronizes  be‐
705              fore  and  after  the  call.   This  operation is very risky and
706              should only be contemplated under only the most extreme cases.
707

ENVIRONMENT VARIABLES

709       NETCDF_FFIOSPEC
710           Specifies the Flexible File I/O buffers for netCDF I/O when execut‐
711           ing  under  the UNICOS operating system (the variable is ignored on
712           other operating systems).  An appropriate specification can greatly
713           increase  the efficiency of netCDF I/O -- to the extent that it can
714           actually surpass FORTRAN binary I/O.  This environment variable has
715           been  made  a  little more generalized, such that other FFIO option
716           specifications can now be added.  The default specification is  bu‐
717           fa:336:2,  unless  a  current  FFIO  specification is in operation,
718           which will be honored.  See UNICOS Flexible File I/O for  more  in‐
719           formation.
720

MAILING-LISTS

722       Both  a  mailing  list and a digest are available for discussion of the
723       netCDF interface and announcements about netCDF bugs,  fixes,  and  en‐
724       hancements.   To  begin or change your subscription to either the mail‐
725       ing-list or the digest, send one of the following in the body (not  the
726       subject line) of an email message to "majordomo@unidata.ucar.edu".  Use
727       your email address in place of jdoe@host.inst.domain.
728
729       To subscribe to the netCDF mailing list:
730              subscribe netcdfgroup jdoe@host.inst.domain
731       To unsubscribe from the netCDF mailing list:
732              unsubscribe netcdfgroup jdoe@host.inst.domain
733       To subscribe to the netCDF digest:
734              subscribe netcdfdigest jdoe@host.inst.domain
735       To unsubscribe from the netCDF digest:
736              unsubscribe netcdfdigest jdoe@host.inst.domain
737       To retrieve the general introductory information for the mailing list:
738              info netcdfgroup
739       To get a synopsis of other majordomo commands:
740              help
741

SEE ALSO

743       ncdump(1), ncgen(1), netcdf(3f).
744
745       netCDF User's Guide, published by the Unidata Program Center, Universi‐
746       ty Corporation for Atmospheric Research, located in Boulder, Colorado.
747
748
749
750Printed: 119.6.22                 2000-04-04                      NETCDF(3f90)
Impressum