Skip to content

Commit

Permalink
Merge pull request #757 from djhoese/bugfix-modis-l1b
Browse files Browse the repository at this point in the history
Fix MODIS L1B and L2 readers not reading geolocation properly
  • Loading branch information
djhoese authored May 8, 2019
2 parents 8fd35b3 + 880bc40 commit d13b670
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 113 deletions.
45 changes: 23 additions & 22 deletions satpy/etc/readers/modis_l1b.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -405,32 +405,33 @@ datasets:
- 14.235
- 14.385

longitude1k:
file_type: hdf_eos_geo
longitude:
name: longitude
resolution: [1000, 500, 250]
standard_name: longitude
units: degree

latitude1k:
file_type: hdf_eos_geo
name: latitude
resolution: [1000, 500, 250]
standard_name: latitude
units: degree

# For EUM reduced (thinned) files
longitude5k:
file_type: hdf_eos_data_1000m
name: longitude
resolution: [5000, 1000]
resolution:
5000:
# For EUM reduced (thinned) files
file_type: hdf_eos_data_1000m
1000:
file_type: [hdf_eos_geo, hdf_eos_data_1000m]
500:
file_type: hdf_eos_geo
250:
file_type: hdf_eos_geo
standard_name: longitude
units: degree

latitude5k:
file_type: hdf_eos_data_1000m
latitude:
name: latitude
resolution: [5000, 1000]
resolution:
5000:
# For EUM reduced (thinned) files
file_type: hdf_eos_data_1000m
1000:
file_type: [hdf_eos_geo, hdf_eos_data_1000m]
500:
file_type: hdf_eos_geo
250:
file_type: hdf_eos_geo
standard_name: latitude
units: degree

Expand Down Expand Up @@ -497,4 +498,4 @@ file_types:
- 'M{platform_indicator:1s}D03.A{start_time:%Y%j.%H%M}.{collection:03d}{suffix}.hdf'
- 'M{platform_indicator:1s}D03.{start_time:%y%j%H%M%S}.hdf'
- '{platform_indicator:1s}1.{start_time:%y%j.%H%M}.geo.hdf'
file_reader: !!python/name:satpy.readers.modis_l1b.HDFEOSGeoReader ''
file_reader: !!python/name:satpy.readers.modis_l1b.HDFEOSGeoReader
43 changes: 34 additions & 9 deletions satpy/etc/readers/modis_l2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@ reader:
sensors: [modis]

file_types:
hdf:
mod35_hdf:
file_patterns:
- 'M{platform_indicator:1s}D35_L2.A{acquisition_time:%Y%j.%H%M}.{collection:03d}.{production_time:%Y%j%H%M%S}.hdf'
file_reader: !!python/name:satpy.readers.modis_l2.ModisL2HDFFileHandler
hdf_eos_geo:
file_patterns:
- 'M{platform_indicator:1s}D03_A{start_time:%y%j_%H%M%S}_{processing_time:%Y%j%H%M%S}.hdf'
- 'M{platform_indicator:1s}D03.A{start_time:%Y%j.%H%M}.{collection:03d}.{processing_time:%Y%j%H%M%S}.hdf'
- 'M{platform_indicator:1s}D03.A{start_time:%Y%j.%H%M}.{collection:03d}{suffix}.hdf'
- 'M{platform_indicator:1s}D03.{start_time:%y%j%H%M%S}.hdf'
- '{platform_indicator:1s}1.{start_time:%y%j.%H%M}.geo.hdf'
file_reader: !!python/name:satpy.readers.modis_l1b.HDFEOSGeoReader

datasets:
cloud_mask:
Expand All @@ -32,21 +40,37 @@ datasets:
quality_assurance:
- 250: True
file_key: Cloud_Mask
file_type: hdf
file_type: mod35_hdf
coordinates: [longitude, latitude]

longitude:
name: longitude
resolution:
5000:
file_type: mod35_hdf
1000:
file_type: [hdf_eos_geo, mod35_hdf]
500:
file_type: hdf_eos_geo
250:
file_type: hdf_eos_geo
standard_name: longitude
units: degree
resolution: [1000, 5000]
file_key: Longitude
file_type: hdf

latitude:
name: latitude
resolution:
5000:
# For EUM reduced (thinned) files
file_type: mod35_hdf
1000:
file_type: [hdf_eos_geo, mod35_hdf]
500:
file_type: hdf_eos_geo
250:
file_type: hdf_eos_geo
standard_name: latitude
units: degree
resolution: [1000, 5000]
file_key: Latitude
file_type: hdf

quality_assurance:
# byte Quality_Assurance(Cell_Along_Swath_1km, Cell_Across_Swath_1km, QA_Dimension)
Expand All @@ -59,5 +83,6 @@ datasets:
bit_start: 0
bit_count: 1
file_key: Quality_Assurance
file_type: hdf
file_type: mod35_hdf
coordinates: [longitude, latitude]

Loading

0 comments on commit d13b670

Please sign in to comment.