[ncl-talk] Fw: Fwd: time dimension mismatch in NCL
Dennis Shea
shea at ucar.edu
Tue Nov 16 10:04:01 MST 2021
You have two different source files [*f, g*]:
======================
52 *f * = addfile("Hadsstyrmon_ano.nc", "r")
53 *g* = addfile("sstson-ano.nc", "r")
=====================
Based upon the error message, my speculation is that the time dimensions
are different for each file.
54 t = g->time
55 YYYY = cd_calendar(t,-1)/100 ; entire file
56 jYYYY = ind(YYYY.ge.yrStrt .and. YYYY.le.yrLast)
57 sst1 = g->sst(jYYYY,:,:)
58 printVarSummary(sst1)
59
delete(YYYY) ; <====
60
61
62 TIME = f->time
63 YYYY = cd_calendar(TIME,-1)/100 ; entire file
64 iYYYY = ind(YYYY.ge.yrStrt .and. YYYY.le.yrLast)
======================
On Mon, Nov 15, 2021 at 6:05 PM jayanti pal via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:
> Sir,
>
> I am trying to calculate EOF from one file and then quantify correlation
> between PCs with variables from other files.
> While defining time dimension i get following error
>
> (ncl_stable) oem at oem-Inspiron-15-5501:~/IOD/sst/new$ ncl eof_correl.ncl
> Copyright (C) 1995-2019 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.6.2
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
>
> Variable: sst1
> Type: float
> Total Size: 38880000 bytes
> 9720000 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 150] x [latitude | 180] x [longitude | 360]
> Coordinates:
> time: [288.5..54709.5]
> latitude: [89.5..-89.5]
> longitude: [-179.5..179.5]
> Number Of Attributes: 6
> standard_name : sea_surface_temperature
> long_name : sst
> units : C
> _FillValue : -1e+30
> missing_value : -1e+30
> cell_methods : time: lat: lon: mean
>
> *fatal:Dimension sizes of left hand side and right hand side of assignment
> do not matchfatal:["Execute.c":8637]:Execute: Error occurred at or near
> line 63 in file eof_correl.ncl*
>
> code is attached below.
>
> Sent from Yahoo Mail on Android
> <https://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__AndroidUsers&af_wl=ym&af_sub1=Internal&af_sub2=Global_YGrowth&af_sub3=EmailSignature>
>
> ----- Forwarded message -----
> *From:* "Jayanti Pal" <jayanti.pal at curaj.ac.in>
> *To:* "jiban_samudra18 at yahoo.com" <jiban_samudra18 at yahoo.com>
> *Cc:*
> *Sent:* Tue, 16 Nov 2021 at 6:31 AM
> *Subject:* Fwd: time dimension mismatch in NCL
>
> ---------- Forwarded message ---------
> From: *Jayanti Pal* <jayanti.pal at curaj.ac.in>
> Date: Mon, 15 Nov, 2021, 10:24 PM
> Subject: time dimension mismatch in NCL
> To: <ncl-talk-request at mailman.ucar.edu>, <ncl-talk at mailman.ucar.edu>
>
>
> Sir,
>
> I am trying to calculate EOF from one file and then quantify correlation
> between PCs with variables from other files.
> While defining time dimension i get following error
>
> (ncl_stable) oem at oem-Inspiron-15-5501:~/IOD/sst/new$ ncl eof_correl.ncl
> Copyright (C) 1995-2019 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.6.2
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
>
> Variable: sst1
> Type: float
> Total Size: 38880000 bytes
> 9720000 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 150] x [latitude | 180] x [longitude | 360]
> Coordinates:
> time: [288.5..54709.5]
> latitude: [89.5..-89.5]
> longitude: [-179.5..179.5]
> Number Of Attributes: 6
> standard_name : sea_surface_temperature
> long_name : sst
> units : C
> _FillValue : -1e+30
> missing_value : -1e+30
> cell_methods : time: lat: lon: mean
>
> *fatal:Dimension sizes of left hand side and right hand side of assignment
> do not matchfatal:["Execute.c":8637]:Execute: Error occurred at or near
> line 63 in file eof_correl.ncl*
>
> code is attached below.
> --
> Regards
> Jayanti
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211116/ebc1acde/attachment.html>
More information about the ncl-talk
mailing list