Sinclair,
I think this is the slight adjustment you require
http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml
> f = addfile("olr.1979_2010.nc","r")
> var = f->olr
> U= dim_avg(var(lat |: , lon| : ,time| :)) ; could use U=dim_avg_n_Wrap(var, 0) instead
uConform = conform(var, U, (/1,2/) ) ; will expand U to the dimensions of var, matching dimensions (1/,2/) of var
anom = var - uConform
> printVarSummary(anom)
Alan
##############################
Alan Brammer
PhD Student,
Department of Atmospheric and Environmental Sciences,
University at Albany,
State University of New York
Albany, NY, 12222
abrammer@albany.edu
##############################
On May 17, 2012, at 5:27 AM, sainclair ZEBAZE wrote:
> Dear all,
> I tried to calculate olr anomaly. I used the synthax
>
> f = addfile("olr.1979_2010.nc","r")
> var = f->olr
> U= dim_avg(var(lat |: , lon| : ,time| :))
> anom = U – var
> printVarSummary(anom)
>
> I just remarked that U and var didn't have the same dimension.
> can some one help me?
> kinds regards
> --
> Sinclair ZEBAZE
> Laboratory for Environmental modelling & Atmospheric Physics
> Department of Physics, Faculty of science - University of YAOUNDE I
> P.O.BOX 812 YAOUNDE - CAMEROON
> Phone: (237) 77834713
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 17 07:15:35 2012
This archive was generated by hypermail 2.1.8 : Thu May 17 2012 - 13:42:02 MDT