Re: [netcdfgroup] More Netcdf4 F90 questions

Roy Mendelssohn <Roy.Mendelssohn@xxxxxxxx> writes:

> Hi All:
>
> Just want to make certain of some things.
>
> 1.  The version 4.0 docs imply the flag needed to get the new  
> features on a create is "NF90_HDF5"  while the examples seem to imply  
> "NF90_NETCDF4".  Which of these  (or both) is correct.

NF90_NETCDF4 is correct, to be consistent with the other netCDF APIs.

NF90_HDF5 is deprecated as will be removed in the 4.0 release.

> 2.  Are groups, vlens, compound types etc. like other basic file  
> structures, that can only be created in "Define Mode", and data  
> written to them after leaving define mode?

Yes, sorry this was not clear from the docs. I have added the
following to the the netCDF Users Guide:

   Types are defined in define mode, and must be fully defined before
   they are used. New types may be added to a file by re-entering
   define mode.

   Types may be defined in any group in the data file, but they are
   always available globally in the file.

>
> 3.  What is the difference between "nf90_inq_ncid (return ncid of the  
> named group.)"  and "nf90_inq_grp_ncid  (Find the group id of a named  
> group)" ?

Nothing. nf90_inq_grp_ncid is deprecated and will be removed before
the final release. I have removed it from the documentation and the
sample code.

> 4. Can groups be given attributes, or only names?

Yes, the global attribute is now global to the group it is in, rather
than the file it is in.

In the default case, with only the root group, this is not noticed,
but with sub-groups, global attributes can be defined in any group.

> 5.  Can Vlen's have attributes?  If so, what is used as the varid in  
> the attribute write?  would it be the xtypeID defiend when the Vlen  
> was created?

The type cannot have an attribute.

But any variable, including a variable of vlen type, can have an
attribute.

I have added this to the docs as well...

> Sorry to be such a pest, but as I work with it more I will probably  
> have more questions.
>

Thanks for the helpful input! 

Ed
-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx


  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: