Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions bin/cris_hsrtv.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env ruby
# Cris l2 processing tool..
# Run like:
# cris_hsrtv.rb -t /hub/raid/jcable/cris/test_data/tmp /hub/raid/jcable/cris/test_data/npp.17011.1305/ /hub/raid/jcable/cris/test_data/out/npp.17011.1306

ENV['BUNDLE_GEMFILE'] = File.join(File.expand_path('../..', __FILE__), 'Gemfile')
require 'bundler/setup'
require 'fileutils'
require_relative '../lib/processing_framework'

class CrisHsrtvClamp < ProcessingFramework::CommandLineHelper
default_config 'cris_hsrtv'
banner 'This tool does HSRTV processing for CrIS.'

parameter 'INPUT', 'Input directory'
parameter 'OUTPUT', 'Output directory'

def execute
basename = File.basename(input) unless basename

working_dir = "#{tempdir}/#{basename}"
inside(working_dir) do
command = " #{conf['driver']} #{conf['options']} #{input}"
result = shell_out!(command)
end

Dir.glob(conf['save']).each do |hsrtv_glob|
copy_output(output, hsrtv_glob)
end
end
end

CrisHsrtvClamp.run
4 changes: 4 additions & 0 deletions config/cris_hsrtv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
driver: run_HSRTV.scr
options: " 3 "
save:
- "CrIS*atm_prof_rtv.h5"