[ncl-talk] Fw: area average

alesall alesall at iri.columbia.edu
Sun Aug 12 16:13:10 MDT 2018


Hi Ehsan, 

can you reorganize your data so that it is 2-dimensional, in latitude and longitude?
If your “var” measures something which varies in latitude and longitude, you need to figure out how the data in it is ordered/organized. 
Is the fastest dimension longitude or latitude?
You can use functions like “onedtond” to break down a vector of length nlon x nlat into a matrix of dimensions nlon, nlat.
And then assign names/values of latitude and longitude to the dimensions accordingly.

warm regards




-- 
Alessandra Giannini
IRI for Climate and Society - The Earth Institute at Columbia University
P.O. Box 1000, Palisades NY 10964-8000
phone/fax: +1 845 680-4473/4864 - email: alesall at iri.columbia.edu <mailto:alesall at iri.columbia.edu>

> On Aug 12, 2018, at 3:16 PM, Ehsan Taghizadeh <ehsantaghizadeh at yahoo.com> wrote:
> 
> Hi,
> I'm sorry to forward my question again! Do you think it is possible doing this or I should leave it?
> I'll be thankful for any suggestion.
> 
> Sincerely
> Ehsan
> 
> 
> ----- Forwarded Message -----
> From: Ehsan Taghizadeh <ehsantaghizadeh at yahoo.com>
> To: Ncl-talk <ncl-talk at ucar.edu>
> Sent: Thursday, August 2, 2018, 8:00:22 PM GMT+4:30
> Subject: area average
> 
> Hi,
> I've tried to compute area average using "wgt_areaave". However it seems my data are 1 dimensional. So the following error occurred, as it is expected:
>       fatal:wgt_areaave: the input array must have at least 2 dimensions
> 
> Could I ask any help to have are average from 1 dimension data?!
> 
> I attached my script and put input files (SPL2SMP_E.tar) in ftp. Other information are:
> $ ncl -V
>      6.5.0
> $ uname -a
>      Linux localhost.localdomain 3.10.0-514.2.2.el7.x86_64 #1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64         x86_64 x86_64 GNU/Linux
> $ gcc --version
>      gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
>      Copyright (C) 2015 Free Software Foundation, Inc.
> 
> I'll be thankful for any help.
> 
> Sincerely
> Ehsan
> <SPL2SMP_E_areaave.ncl>_______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180812/f58e89ab/attachment.html>


More information about the ncl-talk mailing list