[Thread Prev][Thread Next][Index]

Re: [ferret_users] how to do embedded expression inside an embedded expression with grave accent



Hi,


On Wed, Oct 10, 2018 at 9:05 PM Xiaoyu Bai <xbai1@xxxxxxxx> wrote:
Hi Ghetiya,

Yes, I wan to read all the files in through the repeat loop. When you say nested loop, do you mean let datset=0; repeat/range=1:8 (let datset=`datset+1`; use `files_CNRM[X=datset]`)? It didn't work.

^ Yes, you are correct, I also encountered similar problem, it seems ferret is not taking nested definition of variable.
The error message is like **ERROR: command syntax: DATSET // SET DAT/FORM=CDF `files_CNRM[X=datset]`. I feel datset needs a pair of grave accent to make it as an variable. However, ferret considers the nearest two grave accents as a pair. 
I might need to read my files in one by one instead of using repeat loop.

^ But once I used syntax like this which worked: repeat/range=1:7/name=aa (use file_name_`aa`.nc;) 
Anyway if not, then yes for now, you may have to use one by one.
Thank you very much and have a nice day. 

Welcome. 

On Wed, Oct 10, 2018 at 12:53 AM Satyesh Ghetiya <satyeshghetiya@xxxxxxxxx> wrote:s
Hi,
I also faced similar problem, but every time I am by passing using two grave accent by using some other repeat loop (nested) or by using some other variable.
Are you wanting to use, in loop, 7 data sets ?  

On Wed, Oct 10, 2018 at 1:53 AM Xiaoyu Bai <xbai1@xxxxxxxx> wrote:
Dear ferreters,

I have a syntax that's like repeat/range=1:7/name=datset use `files_CNRM[x=`datset`]`. However, ferret reads it like  `files_CNRM[x=` and `]`. So I am wondering how to make this syntax work.

Thank you very much.
--
Xiaoyu


--
G Satyesh



--
Xiaoyu


--
G Satyesh


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

Privacy Policy | Disclaimer | Accessibility Statement