# Re: Correlation Question

From: Will Hobbs <Will.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 30 2013 - 17:37:00 MDT

Nkese

>I would like to make a month to month correlation. I would like to correlate 1 month of sst(lat,lon,time) with 1 month of precipitation which actually is 1 value. Is it possible?

No, you can't correlate a single value (in this case a month). This is nothing to do with NCL's capability, but fundamental to what a correlation is, i.e. a comparison of two variances. A single realisation (in your case a month) does not have a variance.

What you can do (in case I misunderstood your question) is correlate the spatial pattern with that of a a single month; the output would be a time series of correlations. This can be done in NCL using the function 'pattern_cor()'

Will

From: Nkese Mc Shine <Nkese.McShine@sta.uwi.edu<mailto:Nkese.McShine@sta.uwi.edu>>
Date: Wednesday, 1 May 2013 12:11 AM
To: "ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu>" <ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu>>
Subject: Correlation Question

Dear All,

I would like to make a month to month correlation. I would like to correlate 1 month of sst(lat,lon,time) with 1 month of precipitation which actually is 1 value. Is it possible? Attached is my script and below is the output. Please let me know, what I can do if it is possible.

Variable: sst_anom
Type: float
Total Size: 105408000 bytes
26352000 values
Number of Dimensions: 3
Dimensions and sizes: [lat | 100] x [lon | 360] x [time | 732]
Coordinates:
lat: [49.5..-49.5]
lon: [-179.5..179.5]
time: [194601..200612]
Number Of Attributes: 12
anomaly_op_ncl : Annual Cycle Removed:function rmMonAnnCycLLT:contributed.ncl
description : HadISST 1.1 monthly average sea surface temperature
actual_range : ( -1.8, 34.76296 )
missing_value : -1e+30
_FillValue : -1e+30
scale_factor : 1
cell_methods : time: lat: lon: mean
units : degC
standard_name : sea_surface_temperature
long_name : Monthly 1 degree resolution SST
reference : function rmMonAnnCycLLT in contrib.ncl
(0)
(0) Monthly 1 degree resolution SST: min=-8.70077 max=6.98223

Variable: sst_anom_jan
Type: float
Total Size: 144000 bytes
36000 values
Number of Dimensions: 3
Dimensions and sizes: [lat | 100] x [lon | 360] x [time | 1]
Coordinates:
lat: [49.5..-49.5]
lon: [-179.5..179.5]
time: [199301..199301]
Number Of Attributes: 12
reference : function rmMonAnnCycLLT in contrib.ncl
long_name : Monthly 1 degree resolution SST
standard_name : sea_surface_temperature
units : degC
cell_methods : time: lat: lon: mean
scale_factor : 1
_FillValue : -1e+30
missing_value : -1e+30
actual_range : ( -1.8, 34.76296 )
description : HadISST 1.1 monthly average sea surface temperature
anomaly_op_ncl : Annual Cycle Removed:function rmMonAnnCycLLT:contributed.ncl
(0)
(0) Monthly 1 degree resolution SST: min=-2.4631 max=2.59599

Variable: precipanom_data_ts
Type: float
Total Size: 2928 bytes
732 values
Number of Dimensions: 1
Dimensions and sizes: [time | 732]
Coordinates:
time: [194601..200612]
Number Of Attributes: 1
_FillValue : 9.96921e+36
(0)
(0) min=-1.73324 max=3.01711

Variable: precipJJA1993
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [199307..199307]
Number Of Attributes: 2
_FillValue : 9.96921e+36
NMO : 6
(0)
(0) min=0.267831 max=0.267831
warning:escorc: Non-fatal conditions encountered in series or xstd equals zero.
Possibly, all values of a series are constant.

warning:escorc: Most likely, one or more series consisted of all constant values

Variable: corr
Type: float
Total Size: 144000 bytes
36000 values
Number of Dimensions: 2
Dimensions and sizes: [100] x [360]
Coordinates:
Number Of Attributes: 1
_FillValue : -1e+30
(0)
(0) min=-1e+30 max=-1e+30

Regards,
Nkese.

CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and/or privileged information. Any duplication, copying, distribution, dissemination, transmission, disclosure or use in any manner of this email (including any attachments) without the authorisation of the sender is strictly prohibited. If you receive this email (including any attachments) in error, please notify the sender and delete this email (including any attachments) from your system. Thank you.

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 30 17:37:14 2013

This archive was generated by hypermail 2.1.8 : Thu May 02 2013 - 11:16:45 MDT