Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature crefl composites #7

Merged
merged 20 commits into from
Mar 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
840a260
Add original python crefl code from Ralph Kuehn
djhoese Mar 14, 2016
c5e776b
Make crefl utils more pythonic
djhoese Mar 14, 2016
94d4f82
Add `datasets` keyword to save_datasets to more easily filter by name
djhoese Mar 14, 2016
30f22ca
Add M band solar angles and sensor/satellite angles
djhoese Mar 14, 2016
688a7f7
Fix crefl utils bug and other code clean up
djhoese Mar 14, 2016
67bf14d
Clean up crefl utils and rename main function to run_crefl
djhoese Mar 15, 2016
0fc1f5d
Add basic crefl compositor
djhoese Mar 15, 2016
065095b
Fix crefl composite when given percentage reflectances
djhoese Mar 15, 2016
0ca6ac8
Remove filling masked values in crefl utils
djhoese Mar 15, 2016
fc93872
Fix Dataset `mask` keyword being passed to MaskedArray
djhoese Mar 15, 2016
9829b34
Fix crefl utils to use resolution and sensor name to find coefficients
djhoese Mar 16, 2016
701c3de
Update crefl true color to pan sharpen with I01 if available
djhoese Mar 16, 2016
3fa6563
Rename VIIRS SDR solar and sensor angle datasets
djhoese Mar 16, 2016
9cdfe78
Fix bug in Scene where composite prereqs aren't removed after resampling
djhoese Mar 18, 2016
179d75d
Add sunz correction to CREFL compositor
djhoese Mar 18, 2016
34164bd
Cleanup crefl code a bit
djhoese Mar 18, 2016
52a1a33
Add angle datasets to viirs l1b for crefl true color to work
djhoese Mar 18, 2016
bfb1c1a
Modify `combine_info` to work on multiple datasets
djhoese Mar 18, 2016
a0f95aa
Add info dictionary to Areas created in the base reader
djhoese Mar 18, 2016
a14d8c2
Remove ValueError from combine_info for one argument
djhoese Mar 18, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading