[Thread Prev][Thread Next][Index]

Re: [ferret_users] Re: Vertical Axis Truncated during REPEAT: GO MYSCRIPT



Hi Alexander,

Try with defining a symbol,

USE ERA5_UV8PLbottom_DJF.nc
let zval = z[gz='U']

These `` are fine.

REPEAT/Range=1:8:1/Name=kk \
(let NamePL = zval[k=`kk`]; \
Go RawERA5WindSpeed `kk`, `NamePL`, DJF)

Try with
REPEAT/Range=1:8:1/Name=kk \
(define symbol k1=`kk`; let NamePL = zval[k=($k1)]; \
Go RawERA5WindSpeed ($k1), `NamePL`, DJF)
See if it works.


According to my experience, sometimes (not sure when) ferret read accents as `this is `this is `This is my first read` second` third`, the most inner parts are considered as the first read. Using define symbol to reduce your accent usage to avoid this type of confusion.

Best,

Xiaoyu 

On Sat, Sep 5, 2020 at 7:06 AM Marco van Hulten <Marco.Hulten@xxxxxx> wrote:
Alexander—

On  4 Sep 14:31 Alexander Audet wrote:
> I still don't understand the behavior though. I noticed that when I used
> REPEAT/K=8:1:-1, some of my Go script intermediate files which only had 1
> pressure level failed because they did not have 8 z-levels, and REPEAT
> somehow seemed to impose the rule inside the script that all datasets
> needed to give data on the current K-iteration z-level (a.k.a. their 8th
> z-level).
>
> It also appears that REPEAT/K=1:8:1, created a pseudo variable on an
> abstract axis with unlimited points, but that after my go-script, the
> abstract grid of the pseudo variable has been replaced by a non-abstract
> grid with a set pressure level.
>
> REPEAT/Range also creates a grid with a single fixed pressure level, but
> don't seem to have a problem moving to a new grid on the next count.
>
> I would like to better understand what is going on here. Any ideas? Perhaps
> I need to refresh my understanding of abstract axes?

In my experience looping over pseudo-variables (REPEAT/K=...) looks
handy and clear for simple loops as long as no ambiguity is introduced
through more than one grid.  When issues arise, I introduce a
user-variable index that does not relate to any grid
(REPEAT/RANGE=.../NAME=ii).

I hope that it will become a bit more clear from the documentation that
Ansley has planned to add on REPEAT loops, based on this and my recent
«high-to-low range for REPEAT over pseudo-variable» thread.

—Marco



--
Xiaoyu

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

Privacy Policy | Disclaimer | Accessibility Statement