`I have a nc file “no2.nc” with data from reanalysis of cams with concentration values (kg kg ^^-1) with a periodicity of 3 hours between data (8 data per day) for the period 2003-2022. The nc file has one variable (no2) with three dimensions (longitude, latitude and time). I would like to:
- Convert these data in ppb, then
- Calculate the mean value for all teh period
- Calculate daily mean values
- Calculate monthly mean values
- Calculate seasonal mean values
- Represent data from steps (2-5) according to the shp file (NUT map of the Iberian Peninsula). That is I would need to cut the data from nc file according to the shape file. I tried to run the following code but it does not work (I am a begginer user in R):
The code and the files used are available in this link: https://drive.google.com/drive/folders/1icRA51ipsWD2wCmVaSnYJ9fnJEEKinfr?usp=sharing
I did not know how to convert the units of NO2 to ppb neither to calculate the daily, monthly and seasonal data before representing them in a map. Then I could not also cut the data according to the borders of the Iberian Peninsula (shape file containing the NUT map).