I could use some advice on how to create a Raster file in R with a Matrix of datapoints and the coordinates stored in a seperate file. Both, data and coordinates come from a NetCDF file. I extracted the data and made some calculations that resulted in a matrix looking similar to this one:
NA NA NA 12 NA NA NA NA 23 34 13 45 NA NA 23 12 12 23 34 54 56 NA NA NA NA 23 21 NA
With the diffrence, that there are 79 rows and 78 columns.
The unprojected coordinates represent the centroids of the raster and can be extracted from the NetCDF file. Logically the longitude coordinates have a lengt of 79 and the latitude of 78. i saw a very good answer on a similar problem here on GIS Stack Exchange but I'm not quite sure if I can apply the solution to my problem since my data structure is different and my coordinates are not projected. Maybe one solution would be to project the coordenates and then make a longtable
reshaping the data with the coordinates. But maybe there is also an easier solution...
csv files containing the data and the original netCDF can be found here. Any help would be very appreciated!!!