Re: error: constant values

From: Ahmad Farsyud <a.farsyud_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 05 2013 - 14:28:45 MDT

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"*
and the codes to check the constant value I attached here in this email.

I look forward to your help on this issue.

PS: The original data I downloaded from
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.

The way of filter:

  CF = ezfftf (Z)
  printVarSummary(CF)
  cf = CF
  cf(:,:,:,:,1:) = 0.0
  zwn1 = ezfftb (cf, 0.0)

Thank you so much.,
AF

On Tue, Aug 6, 2013 at 4:33 AM, Dennis Shea <shea@ucar.edu> wrote:

> You sent this same email directly to me.
> Please do not do that. *Only* to ncl-talk.
> No personal salutations please.
>
> The ezfftf/b codes are just fine. I added your code to the
> end of the attached script. Run it for illustration.
> You can see that it does not produce the messages you include below.
>
> I am not even sure what "X2" represents.
> There is nothing in the code to indicate
>
> Check your input data
>
>
> in = addfile("hgt.anom.nc","r") ; climatology: 1989-2005
> z = in->Z300 ; (time,lat,lon)
> printVarSummary(z)
> print("z: min="+min(z)+" max="+max(z))
>
> You are doing the FFT on the longitude dimension:
>
> CF = ezfftf (z)
> CF(:,:,:,1:) = 0.0 ; set all wave 2 and higher to 0.0
> ; retain wave number one (index 0)
>
> This is fine as in attached script.
>
> Please use print and/or a subset of your data for
> debug purposes.
>
>
> On 8/4/13 7:48 AM, Ahmad Farsyud wrote:
>
>> Hallo NCL,
>>
>> Anybody can tell me why did I get the constant values using the output
>> from
>> fourier filter:
>>
>> (0) X2 contains all constant values at nx = 14
>> (0) X2 contains all constant values at nx = 29
>> (0) X2 contains all constant values at nx = 44
>> (0) X2 contains all constant values at nx = 59
>> (0) X2 contains all constant values at nx = 74
>> (0) X2 contains all constant values at nx = 89
>> etc
>> --
>> Here is my mini script:
>>
>> load "$NCARG_ROOT/lib/ncarg/**nclscripts/csm/gsn_code.ncl"
>> load "$NCARG_ROOT/lib/ncarg/**nclscripts/csm/gsn_csm.ncl"
>> load "$NCARG_ROOT/lib/ncarg/**nclscripts/csm/contributed.**ncl"
>>
>>
>> in = addfile("hgt.anom.nc","r") ; climatology: 1989-2005
>>
>> z = in->Z300 ; (time,lat,lon)
>>
>> dimz = dimsizes(z)
>> ntim = dimz(0)
>> nlat = dimz(1)
>> mlon = dimz(2)
>> ;******************************************
>>
>> CF = ezfftf (z)
>> printVarSummary(CF)
>>
>> cf = CF
>> cf(:,:,:,1:) = 0.0
>> z_wave1 = ezfftb (cf, 0.0)
>> copy_VarMeta(z, z_wave1)
>>
>>
>> X2 = onedtond( ndtooned(z_wave1), (/ *nxy*, *ntim* /) )
>>
>>
>> if(any(ismissing(X2))) then
>> print("X2 contains one or more missing values, cannot continue!!.")
>> return
>> end if
>>
>> xxx = dimsizes(X2)
>> nx = xxx(0)
>> nt = xxx(1)
>> do i=0,nx-1
>> pmin = min(X2(i,:))
>> pmax = max(X2(i,:))
>> if(pmin.eq.pmax) then
>> print("X2 contains all constant values at nx = " + i)
>> end if
>> end do
>>
>> end
>>
>>
>>
>> ______________________________**_________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/**mailman/listinfo/ncl-talk<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 Mon Aug 5 14:29:04 2013

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