Issues with the get_isric_soil_profile() command
Janewanguimugo opened this issue · comments
I am trying to download soil data but it comes without the sorghum soil parameterized. How can I edit this code so that my soil has Sorghum?
sorghum.zip
#Get soil
x <- 29.7
y<- -20.9
crop<- "sorghum.apsimx"
soil <- get_isric_soil_profile(lonlat = c(x,y))
#Replace soil profile
swat <- soilwat_parms()
#We need to add the crop names
soil$crops <- c("Sorghum", "Maize")
edit_apsimx_replace_soil_profile(crop, root = c("pd", "Base_one"),
soil.profile = soil,
overwrite = TRUE)
@Janewanguimugo I will work on this as soon as I can so that you can provide the 'crops' as an argument to the 'get_isric_soil_profile' function. Thanks for the report
@Janewanguimugo I added an argument to get_isric_soil_profile, which allows for the addition of crops. The call would be:
sp1 <- get_isric_soil_profile(lonlat = c(-93, 42), add.args = list(crops = c("Maize", "Sorghum")))
However, I can't test this now because the soilgrids REST API is down