[Thread Prev][Thread Next][Index]

Re: [ferret_users] write missing value into output netcdf



Haoping,

The confusion is because Ferret expects expressions only in limited
contexts.

| yes? let largenum=2^100
|
This works because the right-hand side is evaluated when largenum
is.

| yes? set variable/bad=largenum var1      (this attempt failed)
|
This doesn't work because largenum isn't regarded as an expression.
"largenum" is simply treated as text (I'm guessing).

What you need is

  set variable/bad=`largenum,p=8` var1

to evaluate the expression "largenum".

In this case, the expression largenum is evaluated and the result
is converted to text, which is used to set "bad" (again,
I'm partially guessing).

Notice the "p=8" part.  The default precision may or may not be
sufficient to transfer all the digits.  (Try omitting the ",p=" part
and see what's the resulting bad value is.)

| yes? set variable/bad=2^100 var1 (this attempt passes but the missing

Likewise,

  set variable/bad=`2^100,p=8` var1

would do.

Regards,
Ryo


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

Privacy Policy | Disclaimer | Accessibility Statement