Hi Mike, This just isn't implemented yet. We debated for quite a while what the syntax should be for global attributes, and we haven't resolved all the details on this yet. Global attributes come into Ferret only for netCDF datasets, and we can access them with the ..attributename syntax. It's understandable to want to define new ones write them to output netCDF files, but we haven't created syntax to tie them to variables, which is what's specified by any write command. Say you defined a new attribute yes? DEFINE ATTRIBUTE ..foo = "bar"Would this attribute be written to ALL subsequent files, until the attribute was canceled? If we have several files open, what would one expect to be done with with the various global attributes associated with each of those files, when variables from those files, or new variables calculated from those variables, are written to output files? For the moment, we have punted on this, and when writing a new netCDF file, we write only the old default HISTORY attribute, // global attributes: :history = "FERRET V6 4-Oct-06" ; One workaround is to use nco operators to fix up a file after writing; if you have these on your system, you can execute a spawn command from Ferret, or call the external functions NCO or NCO_ATTR to edit a netcdf file right from your Ferret script. yes? show function nc*Suggestions and discussion on this topic would be welcome! Ansley McCann, Mike wrote:
-- ~> ~> ~> ~> ~> ~> ~> ~> ~> ~> ~> Ansley Manke, NOAA/PMEL ansley.b.manke@noaa.gov 7600 Sand Point Way NE, Seattle WA Phone 206-526-6246, FAX 206-526-6744 |