Download   Help   Documents   Contact   Links   OceanColor   News   FAQ   Forum 

l1agen_modis

Description:  This program creates a MODIS formatted Aqua or Terra Level 1A and Geolocation file from a Production Data Set (PDS) formatted MODIS Level 0 file. Unless the "satellite" option is specified (command mode only), the input filename must match one of the following patterns in order for the platform to be determined:

If no output filenames are specified, the filenames will be constructed using the AYYYYDDDHHMMSS or TYYYYDDDHHMMSS prefix format reflecting the calculated pass start time. In this case, the Level 1A and Geolocation filenames will be given ".L1A_LAC" and ".GEO" suffixes respectively. Default Level 1A and Geolocation file output directories can be optionally defined via the $SEADAS/config/seadas_setup command.

In order to successfully create a Geolocation file from a Level 1A file, corresponding attitude and ephemeris files are required, (unless the Terra embedded Onboard (TONS) real-time attitude/ephemeris is being used). These files can be manually downloaded, though it is recommended to simply allow SeaDAS to automatically fetch the required files via its built-in wget program. To learn how to manually retrieve these files, please consult the Ancillary Data Descriptions page for specific instructions.

If both "DEFINITIVE" and "REAL-TIME" attitude/ephemeris options are selected when running l1agen_modis, SeaDAS will first attempt to use definitive data, and will then fall back on real-time data if definitive isn't available.

NOTE:  Two MODIS ancillary data files (utcpole.dat and leapsec.dat) reside in the $SEADAS/var/modis/ directory and must be kept up-to-date. Though l1agen_modis will automatically download them if they're over 14 days old, it is still suggested that they be updated on a weekly basis by running the modis_update_utcpole_leapsec.csh script as a cron job. The utcpole.dat and leapsec.dat files are available here:

       ftp://oceans.gsfc.nasa.gov/COMMON/utcpole.dat
       ftp://oceans.gsfc.nasa.gov/COMMON/leapsec.dat


Command Mode:

Usage:   l1agen_modis, ifile="ifile", l1afile="l1afile", geofile="geofile", nextgranule="nextgranule", a1="attitude_file1", a2="attitude_file2", e1="ephemeris_file1", e2="ephemeris_file2", /disabledefinitive, /disabledefinftp, /disablepredicted, /disablepredftp, /disableutcftp, /disablecurl, /verboseftp, /disabledem, startnudge=startnudge, stopnudge=stopnudge, geocheck_threshold=percent, satellite="satellite", /savelog, /wait

Minimum command:   l1agen_modis, ifile="ifile"

