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

Home » Public Forums » archive » Copying HDF5 datasets to a new HDF5 file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Copying HDF5 datasets to a new HDF5 file [message #93890 is a reply to message #93879] Tue, 15 November 2016 19:43 Go to previous message
khyde is currently offline  khyde
Messages: 21
Registered: November 2013
Junior Member
Thank you for your suggestions. I've been playing around with making new hdf5 files most of the day. I have had some success, but am struggling to create the exact file I need.

Basically, I want to replicate the files found on the ocean color web, but replace the main data products (e.g. the chlor_a and chl_ocx data found in this file: http://oceandata.sci.gsfc.nasa.gov/cgi/getfile/S2001122.L3b_ DAY_CHL.nc) with new products that I created.

If anyone could provide some suggestions and sample code on how to create a new hdf5 file with all of the attribute information from the original file, but with new datasets I would really appreciate it.

Thank you again,
Kim



On Monday, November 14, 2016 at 8:14:22 PM UTC-5, ZP Yin wrote:
> On Tuesday, November 15, 2016 at 4:22:36 AM UTC+8, kimber...@noaa.gov wrote:
>> Hello,
>>
>> I am using data from an existing HDF5 file to create new products that I would like to save into a new HDF5 file. Is there an easy way to copy some of the information from the input file to the output file? For example, I would like to retain all of the file attribute information and some, but not all, of the original datasets, and then add my new data products.
>>
>> The other way I thought to accomplish this was to create a copy of the original file and then delete the datasets and/or attributes I no longer need, but I didn't see an easy way to delete information either.
>>
>> Lastly, I was wondering if there is any good information on creating HDF5 files in IDL. I have found the IDL help to be less than informative and I was hoping to find some good explanations of what some of the H5x_xxx programs do.
>>
>> Any suggestions or ideas would be greatly appreciated.
>>
>> Thanks,
>> Kim
>
> Hello, Kim!
>
> I have met the same problems too. Here is my suggestions and I hope they could be useful for you.
>
> For the first problem, I find there is no 'easy' way to transfer the information. And I will choose the information manually, then transfer them one by one. Then add my new datasets. I think 'H5_PUTDATA'(IDL 8.5) will be helpful.
> http://www.harrisgeospatial.com/docs/H5_PUTDATA.html
>
> For the second problem, it seems that 'HDF5 does not provide a mechanism to remove a dataset from a file at this time, it is not possible to put a dataset into a file if the ID to that dataset already exists.'(http://www.harrisgeospatial.com/docs/H5_PUTDATA.html
> ). But there is an way to make the datasets invisible( https://support.hdfgroup.org/HDF5/doc1.6/UG/10_Datasets.html) instead of deleting it.
>
> For the third problem, I have the same feelings with you. So when I deal with these problems about H5x_xxx programs I will try a lot and read a lot information in some websites. And then ask for help like you do!
>
> :)
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: problem with FIX function
Next Topic: How to create blank array in IDL like python???

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

Current Time: Wed Oct 08 11:43:53 PDT 2025

Total time taken to generate the page: 0.01565 seconds