# Re: How to plot density-time section

```
Hi, Steve,

Thank you very much.

The following is the process:

Suppose tmean and smean are 4-D variables with X,Y,Z,T,

Step 1: Get potential density

let rho=rho_un(smean,tmean,0)-1000

Step 2: Define a new Z-axis(density-axis) to replace the old one:

define axis/z=23.8:26.6:0.2/unit="density"/depth axdens

Step 3: Use fuction ZAXREPLACE to get temp on density-axis

let temp_on_density=zaxreplace(tmean,rho,z[gz=axdens])

Do you think it is right?

Best regards,

Haijun Yang

> From hankin@pmel.noaa.gov Wed Aug 25 10:29:10 1999
> Date: Wed, 25 Aug 1999 08:33:24 -0700
> From: Steve Hankin <hankin@pmel.noaa.gov>
> X-Mailer: Mozilla 4.5 [en] (WinNT; I)
> X-Accept-Language: en
> Mime-Version: 1.0
> To: Yang Haijun <navyang@tuna.meteor.wisc.edu>
> Cc: ferret_users@ferret.wrc.noaa.gov
> Subject: Re: How to plot density-time section
> References: <199908251456.AA18192@tuna.meteor.wisc.edu>
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> Content-Length: 940
>
> Hi Yang,
>
> I think the ZAXREPLACE function may do just what you are after. See
> http://ferret.wrc.noaa.gov/Ferret/Documentation/Users_Guide/v50/chapter3.html#V5.0_ZAXREPLACE
> function  (Also the RHO_UN function to compute density (see same section
> of users guide)
>
>     - steve
>
> ================================================
>
> Yang Haijun wrote:
>
> > Hi,
> >
> > I have 4-dimensional temperature and salinity with X/Y/Z/T,
> > how can I tranfer Z-axis to Density-axis while X-, Y- and T-axis
> > are not changed?
> >
> >
> > Haijun Yang
> >
> > ===============================================
> > Department of Atmospheric and Oceanic Sciences
> > 1225 West Dayton St.
> > Phone: (608)-262-0798(o)
> >        (608)-238-8338(h)
> > ===============================================
>
> --
> Steve Hankin
> NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
> ph. (206) 526-6080 -- FAX (206) 526-6744
>
>

```