Skip to content

Commit

Permalink
Remove geomad leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgleith committed Jan 17, 2024
1 parent 151300f commit b01775f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/run_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ class S1Processor(Processor):
def __init__(
self,
send_area_to_processor: bool = False,
load_data_before_writing: bool = True,
drop_vars: list[str] = [],
) -> None:
super().__init__(
send_area_to_processor,
)
self.drop_vars = drop_vars
self.load_data_before_writing = load_data_before_writing

def process(self, input_data: DataArray) -> Dataset:
input_data["vv_vh"] = input_data["vv"] / input_data["vh"]
Expand All @@ -101,21 +103,25 @@ def process(self, input_data: DataArray) -> Dataset:
data[band].attrs["nodata"] = -32768

output = set_stac_properties(input_data, data)

if self.load_data_before_writing:
output = output.compute()

return output


def main(
region_code: Annotated[str, typer.Option()],
datetime: Annotated[str, typer.Option()],
version: Annotated[str, typer.Option()],
dataset_id: str = "geomad",
base_product: str = "ls",
dataset_id: str = "mosaic",
memory_limit_per_worker: str = "50GB",
n_workers: int = 2,
threads_per_worker: int = 32,
xy_chunk_size: int = 4096,
overwrite: Annotated[bool, typer.Option()] = False,
) -> None:
base_product = "s1"
grid = get_grid()
area = grid.loc[[region_code]]

Expand Down Expand Up @@ -148,9 +154,7 @@ def main(
)

log.info("Configuring processor")
processor = S1Processor(
keep_ints=True,
)
processor = S1Processor()

log.info("Configuring writer")
writer = AzureDsWriter(
Expand Down

0 comments on commit b01775f

Please sign in to comment.