handle_chile_agromet(action, location = NA, time_interval = NA, station_list = NULL, stations_to_choose_from = 25, drop_most = TRUE, end_at_present = TRUE)
the Chile Agromet dataset is described here: http://agromet.inia.cl/index.php
under the 'list_stations' mode, several formats are possible for specifying the location vector, which can consist of either two or three coordinates (it can include elevation). Possible formats include c(1,2,3), c(1,2), c(x=1,y=2,z=3), c(lat=2,long=1,elev=3). If elements of the vector are not names, they are interpreted as c(Longitude, Latitude, Elevation).
The 'chillRCode' is generated by this function, when it is run with geographic coordinates as location inputs. In the list of nearby stations that is returned then, the chillRCode is provided and can then be used as input for running the function in 'downloading' mode. For downloading the data, use the same call as before but replace the location argument with the chillRCode.
Luedeling E, Kunz A and Blanke M, 2013. Identification of chilling and heat requirements of cherry trees - a statistical approach. International Journal of Biometeorology 57,679-689.
#work in progress, but should work for processing daily weather files dowloaded from
#http://agromet.inia.cl/index.php
#weather<-handle_chile_agromet(filename)
Run the code above in your browser using DataLab