[Thread Prev][Thread Next][Index]

Re: [ferret_users] let/like='z' --- use of quoted names



Hi Saurabh,

On Tue, Mar 24, 2020 at 3:29 PM saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:

https://ferret.pmel.noaa.gov/Ferret/faq/reserved-keywords

https://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2016/msg00385.html


Thanks!

set var/name=newname 'problematic_name'

should be the best solution. And it almost works:

yes? set data ETOPO1_Ice_c_gmt4.grd
yes? set var/name=rose 'z'
yes? show attributes rose
 **ERROR: variable unknown or not in data set: rose
yes? let/like=rose zzz = rose
yes? show attributes zzz
     attributes for user-defined variables
 zzz.missing_value = -1.E+34
 zzz.Conventions = COARDS/CF-1.0
 zzz.title = ETOPO1_Ice_c_gmt4.grd
 zzz.GMT_version = 4.4.0
 zzz.node_offset = 1
yes?

As you can see, one more level of indirection (zzz == rose == 'z') gives the desired results.  This seems to be the best workaround.

Cheers,
Ryo


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

Privacy Policy | Disclaimer | Accessibility Statement