Class: NCKS_APPEND_GRID_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(grid_description_file) ⇒ NCKS_APPEND_GRID_cmd

Returns a new instance of NCKS_APPEND_GRID_cmd.



344
345
346
# File 'lib/file_command.rb', line 344

def initialize(grid_description_file)
  @grid_description_file = grid_description_file
end

Instance Method Details

#cmd_txt_inplace(file) ⇒ Object



348
349
350
351
352
# File 'lib/file_command.rb', line 348

def cmd_txt_inplace(file)
  # ncks will create a temporary copy of the file
  # see section "2.3 Temporary Output Files" in the docs
  %Q(#{SYSTEM_COMMANDS::NCKS} -h --create_ram --no_tmp_fl -A -v lat,lon,lat_bnds,lon_bnds #{@grid_description_file} #{file}) # the nodes dimension must be identical in geid description and variable file, e.g. 'ncells'
end