Page 1 of 1

Error to plot waveform and rh metrics with rGEDI

Posted: Sun Sep 29, 2024 3:43 pm America/New_York
by loriesouza
Dear colleagues ,

I am trying to plot the waveform with RH metrics for a specific region. I downloaded the data manually (using a shapefile directly from the site). When I request the values for the RH column, the values are all zero. I tested different relative heights (80, 100, 50, and 75), and all returned the following error message:

Error in seq.default(min_z, max_z, length = 4) :
'from' must be a finite number
Additionally, there were warning messages: 1: In min(x) : no non-missing arguments for min; returning Inf 2: In max(x) : no non-missing arguments for max; returning -Inf 3: In min(x) : no non-missing arguments for min; returning Inf 4: In max(x) : no non-missing arguments for max; returning -Inf 5: In max(energy_*****_normalized) : no non-missing arguments for max; returning -Inf.

HERE IS THE FULL CODE :

library(rGEDI)

gedilevel2a<-readLevel2A("C:/DOUTORADO_ECOLOGIA/rGEDI/GEDI02_A_002-20240929_190258/GEDI02_A_2019158114458_O02743_01_T03164_02_003_01_V002.h5")

# Get GEDI Elevation and Height Metrics
level2a<-getLevel2AM(gedilevel2a)
head(level2AM[,c("beam","shot_number","elev_highestreturn","elev_lowestmode","rh80")])


shot_number = "51090000100000001"

png("fig8.png", width = 8, height = 6, units = 'in', res = 300)
plotWFMetrics(gedilevel1b, gedilevel2a, shot_number, rh=c(25, 50, 75, 90))
dev.off()

Re: Error to plot waveform and rh metrics with rGEDI

Posted: Mon Sep 30, 2024 10:43 am America/New_York
by LP DAAC-EDL - dgolon
Hi @loriesouza Thanks for writing in. When you saw you are downloading the data manually from "the site", could you please clarify which site you are downloading the data from? LP DAAC Data Pool, Earthdata Search, AppEEARS, Google Earth Engine, etc? That will help us investigate what you are seeing. Thanks -- Danielle

Re: Error to plot waveform and rh metrics with rGEDI

Posted: Mon Sep 30, 2024 12:35 pm America/New_York
by loriesouza
Hello, Danielle! I really appreciate your attention and quick responses. I tried downloading the data via pyGEDI and GEE but was unsuccessful. In the latest analysis I mentioned here, I downloaded the data from Earthdata, uploaded the shapefile, set the temporal range, and requested "Download all data - Direct download of all selected data," but an error appeared. I also tried downloading with the "Customize with Harmony" option, selecting all beams, but the download did not complete.

Re: Error to plot waveform and rh metrics with rGEDI

Posted: Thu Oct 03, 2024 3:50 pm America/New_York
by loriesouza
Sorry if it wasn't very clear, Danielle. I downloaded it via Earth Search, using the option: Download all data - Direct download of all selected data.

Re: Error to plot waveform and rh metrics with rGEDI

Posted: Thu Oct 03, 2024 4:57 pm America/New_York
by LP DAAC-EDL - dgolon
Thank you for that information. One of our LP scientists is looking into it. I will report back when I have more information -- Thanks -- Danielle

Re: Error to plot waveform and rh metrics with rGEDI

Posted: Thu Oct 10, 2024 5:25 pm America/New_York
by LP DAAC-EDL - dgolon
Hello @loriesouza I apologize for the delay in response. Here is what we heard back from the team:

First, the "rGEDI" library was not developed by LP DAAC so we are unable to offer support on it. We recommend that you please reach out to the developers that created it with any detailed questions you have about it via: https://github.com/carlos-alberto-silva/rGEDI

Second, in the code you shared, you will need to download and read the L1B data as well.

gedilevel1b<-readLevel1B("GEDI-Data-Resources/data/GEDI01_B_2019158114458_O02743_01_T03164_02_005_01_V002.h5")

We also noticed the shot_number you are using is not a valid shot number for this sub-orbit of data.

We have additional tutorials that you can look at to work with GEDI data but noting they are mostly Python notebooks. Please see: https://github.com/nasa/GEDI-Data-Resources

Finally, we also wanted to add a note about the RH values being zero. This could happen when there is no variation in the vertical height of the objects withing the shot you are looking at.

Thank you,
LP Science