# Re: error: constant values

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 05 2013 - 15:22:55 MDT

You have:

In the following "x" is 3D.

x = f->zwn1(:,{plevx},{latS:latN},:)
printVarSummary(x) ; (time,lat,lon)

The dimension ordering in NCL is left to right (0,1,2)

You have the followinh which is incorrect.
I am not sure how you decided this ordering. There are *numerous*
NCL examples that use dimsizes(x)

dsizes_x = dimsizes(x)
nlat = dsizes_x(0) ; no
mlon = dsizes_x(1) ; no
ntim = dsizes_x(2) ; no

It should be

ntim = dsizes_x(0) ; time
nlat = dsizes_x(1) ; lat
mlon = dsizes_x(2) ; lon

Also, if you add the following to the end of your script

print("====================")

do nl=0,nlat-1
do ml=0,mlon-1
pmin = min(x(:,nl,ml))
pmax = max(x(:,nl,ml))
if(pmin.eq.pmax) then
print("x: all constant: nl="+nl+" ml="+ml \
+" "+x&lat(nl)+" "+x&lon(ml)+" val="+pmin)
end if
end do
end do

You will see the the North Pole does have all constant values.

On 08/05/2013 02:28 PM, Ahmad Farsyud wrote:
> Hallo NCL and Dennis,
>
> Thank you, but It seems still not solve my problem. I got the same
> errors (constant values).
> My input data is HGT anomalies with filtered harmonic 1 (fourier product).
> To check this closer, I have already put a mini data in ftp with name:
> "*z.anom.nc <http://z.anom.nc>"*
> and the codes to check the constant value I attached here in this email.
>
> I look forward to your help on this issue.
>
> http://www.esrl.noaa.gov/psd/cgi-bin/db_search/DBListFiles.pl?did=32&tid=38431&vid=663
>
> and apply a spatial fiter for harmonic 1. Then check them (thus i got
> the constant values).
>
> I check the input data, just fine: Anomalies: Geopotential: min=-194.148
> max=194.148
> but why i still have the constant values.

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Aug 5 15:23:05 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 07 2013 - 13:59:00 MDT