Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Pearson correlation failed to correlate 2 fields over time #700

Closed
Evadzi opened this issue Jul 11, 2018 · 0 comments
Closed

Pearson correlation failed to correlate 2 fields over time #700

Evadzi opened this issue Jul 11, 2018 · 0 comments

Comments

@Evadzi
Copy link

Evadzi commented Jul 11, 2018

Expected behavior

*I expect the pearson correlation to return a resource/data that stores correlation coefficient for each gridpoint over over all timesteps *

Actual behavior

*The pearson correlation returns a resource/data with 0 correlation coffiecient and p_value of 1for all gridpoints *

I think what the operation is doing is correlating all gridpoints of two fields for each timestep

image

instead of ALL timesteps

image

Steps to reproduce the problem

Step 1

cloud = cate.ops.open_dataset(ds_id="esacci.CLOUD.mon.L3C.CLD_PRODUCTS.multi-sensor.Envisat.MERIS-AATSR.2-0.r1", time_range="2005-01-01,2010-12-31", region="-15,-2,40,30", force_local=True)

Step 2

aerosol = cate.ops.open_dataset(ds_id="esacci.AEROSOL.mon.L3C.AER_PRODUCTS.AATSR.Envisat.SU.4-21.r1", time_range="2005-01-01,2010-12-31", region="-15,-2,40,30", force_local=True)

Step 3

cfc = cate.ops.select_var(ds=cloud, var="cfc")

Step 4

fm_aod550 = cate.ops.select_var(ds=aerosol, var="FM_AOD550_mean")

Step 5

aod550 = cate.ops.select_var(ds=aerosol, var="AOD550_mean")

Step 6

coregist_aod550 = cate.ops.coregister(ds_master=cfc, ds_slave=aod550)

Step 7

res_1 = cate.ops.pearson_correlation(ds_x=cfc, ds_y=coregist_aod550, var_x="cfc", var_y="AOD550_mean")

Specifications

Cate 2.0.0 dev 16.

@forman forman added the ops label Jul 12, 2018
JanisGailis pushed a commit that referenced this issue Jul 13, 2018
pearson_correlation now works as expected with datasets with
differing time dimensions.

Closes #700
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants