[Thread Prev][Thread Next][Index]

Re: cross section



Hi James,
           You can "flip" the Z-axis in different ways. Plese have a look
at the example below for doing it in Ferret. If your dataset is in NetCDF
format, you can add an attribute "positive=down" for the Z-dimension using
fortran/c program or using ncdump & ncgen utilities (see method 2 i the 
examplefor doing it in Ferret) . If it is in ASCII format, define your 
Z-axis for the variable with a /DEPTH qualifier.

Two ref's :
http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2003/msg00550.html
http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2003/msg00552.html

Hope this helps 

With Regards 

Jaison

!----------------example.jnl-----------------------------------
!
! let us create a dummy varialbe defined over Z-axis   

     define axis/z=100:1100:100/units=millibars zpr
     let var = RANDU(z[gz=zpr])
     plot var
     pause

! now we have to reverse or "flip" y-axis

  ! method 1 : use VLIMITS qualifier : VLIMITS=lo:hi:delta
   
        plot/VLIMITS=1100:100:100 var
        pause
 
  ! method 2 : assign "DEPTH" attribute (positive down) via regridding
  
        let zdata = z[gz=var]  ! extract the co-ordinate values

        define axis/z/units=millibars/DEPTH/from_data zax=zdata

        let var_z = var[gz=zax@ASN]  

        plot var_z      ; pause
        
 
  ! method 3 : assign "DEPTH" attribute using "set axis/" command
  !   decide the axis name using show grid command
  !   in this case the name of zaxis of var is "zpr"

        show grid var

        set axis/DEPTH zpr
        plot var
        
        !  if you don't want to repeat this processes all the time
        !  when you opens this file, save var_z in method 2 OR var
        !  in method 3 to a NetCDF file ( it wll be good to put some
        !  meaningfull title and units)
        !
        !  SET VAR/title="   "/units="   " var_z  
        !  SAVE/file=myfile.nc/append var_z
!
!----------------end of example.jnl-----------------------------



On Tue, 18 Jan 2005 jimmyc@iastate.edu wrote:

> Fereteers:
> 
> I have pressure as my vertical coordinate. Pressure decreases with 
> altitude.
> When I plot a cross section the top of my "atmosphere" is on the bottom of 
> the plot while the bottom of my "atmosphere" is at the top.
> Is there any way to reverse the axis so that:
> 
> Plot:
> level 1: 100 millibars
> .
> .
> .
> level 21: 1000 millibars
> 
> instead of:
> 
> level 21: 1000 millibars
> .
> .
> .
> level 1: 100 millibars
> 
> ?
> Thanks for any help.
> 
> 
> 

-- 
___________________________________________________

    Jaison Kurian                           
    Centre for Atmospheric and Oceanic Sciences
    Indian Institute of Science
    B A N G A L O R E   560 012
    Ph: +91-80-3942505
        +91-80-3600450
    Fax:+91-80-3600865
___________________________________________________


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement