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

[netCDF #TLW-910405]: Additional group questions F90



No, I mean use e.g. nc90_inq_grps instead of nc_inq_grps, and so on.
So create a fortran program based on the C code.

> Translation? Do you mean read in C and then pass the data through to my
> Fortran program?
> 
> Lena Iredell
> SAIC
> NASA Goddard Space Flight Center
> Code 610
> Phone:  301.286.9773
> 
> On 12/19/2017 4:10 PM, Unidata netCDF Support wrote:
> > We have been playing catchup on the fortran documentation.
> > You might try looking at the C code examples and try to do
> > a simple translation to fortran.
> >
> >> Yes, of course, I needed to leave the word group out of the call. Duh.
> >> That did help to return an appropriate number for the group. I will try
> >> to forge ahead.
> >>
> >> Do you know of any sample programs for the other calls as the
> >> descriptions on the web page
> >> https://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-f90.html#NF90_005fINQ_005fNCID
> >>
> >> is not very complete, sometimes referring to the returned parameter as
> >> integer, sometimes as array - but very unclear. I'm not sure where the
> >> error messages, |NF90_NOERR, |||NF90_EBADID, |||||NF90_ENOTNC4,
> >> |||||||NF90_ESTRICTNC3, or |||||||||NF90_EHDFERR would be returned in
> >> the on line descriptions.|||||
> >>
> >>
> >> * NF90_INQ_NCID
> >> <https://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-f90.html#NF90_005fINQ_005fNCID>
> >>
> >> * NF90_INQ_GRPS
> >> <https://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-f90.html#NF90_005fINQ_005fGRPS>
> >>
> >> * NF90_INQ_VARIDS
> >> <https://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-f90.html#NF90_005fINQ_005fVARIDS>
> >>
> >> * NF90_INQ_DIMIDS
> >> <https://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-f90.html#NF90_005fINQ_005fDIMIDS>
> >>
> >> * NF90_INQ_GRPNAME_LEN
> >> <https://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-f90.html#NF90_005fINQ_005fGRPNAME_005fLEN>
> >>
> >> * NF90_INQ_GRPNAME
> >> <https://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-f90.html#NF90_005fINQ_005fGRPNAME>
> >>
> >> * NF90_INQ_GRPNAME_FULL
> >> <https://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-f90.html#NF90_005fINQ_005fGRPNAME_005fFULL>
> >>
> >> * NF90_INQ_GRP_PARENT
> >> <https://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-f90.html#NF90_005fINQ_005fGRP_005fPARENT>
> >>
> >> * NF90_DEF_GRP
> >> <https://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-f90.html#NF90_005fDEF_005fGRP>
> >>
> >> The web page for several of the functions refer to an empty Example, or
> >> to "nf90_test/ftst_groups.F" but this is not an active link, so I can't
> >> access it.
> >>
> >> Thanks for your help! I really appreciate it.
> >>
> >>
> >> Lena
> >>
> >>
> >>
> >> ------------------------------------------------------------------------
> >>
> >> Lena Iredell
> >> SAIC
> >> NASA Goddard Space Flight Center
> >> Code 610
> >> Phone:  301.286.9773
> >>
> >> On 12/19/2017 3:27 PM, Unidata netCDF Support wrote:
> >>> I suspect that the group name is actually 'mol_lay'
> >>> and not 'group mol_lay' You should include the 'group'
> >>> keyword as part of the group name.
> >>>
> >>>
> >>>> Full Name: Lena Iredell
> >>>> Email Address: address@hidden
> >>>> Organization: NASA
> >>>> Package Version: netcdf-4.4.1
> >>>> Operating System: F90
> >>>> Hardware: linux
> >>>> Description of problem: I'm trying to find out information about group 
> >>>> data. When doing a ncdump I see that there are 4 subgroups. Is there a 
> >>>> ncdump command that gives the "ncid" number for the groups? My program:
> >>>>
> >>>> The ncid of the main file is 65536.
> >>>>
> >>>> status = nf90_inq_ncid(ncid,'group mol_lay', grp_ncid1)
> >>>> print *,' group mol_lay '
> >>>> print *,' nf90_inq_ncid ',status
> >>>> print *,' grp_ncid1 ',grp_ncid1
> >>>>
> >>>> with all the parameters declared integer.
> >>>> Here is the result that I see:
> >>>>
> >>>>
> >>>> group mol_lay
> >>>> nf90_inq_ncid         -125
> >>>> grp_ncid1            0
> >>>>
> >>>> What am I doing wrong?
> >>>>
> >>>> This is the documentation from your web page:
> >>>> 3.1 Find a Group ID: NF90_INQ_NCID
> >>>>
> >>>> Given an ncid and group name (NULL or "" gets root group), return ncid 
> >>>> of the named group.
> >>>> Usage
> >>>>
> >>>> function nf90_inq_ncid(ncid, name, grp_ncid)
> >>>> integer, intent(in) :: ncid
> >>>> character (len = *), intent(in) :: name
> >>>> integer, intent(out) :: grp_ncid
> >>>> integer :: nf90_inq_ncid
> >>>>
> >>>> NCID
> >>>> The group id for this operation.
> >>>> NAME
> >>>> A character array that holds the name of the desired group. Must be less 
> >>>> then NF90_MAX_NAME.
> >>>> GRPID
> >>>> The ID of the group will go here.
> >>>>
> >>>> Errors
> >>>>
> >>>> NF90_NOERR
> >>>> No error.
> >>>> NF90_EBADID
> >>>> Bad group id.
> >>>> NF90_ENOTNC4
> >>>> Attempting a netCDF-4 operation on a netCDF-3 file. NetCDF-4 operations 
> >>>> can only be performed on files defined with a create mode which includes 
> >>>> flag HDF5. (see NF90_OPEN).
> >>>> NF90_ESTRICTNC3
> >>>> This file was created with the strict netcdf-3 flag, therefore netcdf-4 
> >>>> operations are not allowed. (see NF90_OPEN).
> >>>> NF90_EHDFERR
> >>>> An error was reported by the HDF5 layer.
> >>>>
> >>>> Example
> >>>>
> >>>> This example is from nf90_test/ftst_groups.F.
> >>>>
> >>>> However the "Example" is not a active link. I can't see the code. It 
> >>>> looks as though your error messages are characters, not integers?
> >>>>
> >>>> Thanks for your help!!!!
> >>>>
> >>>>
> >>>>
> >>> =Dennis Heimbigner
> >>>     Unidata
> >>>
> >>>
> >>> Ticket Details
> >>> ===================
> >>> Ticket ID: TLW-910405
> >>> 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.
> >>>
> >>>
> >>
> >>
> > =Dennis Heimbigner
> >    Unidata
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: TLW-910405
> > 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.
> >
> >
> 
> 
> 

=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: TLW-910405
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.