Arguments/Keywords:
ifile Input MODIS Aqua/Terra L0 file for generating the L1A and GEO file. (Required)
l1afile Output filename for the L1A file. (Optional)
geofile Output filename for the GEO file. (Optional)
nextgranule Next L0 granule (allows for geolocation of last scanline; sets stopnudge=0). (Optional)
a1 Input attitude file 1 (chronologically before attitude_file2). (Optional)
a2 Input attitude file 2 (chronologically after attitude_file1). (Optional)
e1 Input ephemeris file 1 (chronologically before ephemeris_file2). (Optional)
e2 Input ephemeris file 2 (chronologically after ephemeris_file1). (Optional)
disabledefinitive If this flag is set, definitive attitude/ephemeris will not be used to generate the geolocation file. (If both definitive and real-time attitude/ephemeris options are enabled, SeaDAS will first attempt to use definitive.)
disabledefinftp If this flag is set, SeaDAS will not attempt to automatically download the required definitive files from the internet.
disablepredicted If this flag is set, real-time attitude/ephemeris will not be used to generate the geolocation file. (If both definitive and real-time attitude/ephemeris options are enabled, SeaDAS will first attempt to use definitive.)
disablepredftp If this flag is set, SeaDAS will not attempt to automatically download the required real-time files from the internet. (This option applies only to Aqua, as Terra's non-definitive attitude/ephemeris is embedded in the L0 data file.)
disableutcftp If this flag is set, SeaDAS will not attempt to automatically download new utcpole.dat and leapsec.dat files if the local versions aren't up-to-date.
disablecurl Disable use of the curl ftp client used in the predicted attitude/ephemeris download process. curl requires fewer connections to the ftp server and so is recommended as a firewall may limit the number of connections per IP. Though used by default, if curl doesn't exist in the user's path, the script will fall back to wget.
verboseftp If this flag is set, verbose wget output messages from attempted attitude/ephemeris downloads will be output to the SeaDAS xterm window.
disabledem If this flag is set, terrain elevation correction will be disabled for all processing including over land and lakes. If terrain elevation correction is not disabled and no MODIS DEM files exist in $SEADAS/data/modis/dem/, terrain elevation correction will be automatically disabled and processing will continue. (MODIS DEM files are available in the seadas_dem_modis.tar.gz SeaDAS distribution file.)
geocheck_threshold  Percent of geo-populated pixels required to pass geocheck validation test. The geocheck validation test calculates the percentage of pixels that were not successfully geolocated and if this percentage is less than geocheck_threshold, the processing will assume failure and will not delete temporary processing files, including the log files. (Default=95)
startnudge Level-0 start-time offset (seconds). This is the number of seconds of data to remove from the beginning of the L0 file to avoid geolocation problems due to unavailable packets. (Default=10)
stopnudge Level-0 stop-time offset (seconds). This is the number of seconds of data to remove from the end of the L0 file to avoid geolocation problems due to unavailable packets. (Default=10)
satellite Must be either "aqua" or "terra" and is only required if the input filename does not match one of the patterns specified above for determination of the platform.
savelog Saves the Level 1A and geolocation processing LogStatus files. (The logs are deleted by default if processing completes without a fatal error.)
wait A keyword, if not set or a value 0 (default), the command will spawn the program as a background process and come back right away for the next SeaDAS command. Otherwise, if the keyword is set or with a value 1, the command will spawn the program as a foreground job and wait for it to complete before the next SeaDAS command can be executed.


Interactive Mode:

Main Widget:

The main_widget can be accessed by selecting "l1agen_modis" from the Process -> MODIS pull down menu in the SeaDAS main menu or from the command line mode by typing: "l1agen_modis".

Input items:

Input MODIS L0 (PDS) file The input MODIS L0 file for generating the Aqua/Terra L1A and GEO file.
Select To display the File Selection Widget for selecting the input file.
Output L1A file (optional) Optional output filename for the L1A file.
Output GEO file (optional) Optional output filename for the GEO file.
Next L0 granule (optional) Next L0 granule (allows for geolocation of last scanline; sets stopnudge=0).
Attempt to use definitive Attitude/Ephemeris  Option to enable/disable use of definitive attitude/ephemeris for generating geolocation file. (If both definitive and real-time attitude/ephemeris options are enabled, SeaDAS will first attempt to use definitive.) (Default=YES)
Auto-Download definitive Attitude/Ephemeris  Option to enable/disable automatic downloading of the required definitive files from the internet. (Default=YES)
Attempt to use real-time Attitude/Ephemeris  Option to enable/disable use of real-time predicted (Aqua) or embedded Onboard TONS (Terra) attitude/ephemeris for generating geolocation file. (If both definitive and real-time attitude/ephemeris options are enabled, SeaDAS will first attempt to use definitive.) (Default=YES)
Auto-Download real-time Attitude/Ephemeris  Option to enable/disable automatic downloading of the required real-time files from the internet. (This option applies only to Aqua, as Terra's non-definitive attitude/ephemeris is embedded in the L0 data file.) (Default=YES)
Disable use of curl FTP Client Disable use of the curl ftp client used in the predicted attitude/ephemeris download process. curl requires fewer connections to the ftp server and so is recommended as a firewall may limit the number of connections per IP. Though used by default, if curl doesn't exist in the user's path, the script will fall back to wget. (Default=NO)
Enable Verbose Auto-Download Messages Option to enable/disable verbose wget output messages from attempted attitude/ephemeris downloads (output to the SeaDAS xterm window). (Default=NO)
Disable Terrain Elevation Correction Option to enable/disable terrain elevation correction for processing over land and lakes. If terrain elevation correction is enabled and no MODIS DEM files exist in $SEADAS/data/modis/dem/, terrain elevation correction will be automatically disabled and processing will continue. (MODIS DEM files are available in the seadas_dem_modis.tar.gz SeaDAS distribution file.) (Default=NO)
Geo-populated pixels threshold for test (%) Percent of geo-populated pixels required to pass geocheck validation test. The geocheck validation test calculates the percentage of pixels that were not successfully geolocated and if this percentage is less than geocheck_threshold, the processing will assume failure and will not delete temporary processing files, including the log files. (Default=95)
Level 0 file start-time offset (seconds) Number of seconds of data to remove from the beginning of the L0 file to avoid geolocation problems due to unavailable packets. (Default=10)
Level 0 file stop-time offset (seconds) Number of seconds of data to remove from the end of the L0 file to avoid geolocation problems due to unavailable packets. (Default=10)
Make Default buttons These buttons will save the current state of the corresponding option as a default for future SeaDAS sessions. (If SeaDAS is exited after a Make Default action has occurred, SeaDAS must be run in a NEWLY OPENED xterm for the change to take effect.)
Log file The output file name for the processing log file if the user selects Submit.
Run To start the l1agen_modis program.
Submit To start and run the l1agen_modis program as a background process.
Help Online help for the l1agen_modis program.
Quit To quit this program.

Curator: OceanColor Webmaster

Authorized by: gene carl feldman
Privacy Policy and Important Notices

Updated: 24 March 2008
NASA logo