[GRASS-SVN] r54707 - in grass-addons/grass7/raster/r.modis: libmodis r.modis.import

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 19 01:29:06 PST 2013


Author: lucadelu
Date: 2013-01-19 01:29:05 -0800 (Sat, 19 Jan 2013)
New Revision: 54707

Modified:
   grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py
   grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py
Log:
add surface reflectance product

Modified: grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py
===================================================================
--- grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py	2013-01-18 22:38:19 UTC (rev 54706)
+++ grass-addons/grass7/raster/r.modis/libmodis/rmodislib.py	2013-01-19 09:29:05 UTC (rev 54707)
@@ -84,6 +84,14 @@
         snow_color = ['gyr']  # TODO CREATE THE COLOR TABLE FOR MODIS_SNOW
         snow8_suff = {'.Maximum_Snow_Extent': None, '.Eight_Day_Snow_Cover': None}
         lstL2_spec = 'LST; QC; Error_LST; Emis_31; Emis_32; View_angle; View_time'
+        ### values of surface reflectance product:
+        surf_spec = '( 1 1 1 1 1 1 1 0 0 0 0 0 0 )'
+        surf_specqa = '( 1 1 1 1 1 1 1 1 0 0 0 0 0 )'
+        surf_suff = {'.sur_refl_b01': '.sur_refl_qc_500m', '.sur_refl_b02':
+                     '.sur_refl_qc_500m', '.sur_refl_b03': '.sur_refl_qc_500m',
+                     '.sur_refl_b04': '.sur_refl_qc_500m', '.sur_refl_b05': 
+                     '.sur_refl_qc_500m', '.sur_refl_b06': '.sur_refl_qc_500m',
+                     '.sur_refl_b07': '.sur_refl_qc_500m'}
 
         self.prod = value
         lst = {'lst_aqua_daily_1000': {'url': urlbase, 'pattern': lst_patt,
@@ -161,6 +169,26 @@
                                          'color': vi_color
               }
         }
+        surf_refl = {'surfreflec_terra_eight_500': {'url': urlbase,
+                                                    'pattern': None,
+                                                    'folder': 'MOLT/MOD09A1.005',
+                                                    'spec': surf_spec,
+                                                    'spec_qa': surf_specqa,
+                                                    'res': 500,
+                                                    'color': snow_color,
+                                                    'suff': surf_suff
+                                                   },
+                     'surfreflec_aqua_eight_500': {'url': urlbase,
+                                                   'pattern': None,
+                                                   'folder': 'MOLA/MYD09A1.005',
+                                                   'spec': surf_spec,
+                                                   'spec_qa': surf_specqa,
+                                                   'res': 500,
+                                                   'color': snow_color,
+                                                   'suff': surf_suff
+                                                  }
+        
+        }
         snow = {'snow_terra_daily_500': {'url': usrsnow, 'pattern': snow1_patt,
                                          'folder': 'SAN/MOST/MOD10A1.005',
                                          'spec': snow1_spec,
@@ -194,6 +222,7 @@
         self.products.update(lst)
         self.products.update(vi)
         self.products.update(snow)
+        self.products.update(surf_refl)
         self.products_swath = {'lst_terra_daily': {'url': urlbase,
                                                    'folder': 'MOLT/MOD11_L2.005',
                                                    'spec': lstL2_spec},

Modified: grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py
===================================================================
--- grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py	2013-01-18 22:38:19 UTC (rev 54706)
+++ grass-addons/grass7/raster/r.modis/r.modis.import/r.modis.import.py	2013-01-19 09:29:05 UTC (rev 54707)
@@ -499,7 +499,7 @@
     # return an error if q and spectral are set
     if not flags['q'] and options['spectral'] != '':
         grass.warning(_('If no QA layer chosen in the "spectral" option'\
-        + 'the command will report an error'))
+        + ' the command will report an error'))
     # return an error if both dns and files option are set or not
     if options['dns'] == '' and options['files'] == '':
         grass.fatal(_('Choose one of "dns" or "files" options'))



More information about the grass-commit mailing list