LPDAAC Tutorial Error

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
g.studer.ellis
Posts: 4
Joined: Thu Nov 18, 2021 1:30 pm America/New_York
Answers: 0

LPDAAC Tutorial Error

by g.studer.ellis » Mon Dec 06, 2021 2:16 pm America/New_York

I am having trouble following the "Working with Daily NASA VIIRS Surface Reflectance Data" tutorial from the LP DAAC here: https://lpdaac.usgs.gov/resources/e-lea ... ance-data/

Issue:
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

AND MANY MORE STEPS

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

Tags:

g.studer.ellis
Posts: 4
Joined: Thu Nov 18, 2021 1:30 pm America/New_York
Answers: 0

Re: LPDAAC Tutorial Error

by g.studer.ellis » Tue Dec 14, 2021 2:26 pm America/New_York

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: https://lpdaac.usgs.gov/resources/e-lea ... ance-data/

I can still find the tutorial code on Git here: https://git.earthdata.nasa.gov/projects ... rial.ipynb

Please advice on working with VIIRS data in Python.

LP DAAC - jwilson
User Services
User Services
Posts: 266
Joined: Mon Sep 30, 2019 12:39 pm America/New_York
Answers: 1
Has thanked: 9 times

Re: LPDAAC Tutorial Error

by LP DAAC - jwilson » Mon Dec 20, 2021 4:20 pm America/New_York

I apologize for the delayed response. We have forwarded your inquiry to our Subject Matter Expert for further guidance.
Janice

LP DAAC - afriesz
Subject Matter Expert
Subject Matter Expert
Posts: 59
Joined: Tue Nov 12, 2019 4:02 pm America/New_York
Answers: 2
Been thanked: 2 times

Re: LPDAAC Tutorial Error

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

@g.studer.ellis,

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: https://git.earthdata.nasa.gov/projects ... 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.

Post Reply