Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list_vpst_aloft fails on hdf5 #647

Open
bart1 opened this issue Dec 13, 2023 · 1 comment
Open

list_vpst_aloft fails on hdf5 #647

bart1 opened this issue Dec 13, 2023 · 1 comment
Assignees
Milestone

Comments

@bart1
Copy link
Collaborator

bart1 commented Dec 13, 2023

I have not investigated in detail but it seems this function fails unjustified because the code looks for an object only creates for a csv:

require(bioRad)
#> Loading required package: bioRad
#> Welcome to bioRad version 0.7.3
list_vpts_aloft(
  format='hdf5',
  date_min = "2019-10-01",
  date_max = "2019-11-30",
  radars = c("frcol", "frcae")
)
#> Error in list_vpts_aloft(format = "hdf5", date_min = "2019-10-01", date_max = "2019-11-30", : object 'found_vpts_aloft' not found

Created on 2023-12-13 with reprex v2.0.2

@peterdesmet
Copy link
Collaborator

peterdesmet commented Feb 9, 2024

The function documents that "Currently only csv urls are supported.", but I agree that should be extended. The issue with hdf5 files is that one cannot predict the file name (this in contrast with the daily or monthly), you have to look them up. That can be provided with the aws.s3 package like so:

library(aws.s3)
library(dplyr)

region = "eu-west-1"
df <- get_bucket_df(
  "aloftdata",
  prefix = "baltrad/hdf5/bejab/2018/", # Directory
  max = 2000, # Maximum number of files to get
  region = region
)

files <- pull(df, Key)

I would actually do the same for the csv files (look them up), so only valid (and not potential) URLs are returned. I would also limit the function to 1 radar at a time.

I'll look into this (but not right now 😊).

@iskandari iskandari self-assigned this Jul 10, 2024
@iskandari iskandari modified the milestones: 0.8.0, 1.0.0 Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants