Hi,
I've been using conversions.p_from_z to convert 3D numpy masked array for depth into pressure. The conversion fails to preserve the mask. It expands the mask and removes almost all the deeper layers.
Please see the attached images of the mean depth in the x direction vs the mean pressure in the x direction. Note that positive on the y axis is downwards in the ocean.
Is there any way to force gsw to preserve a numpy mask?