[Thread Prev][Thread Next][Index]

Re: [ferret_users] how to modify axis attributes



Hi Martin,
As Swathi says, of course, netCDF files can always be fixed by using nco operators. However, Ferret's attribute-access commands are meant to give us control over attributes from within Ferret.

Martin, you're seeing a bug. The syntax you're using is correct. For a user-defined variable, the attributes of the variable's axes aren't inherited properly for the purpose of getting the attributes when writing the data. In addition, the handling of the point-spacing attribute has another small bug, so its setting isn't reset even for file variables. Note that this sequence does work, and shows how it all should go. We will be making a bug-fix Ferret release soon.

yes? use monthly_navy_winds.cdf

yes? SET ATT/OUTPUT (`uwnd,return=xaxis`).units = "meters"
yes? save/clobber/file=dummy.nc/l=1 uwnd



Martin Schmidt wrote:
Hi ferreters,
I am trying to modify the attributes of axes and cannot get it working.

To demonstrate the problem consider the following short script:

____

use monthly_navy_winds.cdf

let t2 =2*UWND
SET ATT/OUTPUT  (`t2,return=xaxis`).point_spacing = "uneven"
save/clobber/file=dummy.nc/l=1 t2

____

The x-axis of uwnd has the attribute
                FNOCX:point_spacing = "even" ;

I would like to have it changed to uneven, whatever the reason is ...
After setting the attribute ferret answers !-> SET ATT/OUTPUT (FNOCX).point_spacing = "uneven"

Fine. However, after saving and inspecting the outputfile with ncdump,
one finds
                FNOCX:point_spacing = "even" ;

What happens here?

Another question to the same problem:

How to define a new axis attribute?
DEFINE ATT/OUTPUT  (`t2,return=xaxis`).new_att = "somthing"

produces the answer
 !-> DEFINE ATT/OUTPUT  (FNOCX).new_att = "somthing"
but nothing is in the output?

Greetings,
Martin

--

~> ~> ~> ~> ~> ~> ~> ~> ~> ~> ~>
Ansley Manke, NOAA/PMEL   ansley.b.manke@xxxxxxxx
7600 Sand Point Way NE, Seattle WA
Phone 206-526-6246,  FAX 206-526-6744




[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement