[Thread Prev][Thread Next][Index]

[ferret_users] Difficulties when defining integer axis attributes



Hi,

I am trying to add an attribute to the horizontal axes of a 4d - data field. The background is a decomposition into horizontal domains.
The attribute should have the form:

xt_ocean:domain_decomposition = 1, 273, 20, 70 ;

I read the horizontal grid size with: ($1) is the variable name
define symbol istr=`$1,return=istart`
define symbol iend=`$1,return=iend`
define symbol jstr=`$1,return=jstart`
define symbol jend=`$1,return=jend`

and define the subgrid size:
let is=$2
let ie=$3
let js=$4
let je=$5
set region /i=`is`:`ie`/j=`js`:`je`

Now I can define the attribute like follows:
define att/output/type=string (`($var)_3D_climatology,return=xaxis`).domain_decomposition "($istr), ($iend), `is`, `ie`"


xt_ocean:domain_decomposition = "1, 273, 20, 70" ;

Almost done ... but the quotation marks are disturbing.

Alternatively:
define att/output/type=float (`($var)_3D_climatology,return=xaxis`).domain_decomposition {($istr), ($iend), `is`, `ie`}

This gives in the output file:

xt_ocean:domain_decomposition = 0.f, 1.875f, 0.f, 3.766602f ;

This is not only wrong format, but it is wrong! Both, the sysmbols and the numbers are not translated correctly.

define att/output/type=float (`($var)_3D_climatology,return=xaxis`).domain_decomposition {1, 273, 20, 70}

gives the same result.

So this is may be a bug. It shows up with v6.96 (PyFerret 1.2) and the normal v6.85 and v6.951.

And, if I would have a wish - it would be useful in some cases to have an integer attribute type.

Greetings,
Martin Schmidt




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

Privacy Policy | Disclaimer | Accessibility Statement