Importing h5 data into python

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
mbruins
Posts: 1
Joined: Mon Aug 22, 2022 2:41 am America/New_York
Answers: 0

Importing h5 data into python

by mbruins » Mon Aug 22, 2022 2:44 am America/New_York

To whom this may concern,

I am interested in importing black marble VNP46A2 data into python. I have run the script below, but I get the following error:

TypeError: h5py objects cannot be pickled

I am quite new to working with geospatial data and am a bit lost! Any help would be greatly appreciated.

Marianne

--code------------------------------------------------------------------------
import os
import h5py

# Set current directory
directory_path = os.getcwd()
print("My current directory is : " + directory_path)

filename = "VNP46A2.A2022207.h00v16.001.2022219104939.h5"

hf = h5py.File(filename, "w")

*********
TypeError: h5py objects cannot be pickled

Tags:

LAADS_UserServices_M
User Services
User Services
Posts: 279
Joined: Mon Sep 30, 2019 8:33 am America/New_York
Answers: 1
Has thanked: 3 times

Re: Importing h5 data into python

by LAADS_UserServices_M » Mon Aug 22, 2022 10:23 am America/New_York

Dear Marianne:
For help with h5py code please contact https://www.h5py.org/. Otherwise, you can check out python examples for VNP46 data provided by the HDF-EOS Tools and Information Center at:
http://hdfeos.org/zoo/index_openLAADS_Examples.php#NPP_VIIRS
For further help/questions, contact hdfeos:
http://hdfeos.org/home/contact.php
Regards,
LAADS User Services

To receive news from LAADS DAAC direct to your inbox, email laadsdaac-join@lists.nasa.gov with “subscribe” in the subject line.

Post Reply