I have a netcdf file. I have two variables in this file: wspd_wrf_m and wspd_sodar_o. I want to read in the netcdf file and calculate the RMSE value between wspd_wrf_m and wspd_sodar_o.
The variables are with the dimensions (Days, times) which is (1094, 24) I want to calculate the RMSE from the last 365 days of the files. Can you help me with this?
I know I need to use:
from netCDF4 import Dataset
import numpy as np
g = Dataset('station_test_new.nc','r',format='NETCDF3_64BIT')
wspd_wrf = g.variables["wspd_wrf_m"][:,:]
wspd_sodar = g.variables["wspd_sodar_o"][:,:]
But how do I select the last 365 days of hourly data that I need and calculate RMSE from this?