Permian-Global-Research / chewie

A package to efficiently download GEDI data
Apache License 2.0
4 stars 1 forks source link

Issue in downloading the GEDI #23

Open diesseh opened 1 week ago

diesseh commented 1 week ago

Hi

I am facing this issue while downloading the GEDI

MNR_1_gedi_2a_sf <- grab_gedi(MNR_1_gedi_2a_search) |>

  • filter(
  • quality_flag == 1,
  • degrade_flag == 0,
  • sensitivity==0.9
  • ) |>
  • select(
  • beam, date_time, lat_lowestmode, lon_lowestmode, elev_highestreturn,
  • elev_lowestmode,rh98, rh100
  • ) |>
  • collect_gedi(gedi_find = MNR_1_gedi_2a_search) → Downloading 8 2A Data files. Download status: 1 done; 7 in progress. Total size: 4783.84 Mb (??%)... done!
    → Converting 8 2A hdf files to parquet. Error in purrr::map(): ℹ In index: 1. Caused by error in H5File.open(): ! length(name) == 1 is not TRUE Run rlang::last_trace() to see where the error occurred. rlang::last_trace() <error/purrr_error_indexed> Error in purrr::map(): ℹ In index: 1. Caused by error in H5File.open(): ! length(name) == 1 is not TRUE

    Backtrace: ▆

    1. ├─chewie::collect_gedi(...)
    2. │ └─"shot_number" %in% names(x)
    3. ├─dplyr::select(...)
    4. ├─dplyr::filter(...)
    5. └─chewie::grab_gedi(MNR_1_gedi_2a_search)
    6. ├─purrr::list_rbind(...)
    7. │ └─purrr:::check_list_of_data_frames(x)
    8. │ └─vctrs::vec_check_list(x, call = error_call)
    9. │ └─vctrs::obj_check_list(x, ..., arg = arg, call = call)
    10. └─purrr::map(...)
    11. └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    12. ├─purrr:::with_indexed_errors(...)
    13. │ └─base::withCallingHandlers(...)
    14. ├─purrr:::call_with_cleanup(...)
    15. └─chewie (local) .f(.x[[i]], ...)
    16. └─chewie:::chewie_mk_parquet(...)
    17. ├─chewie:::chewie_convert(df, extra_vars = add_vars)
    18. └─chewie:::chewie_convert.chewie.download.2A(df, extra_vars = add_vars)
    19. └─chewie:::h5_to_gedi_dt(x, .f = l2a_h5_to_dt, extra_vars, .progress = TRUE)
    20. └─hdf5r::H5File$new(x$destfile, mode = "r")
    21. └─hdf5r (local) initialize(...)
    22. └─hdf5r:::H5File.open(filename, mode, file_create_pl, file_access_pl)
    23. └─base::stopifnot(length(name) == 1)
    24. └─base::stop(simpleError(msg, call = if (p <- sys.parent(1L)) sys.call(p))) Run rlang::last_trace(drop = FALSE) to see 3 hidden frames.
h-a-graham commented 1 week ago

Hi thanks for reporting. I'm fairly sure this is a known issue which occurs when there is a network issue when downloading a file.

The best work around is to run:

chewie_clear_h5_temp_cache()

And rerun your command.

I'll try to pick this up properly next week.

Cheers!