Class: NCATTED_APPEND_COORDINATES_VALUE_cmd

Inherits:
InplaceCommand show all
Includes:
NCO_warning_filter
Defined in:
lib/file_command.rb

Instance Method Summary collapse

Methods included from NCO_warning_filter

#command_success?

Methods inherited from InplaceCommand

#cmd_txt, #inplace?

Methods inherited from FileCommand

#run

Constructor Details

#initialize(variable_id) ⇒ NCATTED_APPEND_COORDINATES_VALUE_cmd

Returns a new instance of NCATTED_APPEND_COORDINATES_VALUE_cmd.



359
360
361
# File 'lib/file_command.rb', line 359

def initialize(variable_id)
  @variable_id = variable_id
end

Instance Method Details

#cmd_txt_inplace(file) ⇒ Object



363
364
365
366
# File 'lib/file_command.rb', line 363

def cmd_txt_inplace(file)
  # this does not seem to create a temporary file, but no mention of in-place operation in the ncatted docs
  %Q(#{SYSTEM_COMMANDS::NCATTED} -h --create_ram -a coordinates,#{@variable_id},a,c,'lat lon' #{file})
end