Re: Correlation Question

From: Nkese Mc Shine <Nkese.McShine_at_nyahnyahspammersnyahnyah>
Date: Thu May 02 2013 - 08:48:23 MDT

Dear All,

I probably was not clear on what I wanted to do. I would like to correlate one(1) month sst(lat,lon,time) with 1 month of precipitation which is actually one(1) value precip(time) and I wanted the correlation to be (lat,lon) so that it can be plotted on a map. So what I understand is this can not be done. Since my precipitation data has only the time dimension then using the pattern_cor() can not be used either because the output is (time) only and my precipitation data would have to also contain lat and lon.

If there any other suggestions to what I may be able to do, please let me know. Thank you for all your help.

Regards,
Nkese.
________________________________________
From: Dennis Shea [shea@ucar.edu]
Sent: 02 May 2013 08:30
To: Nkese Mc Shine
Cc: ncl-talk@ucar.edu
Subject: Re: Correlation Question

Ho Nkese

If you have an array: x(lat,lon,time)

You can use the named dimensions to reorder

    xNew = x(time|:,lat|:,lon|:)
    printVarSummary(xNew)

Then you can compute the pattern correaltion(s)

Good Luck

On 5/2/13 3:22 AM, Nkese Mc Shine wrote:
> Will,
>
> Thank you for the explanation and suggestion however I do not think that will work as pattern_cor the rightmost dimension must be lon, and my monthly data which is 1 value is in time.
>
> Thank you.
> Nkese.
> ________________________________
> From: Will Hobbs [Will.Hobbs@utas.edu.au]
> Sent: 30 April 2013 19:37
> To: Nkese Mc Shine; ncl-talk@ucar.edu
> Subject: Re: Correlation Question
>
> 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
> add_offset : 0
> 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
> add_offset : 0
> 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.
>
>
> 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
>

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 Thu May 2 08:48:45 2013

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