Permalink
Browse files

adding modis enhanced IR changes

  • Loading branch information...
1 parent c17eb11 commit 611261864451c4be9003b19c98618f636db099ea @evas-ssec evas-ssec committed Aug 28, 2013
@@ -31,6 +31,13 @@ aqua, modis, geo_1000m_nav, infrared, fog, fog,
aqua, modis, mod06_nav, cloud_top_temperature, none, btemp, 211e, 7362, CTT, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_4KM_CTT_%Y%m%d_%H%M.7362
aqua, modis, geo_1000m_nav, ndvi, none, contiguous_index, 211e, 7348, NDVI, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_1KM_NDVI_%Y%m%d_%H%M.7348
aqua, modis, mod07_nav, total_precipitable_water, none, distance, 211e, 7360, TPW, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_4KM_TPW_%Y%m%d_%H%M.7360
+# enhanced ir
+aqua, modis, geo_1000m_nav, ir_enh, 20, btemp_enh, 211e, 99999999, 3.75 um, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_1KM_4um_ENH_%Y%m%d_%H%M.99999999
+aqua, modis, geo_1000m_nav, ir_enh, 27, btemp_enh, 211e, 99999999, 6.7 um, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_1KM_WV_ENH_%Y%m%d_%H%M.99999999
+aqua, modis, geo_1000m_nav, ir_enh, 31, btemp_enh, 211e, 99999999, 11 um, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_1KM_IR_ENH_%Y%m%d_%H%M.99999999
+# end of enhanced ir
+
+
# Terra MODIS
terra, modis, geo_250m_nav, visible, 01, reflectance, 211e, 7340, 0.64 um, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_1KM_Visible_%Y%m%d_%H%M.7340
terra, modis, geo_250m_nav, visible, 02, reflectance, 211e, 7367, 0.83 um, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_1KM_Vis086_%Y%m%d_%H%M.7367
@@ -48,6 +55,12 @@ terra, modis, geo_1000m_nav, infrared, fog, fog,
terra, modis, mod06_nav, cloud_top_temperature, none, btemp, 211e, 7362, CTT, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_4KM_CTT_%Y%m%d_%H%M.7362
terra, modis, geo_1000m_nav, ndvi, none, contiguous_index, 211e, 7348, NDVI, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_1KM_NDVI_%Y%m%d_%H%M.7348
terra, modis, mod07_nav, total_precipitable_water, none, distance, 211e, 7360, TPW, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_4KM_TPW_%Y%m%d_%H%M.7360
+# enhanced ir
+terra, modis, geo_1000m_nav, ir_enh, 20, btemp_enh, 211e, 99999999, 3.75 um, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_1KM_4um_ENH_%Y%m%d_%H%M.99999999
+terra, modis, geo_1000m_nav, ir_enh, 27, btemp_enh, 211e, 99999999, 6.7 um, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_1KM_WV_ENH_%Y%m%d_%H%M.99999999
+terra, modis, geo_1000m_nav, ir_enh, 31, btemp_enh, 211e, 99999999, 11 um, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_1KM_IR_ENH_%Y%m%d_%H%M.99999999
+# end of enhanced ir
+
# TODO, this is missing a lot of information and I'm not planning to do the other versions of these lines until I've got that information
#terra, modis, ice_surface_temperature, none, btemp, 211e, 0000, IST, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_IST_%Y%m%d_%H%M.0000
@@ -67,6 +80,7 @@ npp, viirs, i_nav, i_enh, 05, btemp_enh, 211w,55779611,11.0 um,
npp, viirs, dnb_nav, dnb, none, radiance, 211w,55779612,DNB,SSEC,NPP-VIIRS,grid211w.ncml,SSEC_AWIPS_VIIRS-WCONUS_1KM_SVDNB_%Y%m%d_%H%M.55779612
npp, viirs, dnb_nav, dnb, new, radiance, 211w,55779614,DNB,SSEC,NPP-VIIRS,grid211w.ncml,SSEC_AWIPS_VIIRS-WCONUS_1KM_SVDNB_TRANS_%Y%m%d_%H%M.55779614
npp, viirs, i_nav, i, fog, fog, 211w,55779613,Fog,SSEC,NPP-VIIRS,grid211w.ncml,SSEC_AWIPS_VIIRS-WCONUS_1KM_SVIFOG_%Y%m%d_%H%M.55779613
+
# MODIS bands for this grid
# Aqua MODIS
aqua, modis, geo_250m_nav, visible, 01, reflectance, 211w, 7350, 0.64 um, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_1KM_Visible_%Y%m%d_%H%M.7350
@@ -85,6 +99,12 @@ aqua, modis, geo_1000m_nav, infrared, fog, fog,
aqua, modis, mod06_nav, cloud_top_temperature, none, btemp, 211w, 7382, CTT, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_4KM_CTT_%Y%m%d_%H%M.7382
aqua, modis, geo_1000m_nav, ndvi, none, contiguous_index, 211w, 7358, NDVI, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_1KM_NDVI_%Y%m%d_%H%M.7358
aqua, modis, mod07_nav, total_precipitable_water, none, distance, 211w, 7380, TPW, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_4KM_TPW_%Y%m%d_%H%M.7380
+# enhanced ir
+aqua, modis, geo_1000m_nav, ir_enh, 20, btemp_enh, 211w, 99999999, 3.75 um, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_1KM_4um_ENH_%Y%m%d_%H%M.99999999
+aqua, modis, geo_1000m_nav, ir_enh, 27, btemp_enh, 211w, 99999999, 6.7 um, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_1KM_WV_ENH_%Y%m%d_%H%M.99999999
+aqua, modis, geo_1000m_nav, ir_enh, 31, btemp_enh, 211w, 99999999, 11 um, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_1KM_IR_ENH_%Y%m%d_%H%M.99999999
+# end of enhanced ir
+
# Terra MODIS
terra, modis, geo_250m_nav, visible, 01, reflectance, 211w, 7350, 0.64 um, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_1KM_Visible_%Y%m%d_%H%M.7350
terra, modis, geo_250m_nav, visible, 02, reflectance, 211w, 7387, 0.83 um, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_1KM_Vis086_%Y%m%d_%H%M.7387
@@ -102,6 +122,11 @@ terra, modis, geo_1000m_nav, infrared, fog, fog,
terra, modis, mod06_nav, cloud_top_temperature, none, btemp, 211w, 7382, CTT, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_4KM_CTT_%Y%m%d_%H%M.7382
terra, modis, geo_1000m_nav, ndvi, none, contiguous_index, 211w, 7358, NDVI, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_1KM_NDVI_%Y%m%d_%H%M.7358
terra, modis, mod07_nav, total_precipitable_water, none, distance, 211w, 7380, TPW, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_4KM_TPW_%Y%m%d_%H%M.7380
+# enhanced ir
+terra, modis, geo_1000m_nav, ir_enh, 20, btemp_enh, 211w, 99999999, 3.75 um, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_1KM_4um_ENH_%Y%m%d_%H%M.99999999
+terra, modis, geo_1000m_nav, ir_enh, 27, btemp_enh, 211w, 99999999, 6.7 um, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_1KM_WV_ENH_%Y%m%d_%H%M.99999999
+terra, modis, geo_1000m_nav, ir_enh, 31, btemp_enh, 211w, 99999999, 11 um, SSEC, MODIS, grid211w.ncml, SSEC_AWIPS_MODIS_WEST_1KM_IR_ENH_%Y%m%d_%H%M.99999999
+# end of enhanced ir
#
### Grid 203 - Alaska ###
@@ -128,6 +153,7 @@ npp, viirs, i_nav, i_enh, 05, btemp_enh, 204,55779627,11.0 um,S
npp, viirs, dnb_nav, dnb, none, radiance, 204,55779628,DNB,SSEC,NPP-VIIRS,grid204.ncml,SSEC_AWIPS_VIIRS-HI_1KM_SVDNB_%Y%m%d_%H%M.55779628
npp, viirs, dnb_nav, dnb, new, radiance, 204,55779630,DNB,SSEC,NPP-VIIRS,grid204.ncml,SSEC_AWIPS_VIIRS-HI_1KM_SVDNB_TRANS_%Y%m%d_%H%M.55779630
npp, viirs, i_nav, i, fog, fog, 204,55779629,Fog,SSEC,NPP-VIIRS,grid204.ncml,SSEC_AWIPS_VIIRS-HI_1KM_SVIFOG_%Y%m%d_%H%M.55779629
+
# Aqua MODIS
aqua, modis, geo_250m_nav, visible, 01, reflectance, 204, 55777350, 0.64 um, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_Visible_%Y%m%d_%H%M.55777350
aqua, modis, geo_250m_nav, visible, 02, reflectance, 204, 55777387, 0.83 um, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_Vis086_%Y%m%d_%H%M.55777387
@@ -145,6 +171,12 @@ aqua, modis, geo_1000m_nav, infrared, fog, fog,
aqua, modis, mod06_nav, cloud_top_temperature, none, btemp, 204, 55777382, CTT, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_4KM_CTT_%Y%m%d_%H%M.55777382
aqua, modis, geo_1000m_nav, ndvi, none, contiguous_index, 204, 55777358, NDVI, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_NDVI_%Y%m%d_%H%M.55777358
aqua, modis, mod07_nav, total_precipitable_water, none, distance, 204, 55777380, TPW, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_4KM_TPW_%Y%m%d_%H%M.55777380
+# enhanced ir
+aqua, modis, geo_1000m_nav, ir_enh, 20, btemp_enh, 204, 99999999, 3.75 um, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_4um_ENH_%Y%m%d_%H%M.99999999
+aqua, modis, geo_1000m_nav, ir_enh, 27, btemp_enh, 204, 99999999, 6.7 um, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_WV_ENH_%Y%m%d_%H%M.99999999
+aqua, modis, geo_1000m_nav, ir_enh, 31, btemp_enh, 204, 99999999, 11 um, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_IR_ENH_%Y%m%d_%H%M.99999999
+# end of enhanced ir
+
# Terra MODIS
terra, modis, geo_250m_nav, visible, 01, reflectance, 204, 55777350, 0.64 um, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_Visible_%Y%m%d_%H%M.55777350
terra, modis, geo_250m_nav, visible, 02, reflectance, 204, 55777387, 0.83 um, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_Vis086_%Y%m%d_%H%M.55777387
@@ -162,4 +194,9 @@ terra, modis, geo_1000m_nav, infrared, fog, fog,
terra, modis, mod06_nav, cloud_top_temperature, none, btemp, 204, 55777382, CTT, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_4KM_CTT_%Y%m%d_%H%M.55777382
terra, modis, geo_1000m_nav, ndvi, none, contiguous_index, 204, 55777358, NDVI, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_NDVI_%Y%m%d_%H%M.55777358
terra, modis, mod07_nav, total_precipitable_water, none, distance, 204, 55777380, TPW, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_4KM_TPW_%Y%m%d_%H%M.55777380
+# enhanced ir
+terra, modis, geo_1000m_nav, ir_enh, 20, btemp_enh, 204, 99999999, 3.75 um, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_4um_ENH_%Y%m%d_%H%M.99999999
+terra, modis, geo_1000m_nav, ir_enh, 27, btemp_enh, 204, 99999999, 6.7 um, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_WV_ENH_%Y%m%d_%H%M.99999999
+terra, modis, geo_1000m_nav, ir_enh, 31, btemp_enh, 204, 99999999, 11 um, SSEC, MODIS, grid204.ncml, SSEC_AWIPS_MODIS_HI_1KM_IR_ENH_%Y%m%d_%H%M.99999999
+# end of enhanced ir
@@ -67,6 +67,7 @@ def process_data_sets(nav_set_uid, filepaths,
forced_grid=None,
forced_gpd=None, forced_nc=None,
create_pseudo=True,
+ create_enhanced_ir=False,
num_procs=1,
rescale_config=None,
backend_config=None
@@ -98,6 +99,7 @@ def process_data_sets(nav_set_uid, filepaths,
nav_set_uid,
filepaths,
create_fog=create_pseudo,
+ create_enhanced_ir=create_enhanced_ir,
cut_bad=True
)
except StandardError:
@@ -304,6 +306,8 @@ def main(argv = sys.argv[1:]):
# Frontend and product filtering related
parser.add_argument('--no-pseudo', dest='create_pseudo', default=True, action='store_false',
help="Don't create pseudo bands")
+ parser.add_argument('--create-enh-ir', dest='create_enhanced_ir', default=False, action='store_true',
+ help="Create enhanced IR bands using adaptive scaling")
# Remapping/Grids
parser.add_argument('--grid-configs', dest='grid_configs', nargs="+", default=tuple(),
@@ -407,6 +411,7 @@ def main(argv = sys.argv[1:]):
forced_grid=forced_grids,
forced_gpd=args.forced_gpd, forced_nc=args.forced_nc,
create_pseudo=args.create_pseudo,
+ create_enhanced_ir=args.create_enhanced_ir,
multiprocess=not args.single_process, num_procs=num_procs,
rescale_config=args.rescale_config,
backend_config=args.backend_config
@@ -381,7 +381,8 @@ def _calculate_weights (tile_size) :
# return the weights for an ideal center tile
return template_tile
-def _linear_normalization_from_0to1 (data, mask, theoretical_max, theoretical_min=0, message=" normalizing DNB data into 0 to 1 range") :
+def _linear_normalization_from_0to1 (data, mask, theoretical_max, theoretical_min=0, message=" normalizing equalized data to fit in 0 to 1 range") :
+ #" normalizing DNB data into 0 to 1 range") :
"""
do a linear normalization so all data is in the 0 to 1 range. This is a sloppy but fast calculation that relies on parameters
giving it the correct theoretical current max and min so it can scale the data accordingly.
@@ -306,7 +306,9 @@ def ndvi_scale (data,
DKIND_RADIANCE : (linear_scale, (255.0,0)),
DKIND_REFLECTANCE : (sqrt_scale, (100.0, 25.5)),
DKIND_BTEMP : (bt_scale, (242.0,660.0,2,418.0,1)),
- DKIND_FOG : (fog_scale, (10.0,105.0,5,4,205,206))
+ DKIND_FOG : (fog_scale, (10.0,105.0,5,4,205,206)),
+
+ DKIND_BTEMP_ENHANCED : (linear_scale, (255.0,0)), # TODO, this is probably in the wrong place
# TODO, add defaults for category, angle, distance, percent, and contiguous index
}
@@ -329,6 +331,7 @@ def default_config_dir(self):
'unlinear' : unlinear_scale,
'raw' : passive_scale,
'btemp' : bt_scale,
+ 'btemp_enh': linear_scale, # TODO, this probably shouldn't go here?
'fog' : fog_scale,
'btemp_c' : bt_scale_c,
'btemp_lin': bt_scale_linear,
@@ -42,6 +42,11 @@ aqua, modis, geo_1000m_nav, visible, 26, reflecta
aqua, modis, geo_1000m_nav, infrared, 20, btemp, btemp, 242.0, 660, 2, 418, 1
aqua, modis, geo_1000m_nav, infrared, 27, btemp, btemp, 242.0, 660, 2, 418, 1
aqua, modis, geo_1000m_nav, infrared, 31, btemp, btemp, 242.0, 660, 2, 418, 1
+# enhanced ir
+aqua, modis, geo_1000m_nav, ir_enh, 20, btemp_enh, linear, 255.0, 0.0
+aqua, modis, geo_1000m_nav, ir_enh, 27, btemp_enh, linear, 255.0, 0.0
+aqua, modis, geo_1000m_nav, ir_enh, 31, btemp_enh, linear, 255.0, 0.0
+# end of enhanced ir
aqua, modis, geo_1000m_nav, sea_surface_temp, none, btemp, linear, 6.0, 35.0
aqua, modis, geo_1000m_nav, land_surface_temp, none, btemp, lst, 233.2, 322.0, 5, 245
aqua, modis, geo_1000m_nav, summer_land_surface_temp, none, btemp, lst, 255.4, 344.3, 5, 245
@@ -59,6 +64,11 @@ terra, modis, geo_1000m_nav, visible, 26, reflecta
terra, modis, geo_1000m_nav, infrared, 20, btemp, btemp, 242.0, 660, 2, 418, 1
terra, modis, geo_1000m_nav, infrared, 27, btemp, btemp, 242.0, 660, 2, 418, 1
terra, modis, geo_1000m_nav, infrared, 31, btemp, btemp, 242.0, 660, 2, 418, 1
+# enhanced ir
+terra, modis, geo_1000m_nav, ir_enh, 20, btemp_enh, linear, 255.0, 0.0
+terra, modis, geo_1000m_nav, ir_enh, 27, btemp_enh, linear, 255.0, 0.0
+terra, modis, geo_1000m_nav, ir_enh, 31, btemp_enh, linear, 255.0, 0.0
+# end of enhanced ir
terra, modis, geo_1000m_nav, sea_surface_temp, none, btemp, linear, 6.0, 35.0
terra, modis, geo_1000m_nav, land_surface_temp, none, btemp, lst, 233.2, 322.0, 5, 245
terra, modis, geo_1000m_nav, summer_land_surface_temp, none, btemp, lst, 255.4, 344.3, 5, 245
@@ -149,6 +149,7 @@ def known_rescale_kinds(self):
# allocated/instantiated every time it's used
_known_data_kinds = {
'brightnesstemperature': DKIND_BTEMP,
+ 'enhanced_brightnesstemperature': DKIND_BTEMP_ENHANCED,
}
@property
Oops, something went wrong.

0 comments on commit 6112618

Please sign in to comment.