Skip to content

Commit

Permalink
add source attributes for all variables coming from raster products
Browse files Browse the repository at this point in the history
  • Loading branch information
agrouaze committed Jan 16, 2025
1 parent 7814f24 commit 515fc01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions slcl1butils/coloc/coloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def coloc_tiles_from_l1bgroup_with_raster(l1b_ds, raster_bb_ds, apply_merging=Tr
projected_field = upscaled_da.interp(
x=lonsar, y=latsar, assume_sorted=False
).drop_vars(["x", "y"])
projected_field.attrs['source'] = raster_bb_ds.attrs['name']
mapped_ds_list.append(projected_field)
raster_mapped = xr.merge(mapped_ds_list)

Expand Down
3 changes: 2 additions & 1 deletion slcl1butils/scripts/do_IW_L1C_SAFE_from_L1B_SAFE.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pdb
import argparse
import logging
import os
Expand Down Expand Up @@ -284,7 +285,7 @@ def append_ancillary_field(ancillary, ds_intra, ds_inter):
raster_bb_ds = raster_cropping_in_polygon_bounding_box(
polygons["swath"][0], raster_ds
)

raster_bb_ds.attrs['name'] = ancillary['name']
# Loop on the grid in the product
burst_types = ["intra", "inter"]
for burst_type in burst_types:
Expand Down

0 comments on commit 515fc01

Please sign in to comment.