This function helps to average the ERA5 data based on the start and end dates, and convert it to the GeoTIFF file.
Arguments
- start.date
character: start point of when to average the data (e.g., 2012-01-01).
- end.date
character: end point of when to average the data (e.g., 2021-12-31).
- in.path
character: the directory where your ERA5 data stored (they should named as ERA5_YEAR.nc).
- outdir
character: the output directory where the averaged GeoTIFF file will be generated.