Closed dcol2804 closed 3 months ago
Could you please try with the development version?
Thanks.
I tried again with the development version and got the following results:
ag5_extract(coords = c(-54.45582, -25.64690), dates = "2011-01-01", variable = "vapour_pressure", statistic = "24_hour_mean", path = "weather/")
Error in ag5_extract.numeric(coords = c(-54.45582, -25.6469), dates = "2011-01-01", : not valid variable, please check
I guessed that you were now standardising the variable values and tried "Vapour-Pressure". But it still couldn't find the file.
ag5_extract(coords = c(-54.45582, -25.64690), dates = "2011-01-01", variable = "Vapour-Pressure", statistic = "24_hour_mean", path = "weather/")
Error in get_file_path(date_to_search = dates, variable, statistic, time, : File not found
On Mon, 22 Jul 2024 at 23:38, David Brown @.***> wrote:
Could you please try with the development version?
Thanks.
— Reply to this email directly, view it on GitHub https://github.com/AgrDataSci/ag5Tools/issues/8#issuecomment-2242986385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMADDKFOTXJQOPQL5NST6PTZNUDNNAVCNFSM6AAAAABLHHJD72VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBSHE4DMMZYGU . You are receiving this because you authored the thread.Message ID: @.***>
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.
Fantastic! It now works. Thanks for your help
ag5_extract(coords = c(-54.45582, -25.64690), dates = "2011-01-01", variable = "Wind-Speed-10m", statistic = "Mean", path = "weather/")
2011-01-01 1 1.725427
ag5_extract(coords = c(-54.45582, -25.64690), dates = "2011-01-01", variable = "Vapour-Pressure", statistic = "Mean", path = "weather/")
2011-01-01 1 25.80108
On Tue, 23 Jul 2024 at 10:10, David Brown @.***> wrote:
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.
— Reply to this email directly, view it on GitHub https://github.com/AgrDataSci/ag5Tools/issues/8#issuecomment-2244019148, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMADDKFNK2MRQYDF2SWFJKTZNWNQ3AVCNFSM6AAAAABLHHJD72VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBUGAYTSMJUHA . You are receiving this because you authored the thread.Message ID: @.***>
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/")
ag5_extract(coords = c(-54.45582, -25.64690), dates = "2011-01-01", variable = "Precipitation-Flux", path = "my_directory/")
ag5_extract(coords = c(-54.45582, -25.64690), dates = "2011-01-01", variable = "vapour_pressure", statistic = "24_hour_mean", path = "my_directory/")
ag5_extract(coords = c(-54.45582, -25.64690), dates = "2011-01-01", variable = "10m_wind_speed", statistic = "24_hour_mean", path = "my_directory/")