[Thread Prev][Thread Next][Index]

Re: [ferret_users] Finding the coordinate value along an axis.



Hi Alexander

Are you working from the PyFerret command line,that is from the "yes?" prompt? If so you can define a variable that contains the coordinates of an axis. The topic in the documentation is "pseudo-variables".

let zval = z[gz=variable]
repeat/k=1:32 (let val= `zval`)


There is syntax for controling the formatting of values in the grave-accent expressions, which may be useful to you when using numeric values within a file name. See this:
../../documentation/users-guide/variables-xpressions/EMBEDDED-XPRESSIONS#_VPINDEXENTRY_562


On 9/2/2020 1:02 PM, Alexander Audet wrote:
Hello Everyone,
I am trying to return coordinate values along an irregular axis using the index values. So if I have 32 pressure levels (K=1:32:1) spread out between Z=100-1000mb, I might want to say get the value 500 (mb mb)from inputting K=17 somehow.

What I havedone:

I came across the pyferret.get_axis_coordinates ETF, however, that seems to require I code my own ETF to use. Either way, I am still confused about how to use it, and how it could help me get the result I want, even after usinghelp(pyferret.get_axis_coordinates).



It has crossed my mind that I may be able to somehow create a new axis from the old ending at K=17, and then returnthe end value by usingRETURN=XEND. However, I do not currently know how to create a subaxis from another axis.

What I am actually trying to do (in case that helps):

I am running a REPEAT and want to create a series of file names with the appropriate pressure levels in the file name. I have a variety of differentfiles, so no 1 size fits all.

Many thanks,

Alexander



-- 
Ansley Manke
Science Data Integration Group
NOAA Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115
 
I am currently teleworking and am available Tue-Wed-Thu.

[Thread Prev][Thread Next][Index]