For eg. I have a netcdf file which is in the form of a time-series and the other data is a gridded .nc file for geopotential height. I want to correlate both of these datasets.
Have you tried using the UK Met office Iris package on python, this may help solve your problem, the very basic concept it uses is loading each NetCDF files and cubes and correlating the two cubes using the code :