Page 1 of 1

LPDAAC Tutorial Error

Posted: Mon Dec 06, 2021 2:16 pm America/New_York
by g.studer.ellis
I am having trouble following the "Working with Daily NASA VIIRS Surface Reflectance Data" tutorial from the LP DAAC here: ... ance-data/

Any step in the tutorial which references a .value produces an "Attribute Error." Specifically, "AttributeError: 'Dataset' object has no attribute 'value.'" I have confirmed that there is no attribute 'value' using dir(f['HDFEOS INFORMATION']['StructMetadata.0']) for step 2a below.

Steps that Error:
2a) Below, read the file metadata and store as a list
fileMetadata = f['HDFEOS INFORMATION']['StructMetadata.0'].value.split() # Read file metadata
fileMetadata = [m.decode('utf-8') for m in fileMetadata] # Clean up file metadata
fileMetadata[0:33] # Print a subset of the entire file metadata record

3a) Apply a Scale Factor
red = r.value * scaleFactor
green = g.value * scaleFactor
blue = b.value * scaleFactor
nir = n.value * scaleFactor


Please advise on an additional way to source values from the .h5 file, or another workaround for the tutorial.

Re: LPDAAC Tutorial Error

Posted: Tue Dec 14, 2021 2:26 pm America/New_York
by g.studer.ellis
Hi I wanted to check in and see if there has been any progress addressing the tutorial issue. I have not heard anything yet.

Additionally, I went back to the tutorial to double check something and noticed that it is no longer accessible at the LP DAAC site here: ... ance-data/

I can still find the tutorial code on Git here: ... rial.ipynb

Please advice on working with VIIRS data in Python.

Re: LPDAAC Tutorial Error

Posted: Mon Dec 20, 2021 4:20 pm America/New_York
by LP DAAC - jwilson
I apologize for the delayed response. We have forwarded your inquiry to our Subject Matter Expert for further guidance.

Re: LPDAAC Tutorial Error

Posted: Fri Dec 31, 2021 12:40 pm America/New_York
by LP DAAC - afriesz

Sorry for the delay. You've identified some content that needs to be updated on our website. We'll make the updates ASAP. In the meantime, the repository with the code/notebook is up to date. Please clone or download the following repo: ... nce/browse. That should get you past the issue you were seeing with the '.value' calls. Note, there is an HTML file in the repo that shows the fully executed notebook without deploying a Jupyter Notebook. Let us know if you run into any issue.