[Thread Prev][Thread Next][Index]

Re: [ferret_users] Error while defining irregular depth axis



Thank you, Ryo for your help. It worked for me but with a slight change in the syntax of the last line, you have given. The worked code is below.

    file/var=zed zaxis.dat
  let depth = (-1)*zed
  define axis/z/name=depth/from_data/units=meters depth

Thanks and regards,
Akash. S 



On Thu, Sep 10, 2020 at 8:15 PM Ryo Furue <furue@xxxxxxxxxx> wrote:
Hi Akash,

On Thu, Sep 10, 2020 at 9:23 PM Akash. S <akash013akash@xxxxxxxxx> wrote:


define axis/x=65.0:65.0/npoints=1/unit=degree lon
define axis/y=8.0:8.0/npoints=1/unit=degree lat
!define axis/z=0:500:5/npoints=100/DEPTH/unit=meter depth
file/var=depth/format=(F700.2) zaxis
define axis/z/depth/npoints=100/unit=meter/name=depth/from_data depth

 **ERROR: improper grid or axis definition: data for DEFINE AXIS/FROM_VARIABLE is not monotonically increasing at index 2


I suspect that this is what you want:

file/var=zed zaxis.dat
let depth = (-1)*zed
define axis/z/depth/from_data/units=meters zax = depth


Your zed values are all negative but defined from the sea surface toward the bottom.  That makes the values decreasing rather than increasing.

On the other hand, when we talk about "depth", it is normally positive and increasing toward the bottom.  My definition of zax above conforms to this convention.

Cheers,
Ryo

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

Privacy Policy | Disclaimer | Accessibility Statement