Re: Error in STSA Analysis

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sun Jan 01 2012 - 10:18:38 MST

[1] Extract the procedure "wkSpaceTime" from diagnostics_cam.ncl
eg:

%> vi $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl

extract "wkSpaceTime" and save and rename the procedure as (say)
"wkSpaceTimeSondra".

[2] Edit "wkSpaceTimeSondra".
      There are multiple places where you need to change as needed

;---------------------------------------------------------------
; dispersion: curves
;---------------------------------------------------------------

    rlat = 0.0
    Ahe = (/50.,25.,12./) ; <===================
    nWaveType = 6
    nPlanetaryWave = 50
    nEquivDepth = dimsizes(Ahe)
    Apzwn =
new((/nWaveType,nEquivDepth,nPlanetaryWave/),"double",fillVal)
    Afreq = Apzwn
    genDispersionCurves(nWaveType, nEquivDepth, nPlanetaryWave, rlat,
Ahe, Afreq, Apzwn )

[SNIP]

; draw dispersion line

    gsn_polyline(wks,plot,Apzwn(0,0,:),Afreq(0,0,:),dcres)
    gsn_polyline(wks,plot,Apzwn(0,1,:),Afreq(0,1,:),dcres)
    gsn_polyline(wks,plot,Apzwn(0,2,:),Afreq(0,2,:),dcres)
    gsn_polyline(wks,plot,Apzwn(1,0,:),Afreq(1,0,:),dcres)
    gsn_polyline(wks,plot,Apzwn(1,1,:),Afreq(1,1,:),dcres)
    gsn_polyline(wks,plot,Apzwn(1,2,:),Afreq(1,2,:),dcres)
    gsn_polyline(wks,plot,Apzwn(2,0,:),Afreq(2,0,:),dcres)
    gsn_polyline(wks,plot,Apzwn(2,1,:),Afreq(2,1,:),dcres)
    gsn_polyline(wks,plot,Apzwn(2,2,:),Afreq(2,2,:),dcres)

; dispersion labels

    gsn_text(wks,plot,"MRG",-10.0,.15,txres)
    gsn_text(wks,plot,"n=2 IG",-3.0,.58,txres)
    gsn_text(wks,plot,"n=0 EIG",9.5,.50,txres)
    gsn_text(wks,plot,"h=50",-10.0,.78,txres) ; <======= etc
    gsn_text(wks,plot,"h=25",-10.0,.63,txres)
    gsn_text(wks,plot,"h=12",-10.0,.51,txres)

=====
The "genDispersionCurves" code begins with

;---------------------------------------------------------------
; dispersion curves
;--------------------------------------------------------------
undef("genDispersionCurves")
procedure genDispersionCurves( nWaveType[1]:integer \
                              , nEquivDepth[1]:integer \
                              , nPlanetaryWave[1]:integer \
                              , rlat[1]:numeric \
                              , Ahe[*]:numeric \
                              , Afreq[*][*][*]:numeric \
                              , Apzwn[*][*][*]:numeric )

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
load "./wkSpaceTimeSondra.ncl" ; <== load after "diagnostics_cam.ncl"
******************

Likely, you will have to make several iterations
before you get it as you want.

Good luck.

On 1/1/12 6:18 AM, Sandro Wellyanto Lubis wrote:
> Dear Dennis,
>
> Thanks, it works well now.
> Ok, last question, I wonder, is it possible to change the line of
> equivalen dept (H) in the graph to be 20, 70, 150 and 300 m for Kelvin
> waves (in the dispersion curves)?
>
>
> Thanks a lot,
> Sandro
>
>
> Quoting Dennis Shea <shea@ucar.edu>:
>
>> There is no error in the STSA Analysis.
>>
>> ---
>>
>> You got an error message that specifies the error:
>>
>> (0) nExtra=1 input array must have complete days only
>>
>> The function requires 'complete days only'. It tells you that there is
>> one extra time step (nExtra=1).
>>
>> Your data spans
>> 1993010100 1993010106 1993010112 1993010118
>> 1993010200 1993010206 1993010212 1993010218
>> [snip]
>> 1993062800 1993062806 1993062812 1993062818
>> 1993062900 1993062906 1993062912 1993062918
>> 1993063000 <=== not a full day
>>
>> There are 721 time steps. Only read 720 time steps.
>> ====> Use
>> A = f->A(0:719,0,{latS:latN},:)
>>
>> Also, I do not understand your setting
>>
>> nDayWin = 10 ; Wheeler-Kiladis [WK] temporal window length (days)
>> nDaySkip = 30 ; time (days) between temporal windows [segments]
>>
>> Better, say
>>
>> nDayWin = 96
>> nDaySkip = 10
>>
>> You can experiment.
>>
>> Happy New Year
>>
>>
>>
>>
>> On 12/31/11 2:33 PM, Sandro Wellyanto Lubis wrote:
>>> Dear NCL,
>>> I have tried to analyze the EP-waves by Wheeler Kiladis method as
>>> provided in NCL.
>>> In my analysis, i am using 6 hourly data, from January- June 1992. The
>>> running was working well, but the results were nothing.
>>> I have sent the script and the data to the ftp ftp.cgd.ucar.edu, :
>>> 1. wkSpaceTime_3.ncl (modified)
>>> 2. u5039n.cdf (NCEP/NCAR 2- modified)
>>>
>>> Thank you very much for your hint.
>>> Best,
>>> Sandro
>>>
>>> Email: s.lubis@studserv.uni-leipzig.de
>>> Phone Number: +4915225429233
>>>
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>>
>>>
>>
>>
>
>
>
> Mit freundlichen Grüßen
> ******************************************
> Lubis, Sandro Wellyanto
> Postgraduate Student in Physics (Meteorology)
> University of Leipzig
> Leipziger Institut für Meteorologie
> Fakultät für Physik und Geowissenschaften
> Leipzig -- Germany
>
> Email: s.lubis@studserv.uni-leipzig.de
> Phone Number: +4915225429233
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jan 1 10:18:50 2012

This archive was generated by hypermail 2.1.8 : Wed Jan 04 2012 - 10:18:09 MST