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:
|