Class: NCATTED_SET_VARIABLE_DESCRIPTION_cmd
- Inherits:
-
InplaceCommand
- Object
- FileCommand
- InplaceCommand
- NCATTED_SET_VARIABLE_DESCRIPTION_cmd
- Includes:
- NCO_warning_filter
- Defined in:
- lib/file_command.rb
Instance Method Summary collapse
- #cmd_txt_inplace(file) ⇒ Object
-
#initialize(var_name, description) ⇒ NCATTED_SET_VARIABLE_DESCRIPTION_cmd
constructor
A new instance of NCATTED_SET_VARIABLE_DESCRIPTION_cmd.
Methods included from NCO_warning_filter
Methods inherited from InplaceCommand
Methods inherited from FileCommand
Constructor Details
#initialize(var_name, description) ⇒ NCATTED_SET_VARIABLE_DESCRIPTION_cmd
Returns a new instance of NCATTED_SET_VARIABLE_DESCRIPTION_cmd.
251 252 253 |
# File 'lib/file_command.rb', line 251 def initialize(var_name, description) @var_name, @description = var_name, description end |
Instance Method Details
#cmd_txt_inplace(file) ⇒ Object
[View source]
255 256 257 258 259 260 |
# File 'lib/file_command.rb', line 255 def cmd_txt_inplace(file) # there seems to be an error when setting chars with ncatted: # a single quote ' always results in a \' in the netcdf. the same effect as putting a \' in the first place # so we currently can not put all variable descriptions correctly, as some contain single quotes %Q(#{SYSTEM_COMMANDS::NCATTED} --create_ram -h -a description,#{@var_name},o,c,"#{@description}" #{file}) end |