EVI/NDVI Time Series Data from HLS 2.0

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
bayu.suseno
Posts: 3
Joined: Fri Jun 16, 2023 10:31 pm America/New_York
Answers: 0

EVI/NDVI Time Series Data from HLS 2.0

by bayu.suseno » Tue Jun 27, 2023 2:26 am America/New_York

Dear LP DAAC Team,

I hope your day is going great.

I need vegetation index (EVI, NDVI) from Harmonized Landsat and Sentinel (HLS) time series data.

I have run this Python code.

stac_lp = [s for s in stac_response['links'] if 'LP' in s['title']] # Search for only LP-specific catalogs

# LPCLOUD is the STAC catalog we will be using and exploring today
lp_cloud = r.get([s for s in stac_lp if s['title'] == 'LPCLOUD'][0]['href']).json()
for l in lp_cloud: print(f"{l}: {lp_cloud[l]}")

lp_links = lp_cloud['links']
for l in lp_links:
try:
print(f"{l['href']} is the {l['title']}")
except:
print(f"{l['href']}")

lp_collections = [l['href'] for l in lp_links if l['rel'] == 'collections'][0] # Set collections endpoint to variable
collections_response = r.get(f"{lp_collections}").json() # Call collections endpoint
print(f"This collection contains {collections_response['description']} ({len(collections_response['collections'])} available)")

collections = collections_response['collections']
collections[1]

My Python output showed that the data referenced to 'ASTER Global Digital Elevation Model NetCDF V003'

How to fix my Python code to extract HLS NDVI/EVI time series data?

Thank you very much for your help.

Bayu
Attachments
python hls output.png
python hls output.png (166.57 KiB) Not viewed yet

Tags:

LP DAAC - dgolon
User Services
User Services
Posts: 293
Joined: Mon Sep 30, 2019 10:00 am America/New_York
Answers: 0
Has thanked: 18 times
Been thanked: 2 times
Contact:

Re: EVI/NDVI Time Series Data from HLS 2.0

by LP DAAC - dgolon » Tue Jun 27, 2023 10:29 am America/New_York

Hi @bayu.suseno I am not sure why you are receiving ASTER data as the output. Let me check with our team that wrote the script and we'll get back to you. Thanks, Danielle
Subscribe to the LP DAAC listserv by sending a blank email to lpdaac-join@lists.nasa.gov.

Sign up for the Landsat listserv to receive the most up to date information about Landsat data: https://public.govdelivery.com/accounts/USDOIGS/subscriber/new#tab1.

LP DAAC - dgolon
User Services
User Services
Posts: 293
Joined: Mon Sep 30, 2019 10:00 am America/New_York
Answers: 0
Has thanked: 18 times
Been thanked: 2 times
Contact:

Re: EVI/NDVI Time Series Data from HLS 2.0

by LP DAAC - dgolon » Tue Jun 27, 2023 10:33 am America/New_York

Hi @bayu.suseno

There was an issue with the workflow in that tutorial due to some changes made to CMR STAC. We are currently developing a new HLS tutorial that is available here: https://github.com/nasa/HLS-Data-Resources. The new repository is still under active development, so some resources are not fully refined, but the new tutorial in the python/tutorials folder has a similar use case calculating EVI. Please follow the setup instructions for the repository to set up the necessary Python environment.

The error in the R script looks like maybe the necessary gdal configuration options were not set. If the cell setting the gdal config options ran successfully during your attempt (shown below), try making sure that the `terra` package is version is 1.5.26 or newer.

setGDALconfig("GDAL_HTTP_UNSAFESSL", value = "YES")
setGDALconfig("GDAL_HTTP_COOKIEFILE", value = ".rcookies")
setGDALconfig("GDAL_HTTP_COOKIEJAR", value = ".rcookies")
setGDALconfig("GDAL_DISABLE_READDIR_ON_OPEN", value = "EMPTY_DIR")
setGDALconfig("CPL_VSIL_CURL_ALLOWED_EXTENSIONS", value = "TIF")

Hope this helps.

Regards,

LP DAAC User Services
Subscribe to the LP DAAC listserv by sending a blank email to lpdaac-join@lists.nasa.gov.

Sign up for the Landsat listserv to receive the most up to date information about Landsat data: https://public.govdelivery.com/accounts/USDOIGS/subscriber/new#tab1.

bayu.suseno
Posts: 3
Joined: Fri Jun 16, 2023 10:31 pm America/New_York
Answers: 0

Re: EVI/NDVI Time Series Data from HLS 2.0

by bayu.suseno » Thu Jun 29, 2023 1:20 am America/New_York

Dear Daniel and LP DAAC User Services,

Thank you for your reply.

I will look for the code in the new HLS tutorial link and report the result soon.

Thank you very much for your help. I appreciate it.

Best regards,
Bayu Suseno

luriqafe
Posts: 1
Joined: Thu Jun 29, 2023 3:26 am America/New_York
Answers: 0

Re: EVI/NDVI Time Series Data from HLS 2.0

by luriqafe » Thu Jun 29, 2023 3:27 am America/New_York

<a href="url">text</a>
[This link](http://example.net/)
[url=http://www.dynamicdrive.com/forums]Dynamic Drive Forums[/url]

bayu.suseno
Posts: 3
Joined: Fri Jun 16, 2023 10:31 pm America/New_York
Answers: 0

Re: EVI/NDVI Time Series Data from HLS 2.0

by bayu.suseno » Mon Jul 03, 2023 2:23 am America/New_York

Dear LP DAAC Team,

I have run the Python code in the HLS tutorial that is available here: https://github.com/nasa/HLS-Data-Resources. I am excited that the codes are running smoothly, so I could extract EVI from HLS2.0.

Thank you very much for your help. I appreciate it.

Best regards,
Bayu

LP DAAC - dgolon
User Services
User Services
Posts: 293
Joined: Mon Sep 30, 2019 10:00 am America/New_York
Answers: 0
Has thanked: 18 times
Been thanked: 2 times
Contact:

Re: EVI/NDVI Time Series Data from HLS 2.0

by LP DAAC - dgolon » Mon Jul 03, 2023 10:57 am America/New_York

Glad to hear it @bayu.suseno, please let us know if you run into any other issues or have any additional questions. Thanks -- Danielle
Subscribe to the LP DAAC listserv by sending a blank email to lpdaac-join@lists.nasa.gov.

Sign up for the Landsat listserv to receive the most up to date information about Landsat data: https://public.govdelivery.com/accounts/USDOIGS/subscriber/new#tab1.

Post Reply