Skip to content

Commit

Permalink
Merge pull request #1691 from joleenf/awips_sectorid_key
Browse files Browse the repository at this point in the history
Fix reference to sector_id global key in 'awips_tiled' writer YAML
  • Loading branch information
djhoese committed May 26, 2021
2 parents aa14951 + d8522ae commit 25993ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions satpy/etc/writers/awips_tiled.yaml
Expand Up @@ -66,7 +66,7 @@ templates:
# value: "${ORGANIZATION}"
awips_id: {}
# value: "{awips_id}" # special variable created by awips_tiled.py
creating_entity:
satellite_id:
value: "{platform_name!u}-{sensor!u}"
sector_id: {} # special handler in awips_tiled.py
coordinates:
Expand Down Expand Up @@ -118,7 +118,7 @@ templates:
var_name: data
attributes:
physical_element:
raw_value: 'CLAVR-x {name}'
value: 'CLAVR-x {name}'
clavrx_cloud_type:
reader: clavrx
name: cloud_type
Expand Down
1 change: 1 addition & 0 deletions satpy/tests/writer_tests/test_awips_tiled.py
Expand Up @@ -187,6 +187,7 @@ def test_basic_numbered_tiles(self, tile_count, tile_size):
ds = xr.open_dataset(fn, mask_and_scale=False)
check_required_common_attributes(ds)
assert ds.attrs['my_global'] == 'TEST'
assert ds.attrs['sector_id'] == 'TEST'
stime = input_data_arr.attrs['start_time']
assert ds.attrs['start_date_time'] == stime.strftime('%Y-%m-%dT%H:%M:%S')

Expand Down
2 changes: 1 addition & 1 deletion satpy/writers/awips_tiled.py
Expand Up @@ -1060,7 +1060,7 @@ def apply_tile_info(self, new_ds, tile_info):
return new_ds

def _add_sector_id_global(self, new_ds, sector_id):
if not self._template_dict.get('apply_sector_id_global'):
if not self._template_dict.get('add_sector_id_global'):
return

if sector_id is None:
Expand Down

0 comments on commit 25993ff

Please sign in to comment.