#!/bin/sh ##Seadas 6.2 version only ## Working folders input="/media/1TB_data/MODIS/test/L1A_to_L1B" output="/media/600_data/MODIS/L1B_Balt_processing/NEW" ### first define the region to be extracted from your MODIS L1A files # NOTE! change these for your own region of interest SWlon=15.5 SWlat=54.1 NElon=24.4 NElat=59 ## L1A filename: 2008158.1045.005_MOD01.hdf cd $input for FILE in *_MOD01.hdf do # The line below assumes an extension, and creates a base name without that extension BASE=`echo $FILE |awk -F. '{ print $1 "." $2 }'` GEOFILE=${BASE}_T.GEO L1ASUB=${BASE}.T_Balt_L1A.hdf GEOSUB=$output/${BASE}.T_Balt.GEO L1B1KM=$output/${BASE}.T_1KM_Balt.L1B L1BHKM=$output/${BASE}.T_HKM_Balt.L1B L1BQKM=$output/${BASE}.T_QKM_Balt.L1B ### process the L1A file to GEO modis_GEO.csh $FILE -o $GEOFILE # extract a subscene from the MODIS file modis_L1A_extract.csh $FILE $GEOFILE $SWlon $SWlat $NElon $NElat $L1ASUB $GEOSUB # process the L1A/GEO subscene files to L1B modis_L1B.csh $L1ASUB $GEOSUB -o $L1B1KM -h $L1BHKM -q $L1BQKM echo; echo done