Skip to content

Commit

Permalink
Merge pull request #615 from djhoese/feat-abi-aod-lst
Browse files Browse the repository at this point in the history
Add AOD and LST to ABI L2
  • Loading branch information
djhoese committed Aug 7, 2023
2 parents 6fe6686 + 369cbb2 commit 47d3ef2
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 30 deletions.
2 changes: 1 addition & 1 deletion doc/source/custom_grids.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Example Grid Configuration File: :download:`grid_example.yaml <../../swbundle/gr

Grid configuration files follow the format used by the Satpy and Pyresample
Python libraries in their
:doc:`areas.yaml files <pyresample:geometry_utils>` and are in the
:doc:`areas.yaml files <pyresample:howtos/geometry_utils>` and are in the
`YAML text format <https://en.wikipedia.org/wiki/YAML>`_.
Comments can be added by prefixing lines with a ``#`` character. There is an
example file provided in the |project| bundle at:
Expand Down
56 changes: 28 additions & 28 deletions etc/colormaps/abi_l2_modified_cloud_top.cmap
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
0.0,127,0,127
16.9983,127,0,127
17.00085,150,75,20
33.99915,150,75,20
34.0017,255,171,127
51.0,255,171,127
51.00255,255,127,0
67.9983,255,127,0
68.00085,255,255,50
84.99915,255,255,50
85.0017,220,220,40
102.0,220,220,40
102.00255,58,135,0
118.9983,58,135,0
119.00085,75,175,0
135.99915,75,175,0
136.0017,100,200,130
153.0,100,200,130
153.00255,112,219,147
169.9983,112,219,147
170.00084999999999,120,120,240
186.99915000000001,120,120,240
187.0017,150,150,245
204.0,150,150,245
204.00255,180,180,250
220.9983,180,180,250
221.00085,225,225,255
237.99915,225,225,255
238.0017,255,255,255
17.000001,127,0,127
17.000002,150,75,20
34.000001,150,75,20
34.000002,255,171,127
51.000001,255,171,127
51.000002,255,127,0
68.000001,255,127,0
68.000002,255,255,50
85.000001,255,255,50
85.000002,220,220,40
102.000001,220,220,40
102.000002,58,135,0
119.000001,58,135,0
119.000002,75,175,0
136.000001,75,175,0
136.000002,100,200,130
153.000001,100,200,130
153.000002,112,219,147
170.000001,112,219,147
170.000002,120,120,240
187.000001,120,120,240
187.000002,150,150,245
204.000001,150,150,245
204.000002,180,180,250
221.000001,180,180,250
221.000002,225,225,255
238.000001,225,225,255
238.000002,255,255,255
255.0,255,255,255
22 changes: 22 additions & 0 deletions etc/enhancements/abi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ enhancements:
kwargs: {stretch: 'crude', min_stretch: 280., max_stretch: 180.}

# Level 2
aerosol_optical_depth:
name: AOD
operations:
- name: colorize
method: !!python/name:satpy.enhancements.colorize
kwargs:
palettes:
- filename: colormaps/abi_l2_modified_cloud_top.cmap
min_value: 0.0
max_value: 1.0

cloud_top_height:
name: HT
operations:
Expand All @@ -43,6 +54,17 @@ enhancements:
min_value: -300
max_value: 20000

land_surface_temp:
name: LST
operations:
- name: colorize
method: !!python/name:satpy.enhancements.colorize
kwargs:
palettes:
- filename: colormaps/abi_l2_modified_cloud_top.cmap
min_value: 223.15
max_value: 323.15

cloud_top_temperature:
name: TEMP
operations:
Expand Down
8 changes: 8 additions & 0 deletions etc/resampling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ resampling:
kwargs:
weight_delta_max: 40.0
weight_distance_max: 2.0
default_viirs_edr:
area_type: swath
sensor: viirs
reader: viirs_edr
resampler: ewa
kwargs:
weight_delta_max: 40.0
weight_distance_max: 2.0
default_nucaps:
area_type: swath
reader: nucaps
Expand Down
10 changes: 9 additions & 1 deletion integration_tests/features/steps/compare_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ def step_impl_input_data(context, source):

@given("an empty working directory")
def step_impl_empty_work_dir(context):
context.temp_dir = tempfile.mkdtemp(prefix=os.path.join(context.base_temp_dir, "p2g_tests_"))
prefix = os.path.join(context.base_temp_dir, "p2g_tests__")
scen_name = context.scenario.name
if "@" in scen_name:
# "outline" test
outline_info = scen_name[scen_name.find("@") + 1 :].strip()
outline_info = outline_info.replace(" ", "_").replace(".", "-").lower()
prefix += outline_info + "__"

context.temp_dir = tempfile.mkdtemp(prefix=prefix)


@given("input data is copied to the working directory")
Expand Down
6 changes: 6 additions & 0 deletions polar2grid/readers/abi_l2_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
+---------------------------+-----------------------------------------------------+
| **Product Name** | **Description** |
+===========================+=====================================================+
| AOD | Aerosol Optical Depth |
+---------------------------+-----------------------------------------------------+
| LST | Land Surface Temperature |
+---------------------------+-----------------------------------------------------+
| HT | Cloud Top Height |
+---------------------------+-----------------------------------------------------+
| TEMP | Cloud Top Temperature |
Expand All @@ -61,7 +65,9 @@
PREFERRED_CHUNK_SIZE: int = 1356

READER_PRODUCTS = [
"AOD",
"HT",
"LST",
"TEMP",
]
COMPOSITE_PRODUCTS = []
Expand Down

0 comments on commit 47d3ef2

Please sign in to comment.