File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,12 @@ def prepare_satellite_data(t0: pd.Timestamp):
8080 # Crop the input area to expected
8181 ds = crop_input_area (ds )
8282
83+ # make sure area attrs are yaml string
84+ if "area" in ds .data .attrs and isinstance (ds .data .attrs ["area" ], dict ):
85+ logger .warning ("Converting area attribute to YAML string, "
86+ "we should do this in the satellite consumer." )
87+ ds .data .attrs ["area" ] = yaml .dump (ds .data .attrs ["area" ])
88+
8389 # Reorder channels
8490 ds = ds .sel (variable = channel_order )
8591
@@ -90,12 +96,6 @@ def prepare_satellite_data(t0: pd.Timestamp):
9096 )
9197 ds = ds / scale_factor
9298
93- # make sure area attrs are yaml string
94- if "area" in ds .data .attrs and isinstance (ds .data .attrs ["area" ], dict ):
95- logger .warning ("Converting area attribute to YAML string, "
96- "we should do this in the satellite consumer." )
97- ds .data .attrs ["area" ] = yaml .dump (ds .data .attrs ["area" ])
98-
9999
100100 # Resave
101101 ds = ds .compute ()
You can’t perform that action at this time.
0 commit comments