[Thread Prev][Thread Next][Index]

Re: [ferret_users] how to calculate spatial correlatiobn



Hi Yogesh,

The general ideas are here:
http://ferret.pmel.noaa.gov/Ferret/faq/correlations-and-variances

which shows first a simple correlation between two time series, and then a correlation between two X-Y-T gridded variables.

To compute a correlation between a single-point observed time series and the gridded data, we want to replicate the data at the point location across the XY grid, then compute the correlation.  If your point data variable is called point_var and the variable on the XY grid is xy_var, then you can set it up this way:

  yes? let point_on_xy = point_var[x=@ave,y=@ave] + 0* xy_var

The purpose of taking the average in X and Y is to remove the grid dependence in the XY direction. If the observation is on a 1-point grid in x and y we want to remove that. An averaging operation removes the axis over which you define the average (but in this case will do no computation).   If the time axes of the observation and the gridded variable did not agree, you could define a regridding in time as well.  Adding 0* xy_var makes use of the idea of "conformability" to promote the data from the observation to the grid points in XY.

See what you have:

  yes? shade/L=1 point_on_xy  ! will show a constant value
  yes? shade/y=0 point_on_xy  ! constant in X, shows the T variation of the observation

Now you can continue with the example in the FAQ and call the "variance.jnl" script. Define the variables in whichever order makes sense to you.

  yes? LET p = point_on_xy
  yes? LET q = xy_var
  yes? GO variance


For your second question, you would use the ideas from the second example in the FAQ, but you will need to regrid the data of one model onto the grid of the  other.

Ansley

On 3/16/2016 2:18 AM, 'Yogesh Tiwari' via _OAR PMEL Ferret Users wrote:
Dear Ferret Users,

I am using FERRET v6.95 on Linux.

1) How to calculate spatial correlation between point observation at one location and model simulated data over some particular region. For example, observation is at only one location 18N, 72 E and model is at 0.5x0.5 grid. So how to calculate correlation between every grid of model (over the region 50:100E, 10S:40N) and this point observation at 18N, 72 E. And then save output fine in cdf format. We have extracted model data as same day as observation.

2) Its similar to above but, how to calculate spatial correlation between  two model simulated data (i.e. grid to grid correlation over the region50:100E, 10S:40N). One model has 0.25x0.25 and other is has 0.5x0.5 horizontal resolution. 

Great Thanks,

Best regards,
Yogesh



--
Yogesh K. Tiwari (Dr.rer.nat),
Scientist,
Centre for Climate Change Research,
Indian Institute of Tropical Meteorology,
Homi Bhabha Road,
Pashan,
Pune, India


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement