Closed pathakprecisionag closed 1 month ago
@pathakprecisionag If I were to create a 'met' object for APSIM I would try to get at least 30 years of data. You seem to want to start your simulations for the current year. Depending on your objectives, you want to start the model a bit before the period of interest. The error message seems to indicate that the server was not available. This happens every once in a while. Can you try again? This works for me. I picked July 1st, but data are often available almost immediately, so you could try with something closer to the current date.
iem.wl <- get_iem_apsim_met(lonlat = c(-86.9, 40.3),
dates = c("1990-01-01", "2024-07-01"))
Something I notice now is that you enter the dates as 'Date' objects, but the function expects just a 'character' in the format "%Y-%m-%d". I can add a check for the format in the function.
Thanks much for your help. I think there was some issue on the end of API and now works well!
I am writing an rscript to simulate the corn growth using APSIM and using the following code to extract the weather:
current_date <-
Sys.Date()`current_year <- format(current_date,"%Y")
and getting the following error: Warning in open.connection(con, "rb") : cannot open URL 'http://mesonet.agron.iastate.edu/geojson/network.php?network=INCLIMATE': HTTP status was '503 Service Unavailable' Warning: Error in open.connection: cannot open the connection to 'http://mesonet.agron.iastate.edu/geojson/network.php?network=INCLIMATE'
Just to clarify, I am simulating this experiment for Indiana using mesonet rather than power.
Any guidance/help will be highly appreciated