[gradsusr] Help in showing the example of using maxloc()

See Hai Ooi axl419 at yahoo.com
Mon Mar 22 18:32:50 EDT 2010


Dear Mr Charles Seman,
 
        Yes, I had already registered myself in the Forum.  I did make an attempt similar to what you suggested and the results are as follows:-
 
ga-> sdfopen d:\cdc\uvw\uwnd.2009.nc
Scanning self-describing file:  d:\cdc\uvw\uwnd.2009.nc
SDF file d:\cdc\uvw\uwnd.2009.nc is open as file 1
LON set to 0 360
LAT set to -90 90
LEV set to 1000 1000
Time values set: 2009:1:1:0 2009:1:1:0
E set to 1 1
ga-> sdfopen d:\cdc\uvw\vwnd.2009.nc
Scanning self-describing file:  d:\cdc\uvw\vwnd.2009.nc
SDF file d:\cdc\uvw\vwnd.2009.nc is open as file 2
ga-> set lev 1000 100
LEV set to 1000 100
ga-> wind=mag(uwnd,vwnd.2)
Define memory allocation size = 1016160 bytes
ga-> set lat 20 40
LAT set to 20 40
ga-> set lon 80 140
LON set to 80 140
ga-> d fndlvl(lev,max(wind,lev=1000,lev=100),lev=1000,lev=100)
Operation error:  Invalid dimension environment
Looping dimension does not vary
ga-> set lev 1000
LEV set to 1000 1000
ga-> d
 fndlvl(lev,max(wind,lev=1000,lev=100),lev=1000,lev=100)
MAXing.  dim = 2, start = 1, end = 12
Cannot contour grid - all undefined values

        Anyway, I will try to use other methods to resolve my problem.  Will keep you informed.
 
       Thank you and best regards.
 
Ooi
 
 
 


--- On Mon, 22/3/10, Charles Seman <Charles.Seman at noaa.gov> wrote:


From: Charles Seman <Charles.Seman at noaa.gov>
Subject: Re: [gradsusr] Help in showing the example of using maxloc()
To: "See Hai Ooi" <axl419 at yahoo.com>
Date: Monday, 22 March, 2010, 11:28 PM


Ooi,

I don't know since I don't have the screendump of your entire GrADS session... one idea: check to make sure that "set lev 1000 100" is issued before defining "wind", and then you can fix the vertical level to 1000 before doing the "fndlvl" commands...

Hope this helps,
Chuck

See Hai Ooi wrote: 

Dear Mr Charles Seman,
 
        Thank you for explaining the use of fndlvl().  As I did not get the picture completely, I failed to use this function to obtain the maximum magnitude of the subtropical jet stream and its corresponding pressure level  (e.g. 200 knots at 200 hPa over the defined area).   

        The followings are what I did :-
 
        sdfopen d:\cdc\uvw\uwnd.2009.nc
        sdfopen d:\cdc\uvw\vwnd.2009.nc
 
        set t 1
        set lat 20 40
        set lon 80 140
        define wind=mag(uwnd,vwnd.2)
 
        ga-> d fndlvl(wind,max(wind,lev=1000,lev=100),lev=1000,lev=100)
        MAXing.  dim = 2, start = 1, end = 12
        Constant field.  Value = 1000
        ga-> d fndlvl(lev,max(wind,lev=1000,lev=100),lev=1000,lev=100)
        MAXing.  dim = 2, start = 1, end = 12
       Cannot contour grid - all undefined values
 
       Where did I go wrong ?  I did not fix the level to a single value else it would show "Cannot contour grid - all undefined values".  Hope you can enlighten me.
 
      Regards.
 
Ooi


      New Email names for you! 
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. 
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/




More information about the gradsusr mailing list