Hi- This question was addressed to contact_ferret, but I'm replying to ferret_users, as it is a topic of general interest. On 5/19/2011 9:42 PM, Prasad SJ. wrote:
There's a set of tools called the NCO operators that do just this kind of thing: http://nco.sourceforge.net/ You can extract portions of variables, add attributes, and rename variables, see http://nco.sourceforge.net/nco.html#ncrename-netCDF-Renamer It takes a bit of study to learn from the documentation how to specify all the options - there are options that apply to many commands, and those aren't always listed with each particular command. These are command-line tools and you may find that you have them installed as part of your linux system, or you can get them from the sourceforge pages. If you have them installed you can run them from the command line, or from Ferret using the NCO function. We also have a specific function to call the attribute editor. yes? show function nco NCO(operator,arguments) Call an NCO utility operator: name of operator (STRING) arguments: one string with all arguments (STRING) yes? show function nco_attr NCO_ATTR(FileName,VariableName,AttributeName,AttType,Mode,AttributeValue) Call ncatted to edit attributes in a netCDF file FileName: netCDF file name (STRING) VariableName: Variable name (or global) (STRING) AttributeName: Attribute to change (STRING) AttType: Attribute type (STRING) Mode: o=edit, a=append, d=delete (STRING) AttributeValue: new value of attribute (STRING) (which we created for some special use cases where we wanted these tools but where we're running Ferret in -server mode and so can't just spawn out to the unix command line). Finally, if instead you wanted to change variable names for use within Ferret, you would open the dataset in Ferret and then use SET VAR/NAME= to change any variable names you want. -Ansley
|