[Thread Prev][Thread Next][Index]

Re: [ferret_users] list in reverse order



Hi Serena,
                        There is no simple way to instruct a reversed listing, by say /K=20:1:-1 or
something similar.

In order to reverse the data, you don't have to sort it. Please see the example below.
Also you could use the /ORDER qualifier with the USE command (see Ferret manual
Ref Sec31.3.  SET DATA_SET) to get a reversed Z-axis. However, in this case, the
axis information listed along with the data values will be wrong.

I suggest to use the first method below. Please let me know if you have any questions.

Thanks and Regards,

Jaison


!---------example starts here-------------------
\ cancel mode verify

   use levitus_climatology
   list/x=90/y=12 temp

   ! sample in the reverse order

   let ksz      = `temp,r=ksize`
   let z_rev    = SAMPLEK(z[gz=temp],ksz-K[gz=temp]+1)
   let temp_rev = SAMPLEK(temp,ksz-K[gz=temp]+1)

   list/x=90/y=12 temp_rev, z_rev
  
   ! reversed data with a proper Z-axis

   define axis/z/from_data/units=meters zdepr=z_rev*-1
   let temp_revz = temp_rev[gz=zdepr@ASN]

   list /x=90/y=12 temp_revz

   ! Loading data with reversed Z-axis

   cancel data/all ; cancel var/all

   use/order=xy-z levitus_climatology
  
   list/x=90/y=12 temp  ! but, here the depth axis information will be wrong
!---------example ends here---------------------

On Wed, Jul 15, 2009 at 8:06 AM, Serena Illig <serena.illig@xxxxxxxxx> wrote:
Dear Ferret users,

I would like to list (simply on my screen) the value of an oceanic variable from the bottom to the surface.
My vertical axis is positive

        double DEPTH(DEPTH) ;
                DEPTH:units = "meters" ;
                DEPTH:positive = "down" ;
                DEPTH:point_spacing = "uneven" ;
                DEPTH:axis = "Z" ;
                DEPTH:bounds = "DEPTH_bnds" ;

The command "list/y=15s/x=8e/format=(2e12.3) n2,z[g=n2]" lists my variable from the surface to the bottom...
Can i reverse it without using sortk and then samplek ?

Thanks for your help,

Serena

--
.¸. , . .·´¯`·
><(((º>     `·.¸.·´¯`·...¸><(((º>¸.¸. , . .·´¯`· ><(((º> .
`·.¸.·´¯`·...¸><(((º>                                              .
                                                                       .
 Serena THEVENIN-ILLIG          LEGOS/IRD     .
                              14 Av. E. Belin                .
                              31400 Toulouse              .
                              FRANCE                         .
                                                                      .
        E-mail : serena.illig@xxxxxxxxx                 .
        Web    : http://sillig.free.fr                         .
        Phone : 05 61 33 30 52                        .
        Fax     :   05 61 25 32 05                  .
                                              <º)))><..·´


[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement