ncra average every variables in the file in time dimension
ncra superior_0001.nc superior_0001_DailyAvg.nc
# Daily average of all variables
ncra -F-d time,1,12 superior_0001.nc superior_0001_DailyAvg_1-12.nc
# The first 12 hours average of all variables
ncra -v temp -F-d time,1,24 superior_0001.nc superior_0001_DailyAvg_temp.nc
# Daily average of temperature
ncra -v temp -F-d time,1,24 -d siglay,1 superior_0001.nc superior_0001_DailyAvg_lst.nc
# Daily average of lake surface temperature
The second method is to grep the every day lake surface temperature into one file “gls_lst_2019_LowRes.nc”, and then use MATLAB to process it. We can use the following loop: