I have a NetCDF file of daily data. I converted it to a raster stack, but its orientation is not correct (I have attached the image with this). How do i correct it. I am also attching my code with this text. [Image of raster_stack and the r code](https://i.sstatic.net/UmI4kSNE.png)
Also, tell if anyone idea, how do i extract annual data from these raster files into excel format (in arcGIS or in r). I have raster file from year 1955 to 2023 that has daily rainfall data, i want to exctract annual rainfall data according to the administrative shapefile I have.
I ran the code in r but didn’t make any progress.