Hi, I think your script looks correct, if the data are the right shape. After opening your dateasets, look at the output of "show data" for a first check of this. You want to get a result in XY, the correlation in time between your single time series, and the time series at each XY location in the gridded dataset. A simple example of this would look like this: yes? use coads_climatologyThe error about improperly specified region is coming from the SHADE command; it's saying that CORREL is not 2-D. ! Check the grid of the 2-D variable, and then the time series. The STAT and LIST commands are also useful to look at the number of values in variables and whether there is data present. -Ansley On 1/14/2016 11:07 PM, 'Iskhaq
Iskandar' via _OAR PMEL Ferret Users wrote:
Dear Ferret users, I am trying to compute a correlation between an observed current at one location (1D data: varies in time only) with SSH of a basin-wide region (2D data in x,y and time). What I did is something like this: ------------------- use daily-ssh.nc use daily-current.nc set mem/size=600 def axis/t=1-jan-2009:19-May-2010:1/unit=days tday let ssh = sla[d=1, gt=tday] let uvel = u[d=2, gt=tday] let p = uvel let q = ssh go variance shade correl ! can data/a can var/a can mem -------------------- But I got an error like: ------- *** NOTE: Ambiguous coordinates on X axis: P*Q-P*Q + 1 *** NOTE: Ambiguous coordinates on X axis: Q*MASK_PQ *** NOTE: Ambiguous coordinates on X axis: COVAR / (P_VAR_MASK*Q_VAR_MASK)^.5 *** NOTE: Ambiguous coordinates on X axis: P_DEV_MASK * Q_DEV_MASK **ERROR: dimensions improperly specified: must be a 2D region -------- If I change between P and Q, I will get an error like: -------- *** NOTE: Ambiguous coordinates on X axis: P*Q-P*Q + 1 *** NOTE: Ambiguous coordinates on X axis: Q*MASK_PQ *** NOTE: Ambiguous coordinates on X axis: COVAR / (P_VAR_MASK*Q_VAR_MASK)^.5 *** NOTE: Ambiguous coordinates on X axis: P_DEV_MASK * Q_DEV_MASK **ERROR: inconsistent sizes of data regions: X axis Q has 3 points (I=0:2) _expression_ has 301 points (I=001:301) --------- Do you have any suggestion? Thank you for help. Best regards, Iskhaq ---------------------------------------------------------------- Dr. Iskhaq Iskandar Jurusan Fisika, Fakultas MIPA Universitas Sriwijaya Kampus Inderalaya, Ogan Ilir (OI) Sumatra Selatan, 30662 INDONESIA Phone: +62 (711) 580743 Fax: +62 (711) 580268 E-mail: iskhaq.iskandar@xxxxxxxxx http://iskhaq.wordpress.com/ ---------------------------------------------------------------- |