[ncl-talk] NCL fourier Script

Dennis Shea shea at ucar.edu
Fri Nov 4 09:56:11 MDT 2016


[1]
As noted in the four_info documentation, the dimension being used "must be
periodic". 'time' is not periodic.
This function would work on a *global* (time,lat,lon) array because the
longitudes are periodic.
So, specifically, what you are doing is *not* correct.

[2]
The spatial domain is small: 3.4S-1.4N  and 30.6E-35.4E
You have only 8 time steps of 3-hrly data. Hence, one day of data.

I suggest simple averaging of all grid points at each time step.

   cm = f->cmorph_precip
   printVarSummary(cm)                              ; (time,lat,lon) ...
(8,20,20); dim numbers (0,1,2)

   cmAvg = dim_avg_n_Wrap(cm,(/1,2/))     ; cmAvg(time), cmAvg(8)
   print(cmAvg)

There are only 8 values .... do you see any discernible patterm. EG:
diurnal cycle ?
plot the eight value


[3]
ncl-talk would like to help BUT ...
ncl-talk can not take the place of student-advisor interaction.
I think this is the correct approach for you.

Good Luck

On Fri, Nov 4, 2016 at 12:34 AM, Omondi Augustine <dimosh05 at gmail.com>
wrote:

> Dear NCL users,
>
> I am new to NCL and currently running fourier analysis of daily(3hrly)
> rainfall estimate on NCL version 6.2.1 on a cygwin. I have modified the NCL
> script given in example section as fanal_2 to read;
>
> 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"
>    f  = addfile("/climatology.nc","r")
>    t  = f->cmorph_precip
>
>     N = dimsizes(t)
>    nlat = N(0)
>    mlon = N(1)
>    time = N(2)
>     nhar     = 2
>   finfo_t = fourier_info (t(lat|:,lon|:,time|:), nhar, 1.)
>    copy_VarCoords(t(0,:,:), finfo_t(0,:,:,0))
>    finfo_t at long_name = "CMORPH precipitation estimate"
>    finfo_t at units     = "mm/hr"
>    printVarSummary(finfo_t)
>
>    finfo_t at _FillValue = t at _FillValue
>    finfo_t(0,:,:,:) = where(finfo_t(0,:,:,:).eq.0, t at _FillValue,
> finfo_t(0,:,:,:))
>    print(finfo_t)
>
> The question is that i am not sure whether i am doing the right thing and
> therefore kindly asking for experts opinion on the result(amplitude, phase
> and percentage variance) it is giving. Attached is my data(long term mean
> of 3hrly rainfall estimate on a 20lat by 20lon grid).
>
> Thanks in advance for your advice
>
> Omondi Augustine
>
> Graduate student
> College of Atmospheric Science, Nanjing University of Information Science
> and Technology, Nanjing 210044, Jiangsu, China
> Email: dimosh05 at gmail.com / omondi at kms.or.ke
> phone: +86 132 60771131
> Skype: omondi_augustine
>
> _______________________________________________
> 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/20161104/46e5ed93/attachment.html 


More information about the ncl-talk mailing list