Skip to content

Commit

Permalink
Merge pull request #7 from davidh-ssec/feature-crefl-composites
Browse files Browse the repository at this point in the history
Feature crefl composites
  • Loading branch information
djhoese committed Mar 18, 2016
2 parents ecaaef5 + a14d8c2 commit 4724a1d
Show file tree
Hide file tree
Showing 9 changed files with 653 additions and 38 deletions.
49 changes: 49 additions & 0 deletions etc/composites/viirs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,55 @@ compositor=satpy.composites.viirs.VIIRSTrueColor
prerequisites=M05,M04,M03
sensor=viirs

[composite:viirs_crefl_true_color]
name=crefl_true_color
standard_name=true_color
compositor=satpy.composites.viirs.VIIRSSharpTrueColor
prerequisites=crefl_M05,crefl_M04,crefl_M03
optional_prerequisites=crefl_I01
high_resolution_band=red
sensor=viirs

[composite:crefl_m05]
name=crefl_M05
standard_name=corrected_reflectance
compositor=satpy.composites.viirs.CorrectedReflectance
dem_filename=/Users/davidh/repos/git/polar2grid/viirs_crefl/CMGDEM.hdf
prerequisites=M05,M_SENA,M_SENZ,M_SOLA,M_SOLZ
sensor=viirs
metadata=sunz_corrected
modifiers=sunz_correction

[composite:crefl_m04]
name=crefl_M04
standard_name=corrected_reflectance
compositor=satpy.composites.viirs.CorrectedReflectance
dem_filename=/Users/davidh/repos/git/polar2grid/viirs_crefl/CMGDEM.hdf
prerequisites=M04,M_SENA,M_SENZ,M_SOLA,M_SOLZ
sensor=viirs
metadata=sunz_corrected
modifiers=sunz_correction

[composite:crefl_m03]
name=crefl_M03
standard_name=corrected_reflectance
compositor=satpy.composites.viirs.CorrectedReflectance
dem_filename=/Users/davidh/repos/git/polar2grid/viirs_crefl/CMGDEM.hdf
prerequisites=M03,M_SENA,M_SENZ,M_SOLA,M_SOLZ
sensor=viirs
metadata=sunz_corrected
modifiers=sunz_correction

[composite:crefl_i01]
name=crefl_I01
standard_name=corrected_reflectance
compositor=satpy.composites.viirs.CorrectedReflectance
dem_filename=/Users/davidh/repos/git/polar2grid/viirs_crefl/CMGDEM.hdf
prerequisites=I01,M_SENA,M_SENZ,M_SOLA,M_SOLZ
sensor=viirs
metadata=sunz_corrected
modifiers=sunz_correction

[composite:viirs_sharp_true_color]
name=sharp_true_color
standard_name=true_color
Expand Down
44 changes: 44 additions & 0 deletions etc/readers/viirs_l1b.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,38 @@ file_type=vl1bm,vl1bm
file_key=m16,m16_radiance
calibration=brightness_temperature,radiance

[dataset:m_solz]
name=M_SOLZ
standard_name=solar_zenith_angle
resolution=742
navigation=vgeom
file_type=vgeom
file_key=solar_zenith_angle

[dataset:m_sola]
name=M_SOLA
standard_name=solar_azimuth_angle
resolution=742
navigation=vgeom
file_type=vgeom
file_key=solar_azimuth_angle

[dataset:m_senz]
name=M_SENZ
standard_name=sensor_zenith_angle
resolution=742
navigation=vgeom
file_type=vgeom
file_key=sensor_zenith_angle

[dataset:m_sena]
name=M_SENA
standard_name=sensor_azimuth_angle
resolution=742
navigation=vgeom
file_type=vgeom
file_key=sensor_azimuth_angle

; I band Datasets
[dataset:I01]
name=I01
Expand Down Expand Up @@ -336,6 +368,18 @@ variable_name=geolocation_data/latitude
variable_name=geolocation_data/solar_zenith
scaling_factors=geolocation_data/solar_zenith/attr/scale_factor,geolocation_data/solar_zenith/attr/add_offset

[file_key:solar_azimuth_angle]
variable_name=geolocation_data/solar_azimuth
scaling_factors=geolocation_data/solar_azimuth/attr/scale_factor,geolocation_data/solar_azimuth/attr/add_offset

[file_key:sensor_zenith_angle]
variable_name=geolocation_data/sensor_zenith
scaling_factors=geolocation_data/sensor_zenith/attr/scale_factor,geolocation_data/sensor_zenith/attr/add_offset

[file_key:sensor_azimuth_angle]
variable_name=geolocation_data/sensor_azimuth
scaling_factors=geolocation_data/sensor_azimuth/attr/scale_factor,geolocation_data/sensor_azimuth/attr/add_offset

[file_key:lunar_zenith_angle]
variable_name=geolocation_data/lunar_zenith
scaling_factors=geolocation_data/lunar_zenith/attr/scale_factor,geolocation_data/lunar_zenith/attr/add_offset
Expand Down
55 changes: 55 additions & 0 deletions etc/readers/viirs_sdr.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ resolution=742,742
file_type=svm01,svm01
file_key=reflectance,radiance
calibration=reflectance,radiance
sunz_corrected=true

