runmask.py

Helper script for modifying a dvm-dos-tem runmask netcdf file.

usage: runmask.py [-h] [--verbose] [--reset] [--all-on] [--yx Y X] [--yx-off Y X] [--show] [--conform-mask-to-inputs FOLDER] [--select-only-cmt FOLDER CMT]
                  [--mask-out-cmt FOLDER CMT]
                  [FILE]

Positional Arguments

FILE

The runmask.nc file to operate on.

Named Arguments

--verbose

Print info to stdout when script runs.

Default: False

--reset

Set all pixels to zero (don’t run).

Default: False

--all-on

Set all pixels to 1 (run). Inverse of –reset.

Default: False

--yx

The y, x (row, col) position of the pixel to turn on.

--yx-off

The y, x (row, col) position of the pixel to turn OFF.

--show

Print the mask after modification.

Default: False

--conform-mask-to-inputs
Operate on the run-mask and conform it to all the

input files in FOLDER. Makes sure that the run-mask will disable any pixel (set to 0) where any of the input files contain bad or missing data. NOTE!!: modifies run-mask.nc found in FOLDER, and ignores the files specified ‘FILE’ argument!

--select-only-cmt
Select only pixels with a certain CMT number. This

will honor any pixels that are alreay masked in the run-mask. As such, you should probably conform the mask to the inputs before running the script again with this option to select only certain CMTs.

--mask-out-cmt
Mask out pixels with a certain CMT. This will

maintain any pixels already masked.