[Thread Prev][Thread Next][Index]

Re: [ferret_users] Manually interpolate zero degree level



Hey Russ,

This totally works, but I need to do it for another application. There is another variable which is the cloud based height (cbh) in meters above mean sea level. I need to find the lowest interpolated zero degree level above this cbh. So is it possible to retrieve multiple zero degree level heights, then conduct it through the statement (if it's higher than cbh) and then select the lowest one?

Kind regards,

Jasper Denissen

2017-05-19 4:45 GMT+02:00 Russ Fiedler <russell.fiedler@xxxxxxxx>:

Hi,

Ah, I thought that might be a problem. You can use the event mask transformation @EVNT to get the last occurrence and mask out all the preceding
events.

http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/XPRESSIONS#_VPINDEXENTRY_550


It's a bit tricky though.

let event=temp[z=@EVNT:0]  ! Increments every time temp crosses zero starting from the highest
let event_rev = event[z=@max] - event   ! Reverse the order. Zero beneath the lowest crossing and increases thereafter
let temp_mask = if event_rev le 1 then temp  ! We only want the temps surrounding the lowest crossing
let isotherm_0 = temp_mask[z=@WEQ:0]
...

You can also mask like this

let event=temp[z=@EVNT:0] 
let last_cross=event[z=@max]
let next_last=max(last_cross-1,0)
let temp_mask = if event ge next_last then temp
...

c.f.

http://ferret.pmel.noaa.gov/Ferret/faq/finding-the-location-of-last-isotherm



Russ



On 18/05/17 19:32, Jasper Denissen wrote:
Dear Ansley and Russ,

Thank you both for your helpful answers. I was indeed looking for what you mentioned Russ. But there is one remaining problem: In some cases there are multiple zero degree levels; I did some sampling and found out that when I execute:

let/title="geopotential height on 0 degree isotherm" z_g_0 = integrand_0[z=@sum]  ! interpolated Z_g

it gives me the heighest height at which this situation occurs. I'd like for it to give me all interpolated heights at which T=0, so that I can manually select the lowest level (so use this variable and k=@min). Is this possible?

Kind regards,

Jasper Denissen

2017-05-18 2:44 GMT+02:00 Russ Fiedler <russell.fiedler@xxxxxxxx>:
Hi,

I think Jasper actually wants @WEQ rather than @LOC since his independent height variable is pressure not geopotential height.

http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/XPRESSIONS#_VPID_175


let isotherm_0 = temp[z=@WEQ:0]  ! pressure kernel at 0 degrees
let integrand_0 = geopotential*isotherm_0/9.81  !
let/title="geopotential height on 0 degree isotherm" z_g_0 = integrand_0[z=@sum]  ! interpolated Z_g


Cheers,
Russ


On 18/05/17 05:17, Ansley C. Manke wrote:
Hi,

Look at the transformation @LOC which picks out the data at a specified value.

-Ansley


On 5/17/2017 6:14 AM, Jasper Denissen wrote:
Dear ferret users,

I've got two variables, temperature T (K) and geopotential Z (m^2/s^2) on 25 pressure levels and a certain spatial extent. What I want to do is find the exact (read linearly interpolated) height of the zero degree level. All I found in the ferret documentation was interpolate transformations which fill data gaps, but I just need to define one variable which contains the interpolated geopotential height (geopotential / 9.81) at which the interpolated temperature equals zero. If there are several heights where T = 0, please take the lowest height.

I think this should be a fairly simple transformation, but I can't seem to find the answer myself. Someone please help me!

Kind regards,

Jasper Denissen
MSc student Earth & Environment
Wageningen University






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

Privacy Policy | Disclaimer | Accessibility Statement