[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #UBN-375372]: Sample programs



I assume you are trying to nf_inq_grps(int ncid, int *numgrps, int *ncids);
Netcdf has this funny trick that if an output is NULL, then it is ignored.
So, you actually need to call nf_inq_grps twice.
The first fime, you pass a variable for numgrps  and pass NULL for ncids.
Not sure offhand how to pass null in fortran. In any case, this returns 
the number of subgroups of the group specified by ncid.
Then you use numgrps to allocata an array of integers of size numgrps.
Then you call nf_inq_grps with both numgrps and the ncids array defined.
Upon return, the ncids array will contain the group ids of the subgroups. 


> Full Name: Lena Iredell
> Email Address: address@hidden
> Organization: NASA
> Package Version: F90
> Operating System: linux
> Hardware:
> Description of problem: Hello. I'm a new user of NetCDF using F90. I am 
> trying to find some sample programs. The web page that I'm looking at looks 
> like an example should be there, but isn't. Specifically I'm trying to 
> inquire and gather information about groups. The description typically states 
> that an array will be returned, but how do I find out the size of the array 
> to set the dimension properly. Also the data set that I'm reading includes 
> data types "ushort" and "string". Do you have F90 samples of code on how to 
> read them properly. Thanks so much!
> 
> 

=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: UBN-375372
Department: Support netCDF
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.