[Thread Prev][Thread Next][Index]

Re: Contour in a vertical plane: how to get latitude values instead of km?



Here's an example of how to regrid such a dataset:

In my case, I have data on an (I,J,Z) grid, with lats and lons as
simply the I and J values, but a correct depth axis. 

I have separate grids of LAT and LON as a function of (I,J) 
(however LAT is constant in I at each J, and LON is constant in J 
at each I):

yes? sho grid mean    ! my data grid (I,J,Z)
    GRID GHB6
 name       axis              # pts   start                end
 LON       X                  201 r   1                    201
 LAT       Y                  101 r   1                    101
 DEPTH     DEPTH (m)           56 i-  0                    5500
 normal    T

yes? sho grid lat     ! my lat grid (lon is similar)
    GRID GHB1
 name       axis              # pts   start                end
 LON       X                  201 r   1                    201
 LAT       Y                  101 r   1                    101
 normal    Z
 normal    T

! use the values of LAT and LON to define correct geographical axes
! since LON varies only in X and LAT only in Y, pick values at I,J=1:
define axis/fromdata/x/name=truelon/unit=lon lon[j=1]
define axis/fromdata/y/name=truelat/unit=lat lat[i=1]

! define a geographical (X,Y,Z) grid
define grid/x=truelon/y=truelat/z=depth gxyz 

! since grid gxyz is the same shape as the original (I,J,Z) grid,
! use @asn to regrid:
let meanrg=mean[g=gxyz@asn]	! data on a geographical grid

If LAT and LON are functions of both x and y, then this method
won't work.

Billy K

> To: Ferret users <oar.pmel.ferret_users@noaa.gov>
> Subject: Contour in a vertical plane: how to get latitude values instead of km?
> From: Emilie Vanvyve <vanvyve@astr.ucl.ac.be>
> Date: Mon, 25 Apr 2005 15:58:44 +0200
> 
> Hello,
> 
> Another little problem to submit...
> I have 3-D data on a cartesian grid in a file (NetCDF). I also have in 
> this file the variables LON and LAT containing the longitude and 
> latitude values for each of the points of the cartesian grid. The 
> cartesian grid is regular (40 km horizontal resolution), but of course 
> the latitude and longitute aren't.
> So all my variables, LAT and LON included, are defined on the exactly 
> same grid (in kilometers by the way).
> 
> My question is the following.
> I wanna plot with CONTOUR a vertical plane of the temperature along the 
> latitude at a precise time. If I do this:
> CONTOUR/l=1/i=24 TAIRDY
> where TAIRDY is my variable for temperature (4-D : i,j,k,l), I get a 
> chart with sigma levels as vertical axis and kilometers as horizontal 
> axis. I want to have latitude instead of kilometers on the horizontal 
> axis. How can I do?
> 
> I've tried several methods detailed in the online Ferret help, but it 
> doesn't work as I can't use any other variable to get the grid from and 
> so make a regridding of my variable TAIRDY.
> I'd swear there must be a way to get the latitude values from the LAT 
> variable and force Ferret to use it instead of the common kilometers, 
> but I can't discover how...
> 
> So if anybody knows, thanks in advance for any suggestion!
> 
> Emilie V.
> 
> 
> ____________________________________________________________
> Emilie VANVYVE
> Physicist, PhD student
> 
> Université catholique de Louvain (UCL)
> Institut d'astronomie et de géophysique G. Lemaître (ASTR)
> Chemin du Cyclotron, 2
> 1348 Louvain-la-Neuve (Belgium)
> Phone: +32-(0)10-473300  //  Fax: +32-(0)10-474722
> E-mail: vanvyve@astr.ucl.ac.be  //  Web: www.astr.ucl.ac.be



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement