comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » HDF interface
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
HDF interface [message #28226] Wed, 28 November 2001 09:37 Go to next message
Daniel Peduzzi is currently offline  Daniel Peduzzi
Messages: 29
Registered: June 1999
Junior Member
Using IDL's HDF interface, does anybody know how to remove or rename
SD datasets within an HDF file?

Dan
Re: HDF interface [message #28303 is a reply to message #28226] Thu, 29 November 2001 00:42 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Daniel Peduzzi wrote:
>
> James Kuyper Jr. wrote in message <3C0531B9.10707@gsfc.nasa.gov>...
>> Daniel Peduzzi wrote:
>>
>>> Using IDL's HDF interface, does anybody know how to remove or rename
>>> SD datasets within an HDF file?
>>>
>>> Dan
>>
>> HDF isn't good about deleting or renaming things. The best you can do is
>> create a new file by copying all the parts of the old file that you want
>> to keep, while dropping or renaming the parts you want to drop or
>> rename. Very annoying. HDF provides routines for deleting or renaming
>> Vgroups, but not for anything else. HDF_DELDD doesn't actually delete an
>> object from an HDF file, it just removes it from the list of data
>> descriptors. The deleted object still takes up space (which can be
>> released by using the hdfpack routine).
>>
>
> Excellent, thanks for the info.
>
> Next question: does anyone have a good HDF to NetCDF converter? ;-)
>
> Dan

Dear Dan,

in principle I have one.

I have a read_hdf/write_hdf and a read_ncdf/write_ncdf routine
which are uses the same data structure.
But it depends on a static definition of possible attributes for the
files.
So I have defined in a definition file how e.g. pi_name, _FillValue is
written.

If you are able to see a chance to write a definition like this example
for your
data you will be able to use a lot of icg-data-structure routines.

For example I show you our definition and the one I am using reading
nilu HDF
files in our structure.


This is our definition
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ work/rb_lib/def_icg.pro

This is a smaller one which shows what is really necessary.
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ work/rb_lib/def_nilu.pro
This structure is a bit different to our data structure.

To adjust this structure to an ICG-DATA-STRUCTURE I am using a routine
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ html/dbase/download/ad_nilu2icgs.tar.gz
result=ad_nilu2icgs(read_hdf('nilu.hdf',def='def_nilu'))


The following are the routines for read_hdf and write_ncdf
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ html/dbase/download/read_hdf.tar.gz
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ html/dbase/download/write_ncdf.tar.gz


There are mire routines available to work with this data structures.

e.g.
icgs_correlate
This function computes the Pearson linear correlation and linear
regression
coefficients for two parameters in an ICG structure.
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ html/dbase/download/icgs_correlate.tar.gz


The whole library you'll find here:
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

If you are using the catalogue look for the category: ICG_STRUCT

regards

Reimar



--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======

read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html
Re: HDF interface [message #28317 is a reply to message #28226] Wed, 28 November 2001 12:53 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Daniel Peduzzi (peduzzi@mediaone.net) writes:

> Next question: does anyone have a good HDF to NetCDF converter? ;-)

Uh, you mean other than IDL? I used to sell
a ton of IDL licenses to NASA Goddard just so
people could take all their CDF data to HDF.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: HDF interface [message #28318 is a reply to message #28226] Wed, 28 November 2001 11:32 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
From: "Daniel Peduzzi" <peduzzi@mediaone.net>

> Next question: does anyone have a good HDF to NetCDF converter? ;-)

Not me, but the HDF package includes versions of ncdump and ncgen for
accessing HDF files via a netCDF interface. So to convert from HDF to netCDF
you could dump the HDF file to netCDF-text (CDL) form with HDF-ncdump, then
generate a netCDF-binary file with netCDF-ncgen.

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research



--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG
Re: HDF interface [message #28319 is a reply to message #28226] Wed, 28 November 2001 11:06 Go to previous message
Daniel Peduzzi is currently offline  Daniel Peduzzi
Messages: 29
Registered: June 1999
Junior Member
James Kuyper Jr. wrote in message <3C0531B9.10707@gsfc.nasa.gov>...
> Daniel Peduzzi wrote:
>
>> Using IDL's HDF interface, does anybody know how to remove or rename
>> SD datasets within an HDF file?
>>
>> Dan
>
> HDF isn't good about deleting or renaming things. The best you can do is
> create a new file by copying all the parts of the old file that you want
> to keep, while dropping or renaming the parts you want to drop or
> rename. Very annoying. HDF provides routines for deleting or renaming
> Vgroups, but not for anything else. HDF_DELDD doesn't actually delete an
> object from an HDF file, it just removes it from the list of data
> descriptors. The deleted object still takes up space (which can be
> released by using the hdfpack routine).
>

Excellent, thanks for the info.

Next question: does anyone have a good HDF to NetCDF converter? ;-)

Dan
Re: HDF interface [message #28320 is a reply to message #28226] Wed, 28 November 2001 10:49 Go to previous message
James Kuyper Jr. is currently offline  James Kuyper Jr.
Messages: 10
Registered: November 2001
Junior Member
Daniel Peduzzi wrote:

> Using IDL's HDF interface, does anybody know how to remove or rename
> SD datasets within an HDF file?
>
> Dan

HDF isn't good about deleting or renaming things. The best you can do is
create a new file by copying all the parts of the old file that you want
to keep, while dropping or renaming the parts you want to drop or
rename. Very annoying. HDF provides routines for deleting or renaming
Vgroups, but not for anything else. HDF_DELDD doesn't actually delete an
object from an HDF file, it just removes it from the list of data
descriptors. The deleted object still takes up space (which can be
released by using the hdfpack routine).
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Teaching material
Next Topic: Can't make widgets work

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 10:58:12 PDT 2025

Total time taken to generate the page: 0.00526 seconds