[dataset:m02]
name=M02
Expand All @@ -74,6 +75,7 @@ resolution=742
navigation=gmtco
file_type=svm02
file_key=reflectance
sunz_corrected=true

[dataset:m03]
name=M03
Expand All @@ -83,6 +85,7 @@ resolution=742
navigation=gmtco
file_type=svm03
file_key=reflectance
sunz_corrected=true

[dataset:m04]
name=M04
Expand All @@ -92,6 +95,7 @@ resolution=742
navigation=gmtco
file_type=svm04
file_key=reflectance
sunz_corrected=true

[dataset:m05]
name=M05
Expand All @@ -101,6 +105,7 @@ resolution=742
navigation=gmtco
file_type=svm05
file_key=reflectance
sunz_corrected=true

[dataset:m06]
name=M06
Expand All @@ -110,6 +115,7 @@ resolution=742
navigation=gmtco
file_type=svm06
file_key=reflectance
sunz_corrected=true

[dataset:m07]
name=M07
Expand All @@ -119,6 +125,7 @@ resolution=742
navigation=gmtco
file_type=svm07
file_key=reflectance
sunz_corrected=true

[dataset:m08]
name=M08
Expand All @@ -128,6 +135,7 @@ resolution=742
navigation=gmtco
file_type=svm08
file_key=reflectance
sunz_corrected=true

[dataset:m09]
name=M09
Expand All @@ -137,6 +145,7 @@ resolution=742
navigation=gmtco
file_type=svm09
file_key=reflectance
sunz_corrected=true

[dataset:m10]
name=M10
Expand All @@ -146,6 +155,7 @@ resolution=742
navigation=gmtco
file_type=svm10
file_key=reflectance
sunz_corrected=true

[dataset:m11]
name=M11
Expand All @@ -155,6 +165,7 @@ resolution=742
navigation=gmtco
file_type=svm11
file_key=reflectance
sunz_corrected=true

[dataset:m12]
name=M12
Expand Down Expand Up @@ -201,6 +212,38 @@ navigation=gmtco
file_type=svm16
file_key=brightness_temperature

[dataset:m_solz]
name=M_SOLZ
standard_name=solar_zenith_angle
resolution=742
navigation=gmtco
file_type=gmtco
file_key=solar_zenith_angle

[dataset:m_sola]
name=M_SOLA
standard_name=solar_azimuth_angle
resolution=742
navigation=gmtco
file_type=gmtco
file_key=solar_azimuth_angle

[dataset:m_senz]
name=M_SENZ
standard_name=sensor_zenith_angle
resolution=742
navigation=gmtco
file_type=gmtco
file_key=sensor_zenith_angle

[dataset:m_sena]
name=M_SENA
standard_name=sensor_azimuth_angle
resolution=742
navigation=gmtco
file_type=gmtco
file_key=sensor_azimuth_angle

# I-bands:
[dataset:i01]
name=I01
Expand All @@ -210,6 +253,7 @@ resolution=371
navigation=gitco
file_type=svi01
file_key=reflectance
sunz_corrected=true

[dataset:i02]
name=I02
Expand All @@ -219,6 +263,7 @@ resolution=371
navigation=gitco
file_type=svi02
file_key=reflectance
sunz_corrected=true

[dataset:i03]
name=I03
Expand All @@ -228,6 +273,7 @@ resolution=371
navigation=gitco
file_type=svi03
file_key=reflectance
sunz_corrected=true

[dataset:i04]
name=I04
Expand Down Expand Up @@ -482,6 +528,15 @@ variable_name=All_Data/{file_group}_All/BrightnessTemperatureFactors
[file_key:solar_zenith_angle]
variable_name=All_Data/{file_group}_All/SolarZenithAngle

[file_key:sensor_zenith_angle]
variable_name=All_Data/{file_group}_All/SatelliteZenithAngle

[file_key:solar_azimuth_angle]
variable_name=All_Data/{file_group}_All/SolarAzimuthAngle

[file_key:sensor_azimuth_angle]
variable_name=All_Data/{file_group}_All/SatelliteAzimuthAngle

[file_key:lunar_zenith_angle]
variable_name=All_Data/{file_group}_All/LunarZenithAngle

Expand Down
4 changes: 4 additions & 0 deletions satpy/composites/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ def __init__(self, name, prerequisites=[], optional_prerequisites=[], metadata_r
kwargs["prerequisites"] = prerequisites
kwargs["optional_prerequisites"] = optional_prerequisites
kwargs["metadata_requirements"] = metadata_requirements
if "modifiers" in kwargs:
kwargs["modifiers"] = kwargs["modifiers"].split(",")
else:
kwargs["modifiers"] = []
super(CompositeBase, self).__init__(**kwargs)

def __call__(self, datasets, optional_datasets=None, **info):
Expand Down

0 comments on commit 4724a1d

Please sign in to comment.