Pull_stats: AIRS random template

Steven Buczkowski


Pull_stats code follows the same plan that most of my sbatch software follows with an sbatch shell script the sets up sbatch directives for the run and calls a matlab driver function which, in turn, calls a processing function which operates on a canonical subset of the relevant data. For pull_stats, this canonical subset is one year so, a single year can be run via slurm/sbatch by requesting only the array index for that year or by running the base level processing function alone in a matlab session.

For the AIRS random template examples, these functions are

  • run_pull_stats_random_template.sh
  • run_pull_stats_random_template.m
  • pull_stats_random_template.m

Additionally, there is a helper function: loadAddPaths_template.m with all the relevant addpaths. This is called automatically when run_pull_stats_random_template.sh is run but needs to be run by hand if running pull_stats_random_template.m to run a single year.


function pull_stats_random_template(year);

Modifying subset filter

The robs subset filter is defined in a code block starting at pull_stats_random_template.m:63.

        % filter robs
        k = find(p.iudef(4,:) == 68 & p.landfrac == 0); % night +
                                                        % ocean
        sDescriptor = 'night_ocean';

Filters consist of a simple find command but, could be replaced with a specialty function.

Production subset filters are the various combinations of day/night + land/ocean/all although any logical test of data available in the input rtp files can be used.

  • NIGHT: p.iudef(4,:) == 68
  • DAY: p.iudef(4,:) == 65
  • LAND: p.landfrac == 1
  • OCEAN: p.landfrac == 0

sDescriptor is a text string used in the output filenames to denote the filter used.

sOutputFile = [sOutputDir '/rtp_airibrad_rad_' int2str(year) '_random_' ...

yields filenames like: rtp_airibrad_rad_2011_random_night_ocean.mat