[Thread Prev][Thread Next][Index]

Re: [ferret_users] @Sum Transformation: Feature (Or bug)?



Hi Roman and all,
The variable slat_sum = slat[j=@sum] is still defined as having original grid of the underlying variable slat. I'm going to change to a dataset we can all use to give an example

yes? use levitus_climatology
yes? let tsum = temp[x=@sum]

yes? sh grid temp
   GRID GMS1
name       axis              # pts   start                end
XAXLEVITR LONGITUDE          360mr   20.5E                19.5E(379.5)
YAXLEVITR LATITUDE           180 r   89.5S                89.5N
ZAXLEVITR DEPTH (m)           20 i-  0                    5000
normal    T

yes? show grid tsum
   GRID GMS1
name       axis              # pts   start                end
XAXLEVITR LONGITUDE          360mr   20.5E                19.5E(379.5)
YAXLEVITR LATITUDE           180 r   89.5S                89.5N
ZAXLEVITR DEPTH (m)           20 i-  0                    5000
normal    T

yes? say `temp,return=shape`
!-> MESSAGE/CONTINUE XYZ
XYZ

yes? say `tsum,return=shape`
!-> MESSAGE/CONTINUE XYZ
XYZ

The transformed variable you've defined does get To get information about a variable you've defined


The `RETURN=` keywords don't evaluate anything; they just go and look at the grid of the variable. So this is a bit of a "feature" I guess. As Peter showed, running an "action" command like any plotting command, or LOAD or STAT, does apply the transformation, reducing the x dimension in the result of the command. If the data isn't too large, STAT can be quite useful for seeing the shape of a variable you've defined.


For a bit more discussion of transformations, take a look at the "Expressions" chapter in the Ferret Users Guide, http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/XPRESSIONS. Find Chapter 3, section 2.4 to read about transformations, and in particular, look up "transformations, general information" in the index

Ansley

Roman Tonkonojenkov wrote:
Hi ferreters,
FYI:



---------------- Forwarded Message ----------------
From: "Peter Szabo" <szabpet83@xxxxxxxxx>
Date: Wed, Sep 24, 2008 02:46 AM
Subject: Re: [ferret_users] @Sum Transformation: Feature (Or bug)?
To: "Roman Tonkonojenkov" <romantonk@xxxxxxx>

Hey,
i tested your file and turned out that there is no problem with your data or ferret either. I experienced the same if you enter after "let slat_sum = slat[i=@sum]" or "let slat_sum = slat[j=@sum]" the command "fill slat_sum", ferret says
**ERROR: dimensions improperly specified: must be a 2D region
          CONTOUR/FILL slat_sum
SO it changed the dimensions. And works also the "plot" command and the "list slat_sum[j=80]" fine. But that must be a bug that ferret doesnt warn you when you "list slat_sum[i=30,j=80]" or enter "show grid slat_sum" and get the same dimensions as the original variable.

Cheers, Peter


On Mon, Sep 8, 2008 at 11:07 PM, Roman Tonkonojenkov <romantonk@xxxxxxx <https://webmail.psu.edu/webmail/blankIe.html#>> wrote:

     Dear Ferret Users,
    I have discovered that applying the @sum transformation to a
    variable doesn't change the dimension of the variable in some
    instances. Do you think this is a feature or a bug? Here is an
    example. I am using a file test.nc <http://test.nc/> (attached)
    and here is what I get:
    ============================================================================

    use test.nc <http://test.nc/>
     *** NOTE: Ignored modulo length exceeding axis length: XT
    yes? sh da
         currently SET data sets:
        1> ./test.nc <http://test.nc/>  (default)
name title &nb! sp; I J K L SLAT sea level atmospheric temperatu 1:100 1:100 ... 1:1 yes? let slat_sum = slat[i=@sum]
    yes? say `slat_sum, return = shape`
    XY
    yes? list slat[i=30,j=80]
        &nbsp! ;        VARIABLE : sea level atmospheric temperature (K)
                 FILENAME : test.nc <http://test.nc/>
                 LONGITUDE: 106.2E(106.2)
         !         LATITUDE : 53.1N & nbsp;           TIME     :
    31-DEC-2609 22:12
              275.8
    yes? list slat_sum[i=30,j=80]
                 VARIABLE : SLAT[I=@SUM]
                 FILENAME : test.nc <http://test.nc/>
                 LONGITUDE: 104.4E to 108E
                 LATITUDE : ! 53.1N
            &nbsp! ; & nbsp;  TIME     : 31-DEC-2609 22:12
              275.8
    yes? list slat_sum[j=80]
              !    VARIABLE : SLAT[I=@SUM]
                 FILENAME : test.nc <http://test.nc/>
                 LONGITUDE: 0E(0) to 0E(360)
                 LATITUDE : 53.1N
                 TIME     : 31-DEC-2609 22:12
              27775.






[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement