Skip to content

Inefficient Regridding #7

@JZ1101

Description

@JZ1101

While the final output is correct, the regridding is highly inefficient.

The Flaw: The script uses a custom function regrid_uerra_to_latlon that manually loops through each time step and uses scipy.interpolate.griddata. While this works, it is orders of magnitude slower than using a dedicated geospatial library designed for reprojecting gridded data. Approximately 10 minutes for just one variable, repeated three times.

The Professional Standard: A library like rioxarray with its reproject_match function can perform this coordinate system transformation in a single, highly optimized, vectorized operation, often completing in a fraction of the time.

For any future "production" version of this pipeline, this script must be refactored to use a more efficient reprojection method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions