; ================================================================================================== ; Purpose: VIIRS SDR data have multiple fill value types. This script replace the variety of fill ; values with the value -999.0. ; ; Input parameters: ; 1. The latitude binary file. ; 2. The longitude binary file. ; 3. The number of columns in the binary files. ; 4. The number of rows in the binary files. ; ; Output: ; The input files are modified. ; ; Author: Willem.Marais@ssec.wisc.edu ; Date: 09/14/2012 ; ================================================================================================== PRO SET_UNIFORM_FILLVAL_VIIRS, LAT_BIN_FILE, LON_BIN_FILE, NR_COLS_INT, NR_ROWS_INT ; Read in data from binary files openr, lun, lon_bin_file, /get_lun lon_arr = make_array (nr_cols_int, nr_rows_int, TYPE = 4) readu, lun, lon_arr free_lun, lun openr, lun, lat_bin_file, /get_lun lat_arr = make_array (nr_cols_int, nr_rows_int, TYPE = 4) readu, lun, lat_arr free_lun, lun ; Replace the VIIRS fill values with one fill value idx_arr = where (lon_arr LT -900.0) lon_arr [idx_arr] = -999.0 lat_arr [idx_arr] = -999.0 ; Write conditioned data to the binary files openw, lun, lat_bin_file, /get_lun writeu, lun, lat_arr free_lun, lun openw, lun, lon_bin_file, /get_lun writeu, lun, lon_arr free_lun, lun END