Welcome to the exercises of module 4! Please try to solve the following exercises, and if you do not remember how to write the code for certain things, have a look again at the previous scripts. Programming is about learning by doing! So, do not hesitate to look for help in the internet, too. Remember that there is almost always more than just one way to solve a problem in R!
Calculate hourly temperatures for the agrometeorological station assigned to your group. Plot the first 10 days of hourly temperature data in a plot and save it as PNG.
Calculate accumulated Utah chill units for the entire record of your station, taking into account that a new crop cycle starts each year on August 1st. Plot the trajectories of accumulated chill units for all crop cycles as lines, and save the plot as PNG.
For each year and the respective DOY when bud bursting was observed for the crop assigned to your group, determine the amount of accumulated chill units at your station. Plot these values in a boxplot and save it as PNG. From this data, determine the minimum, 1st quartile, 3rd quartile and maximum amount of chill units during bud bursting of your crop and save these four values as CSV.
Calculate the amount of accumulated chill units at bud bursting for the crop assigned to you, for all stations. From this data, determine the minimum, 1st quartile, 3rd quartile and maximum amount of chill units during bud bursting of your crop and save these four values as CSV.
Download ERA5-Land data from https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-land?tab=form. Check “2m temperature”, the two years assigned to your group, all months, all days and all day times. Under “Geographical area”, choose a suitable sub-region defined by coordinates that entail all of Armenia. Download the file as NetCDF (it might take a while until your order is processed!) and import it to R Studio as a Raster Stack. Display the first layer in a map, add the shapefile of Armenia and save your map as PNG.
Calculate accumulated Utah chill units for the crop cycle contained in your two years of ERA5-Land data. Choose any cell and plot the trajectory of accumulated chill units in this cell as a line, and save the plot as PNG.
Convert the accumulated chill units at the end of the crop cycle to a raster. Reclassify this raster according to the values determined in exercise 4 (alternatively, take the values from exercise 3), and plot the reclassified raster with ggplot(). Save your map as PNG.