Faculty of Environment

Modis-TrueColor

The Modis TrueColor software is able to create MODIS true color images from MODIS Level 1B image and geolocation data, using a number of IDL routines.

The software source is available at:

ftp://ftp.ssec.wisc.edu/pub/IMAPP/MODIS/TrueColor

File Location:

The files for Modis TrueColor, and some of the software's dependencies (ms2gt, NDVI) are located within:

/apps/modis-truecolor

Accessing the Software:

To  access the software, use the 'app setup' command:

app setup modis-truecolor

This will set the necessary environmental variables, and create the directory:

~/modis

and the files:

~/modis/map_parameters.in

~/modis/Script.csh

~/modis/Script.auto.csh

Running The Software:

The script which is provided with the software can be run as is, and will process the demo data:

~/modis/Script.csh

This will use the parameters defined in the file:

~/modis/map_parameters.in

And, by default, this will output files to the directory:

~/modis/run

The demo data set outputs nearly 1GB of files, so you may wish to change the output location. This can be done, either by setting the MODIS_TC_OUT environmental variable, e.g., in csh:

setenv MODIS_TC_OUT /nfs/data/modis/out

or, by editing ~/modis/Script.csh:

#- output will be saved here:
if (!($?MODIS_TC_OUT)) then
    setenv MODIS_TC_OUT ${HOME}/modis/run
endif
#-

could be changed to:

#- output will be saved here:
if (!($?MODIS_TC_OUT)) then
    setenv MODIS_TC_OUT
/nfs/data/modis/out
endif
#-

The file ~/modis/Script.csh can be copied/edited as required, for different input data, etc.

Using Script.auto.csh:

As part of the 'app setup' process, a script will be created at:

~/modis/Script.auto.csh

This script allows batches of data to be processed in a single run.

By default, the script will search for files within ~/modis/data, and by will output to ~/modis/scratch.

A 'run_' directory will be created for each set of input files which are processed, within the 'scratch' directory, and a symlink to each of these will be created within ~/modis/.

For example, I have some input files within ~/modis/data, the output has been written to ~/modis/scratch, and a 'run_' symlink was created within ~/modis:

 % pwd
/nfs/see-fs-00_users/user/modis
% ls
data  run_A2003021.1600.004  scratch  Script.auto.csh  Script.csh

in this case, a directory scratch/run_A2003021.1600.004 has been created during the running of the script, which is symlinked within this directory.

You may wish to change the input and output location. This can be done for the input location, either by setting the MODIS_DATA_DIR environmental variable, e.g., in csh:

setenv MODIS_DATA_DIR /nfs/data/modis/data

or, by editing ~/modis/Script.auto.csh:

#- input data directory:
if (!($?MODIS_DATA_DIR)) then
    setenv MODIS_DATA_DIR $HOME/modis/data
endif
#-

could be changed to:

#- input data directory:
if (!($?MODIS_DATA_DIR)) then
    setenv MODIS_DATA_DIR /nfs/data/modis/data
endif
#-

The output location can be changed, either by setting the MODIS_SCRATCH_DIR environmental variable, e.g., in csh:

setenv MODIS_SCRATCH_DIR /nfs/data/modis/scratch

or, by editing ~/modis/Script.auto.csh:

#- output will be saved here:
if (!($?MODIS_SCRATCH_DIR)) then
    setenv MODIS_SCRATCH_DIR $HOME/modis/scratch
endif
#-

could be changed to:

#- output will be saved here:
if (!($?MODIS_SCRATCH_DIR)) then
    setenv MODIS_SCRATCH_DIR
/nfs/data/modis/scratch
endif
#-