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

ag5_extract not locating some variables #8

Closed
dcol2804 opened this issue Jul 21, 2024 · 4 comments
Closed

ag5_extract not locating some variables #8

dcol2804 opened this issue Jul 21, 2024 · 4 comments

Comments

@dcol2804
Copy link

dcol2804 commented Jul 21, 2024

I have four variables I would like to extract from files in my directory, downloaded using the ag5_download function but I can only extract two of them: Mean 24 hour temperature and Precipitation Flux. The function can't seem to locate the files for vapour pressure or wind speed. Can you help?

Filenames:

Temperature-Air-2m-Mean-24h_C3S-glob-agric_AgERA5_20110101_final-v1.1.nc

Precipitation-Flux_C3S-glob-agric_AgERA5_20110101_final-v1.1.nc

Vapour-Pressure-Mean_C3S-glob-agric_AgERA5_20110101_final-v1.1.nc

Wind-Speed-10m-Mean_C3S-glob-agric_AgERA5_20110101_final-v1.1.nc

When I run the following code, temperature and precipitation are found but vapour pressure and wind speed are not.

ag5_extract(coords = c(-54.45582, -25.64690),
dates = "2011-01-01",
variable = "Temperature-Air-2m",
statistic = "Mean-24h",
celsius = T,
path = "my_directory/")

2011-01-01
1 23.09246

ag5_extract(coords = c(-54.45582, -25.64690),
dates = "2011-01-01",
variable = "Precipitation-Flux",
path = "my_directory/")

2011-01-01
1 11.4

ag5_extract(coords = c(-54.45582, -25.64690),
dates = "2011-01-01",
variable = "vapour_pressure",
statistic = "24_hour_mean",
path = "my_directory/")

Error in get_file_path(date_to_search = dates, variable, statistic, time, :
File not found

ag5_extract(coords = c(-54.45582, -25.64690),
dates = "2011-01-01",
variable = "10m_wind_speed",
statistic = "24_hour_mean",
path = "my_directory/")

Error in get_file_path(date_to_search = dates, variable, statistic, time, :
File not found

@dbrownf
Copy link
Member

dbrownf commented Jul 22, 2024

Could you please try with the development version?

Thanks.

@dcol2804
Copy link
Author

dcol2804 commented Jul 22, 2024 via email

@dbrownf
Copy link
Member

dbrownf commented Jul 23, 2024

I think the problem is with the statistic parameter.

From the package help:

Variables that require statistic
For the following variables, only 24 hour mean statistic is available, but should be explicitly indicated as "Mean".

"Cloud-Cover"

"Snow-Thickness-LWE"

"Dew-Point_Temperature-2m"

"Snow-Thickness"

"Vapour-Pressure"

"Wind-Speed-10m"

Could you please try the following:

ag5_extract(coords = c(-54.45582, -25.64690),
            dates = "2011-01-01",
            variable = "Vapour-Pressure",
            statistic = "Mean",
            path = "weather/")

Thanks.

@dcol2804
Copy link
Author

dcol2804 commented Jul 23, 2024 via email

@dbrownf dbrownf closed this as completed Jul 23, 2024
@dbrownf dbrownf pinned this issue Jul 23, 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

2 participants