[Thread Prev][Thread Next][Index]

Re: [ferret_users] Apparent failure of ZAXREPLACE_AVG



Thanks, Ansley!

Auxiliary Coordinate Regridding is an excellent solution!
I am embarrassed to admit that I have on occasion RESHAPEd variables to use ZAXREPLACE for directions other than z.

In the end I find that ACR with ar[gW=axis@plave] makes a miniscule difference in my calculation. But ACR is a cool tool to have available. Thanks!

Billy


On Mon, Jun 6, 2022 at 6:40 PM Ansley Manke <a.c.manke@xxxxxxxxx> wrote:

Hi Billy,

As far as I know these functions haven't been used heavily, so there may be something wrong.

As an alternative, you might look at using the Auxiliary Coordinate Regridding syntax, introduced in  V6.95. This is an extension of the logic behind ZAXREPLACE, working in any direction and with two options for the way the transformation is done, either by linear interpolation or a Piecewise Linear averaging method.


Ansley


On 6/6/2022 2:35 PM, William Kessler - NOAA Federal wrote:
Hi Ferreters -

I see an apparent failure of ZAXREPLACE_AVG and ZAXREPLACE_BIN, for exactly the same data and arguments that produce a correct plot using plain ZAXREPLACE.

The attached plot was made in Ferret6.94, but identical results are found in PyFerret7.5 (identical to 3 decimal places by LIST).

Inputs are file variables:
UE = zonal current across the equator at 110W (y,z, at specified t)
TE = corresponding temperature

I want to remap UE onto a temperature z-axis (zthick) in half-degree steps.
ZTHICK    Z (#C)              55 r   4.25                 31.25

The definition of the plotted quantities are always of the same form:

let test1 = zaxreplace(ue,te,z[gz=zthick])
let test2 = zaxreplace_bin(ue,te,z[gz=zthick])
let test3 = zaxreplace_avg(ue,te,z[gz=zthick])

The attached plot panels show the result (note Ferret-made plot titles are below each panel):

Top: Initial input data on (y,z) (colors = UE, with white overlaid contours of TE)
2nd: TEST1: plain ZAXREPLACE. This is correct.
3rd: TEST2: ZAXREPLACE_BIN
4th: TEST3: ZAXREPLACE_AVG

Both the last two are wrong. In addition to only finding a thin line of values at the top, both find the thin strip above any temperatures on the section.

ZAXREPLACE_AVG is the right function for my calculation. Probably ZAXREPLACE would be ok, but I would then use a much finer z-axis and do the averaging myself. That seems a waste if we already have the right function.

I don't think I've ever used ZAXREPLACE_BIN or AVG. I see only one previous message in the user group, from 2003, and it doesn't look relevant to this.

Anyone else see this behavior, or have an explanation?

Thanks for any ideas ... Billy Kessler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115 USA

william.s.kessler@xxxxxxxx
Tel: +1 206-526-6221
Fax: +1 206-526-674

Screen Shot 2022-06-06 at 1.27.12 PM.png





[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement