-
Notifications
You must be signed in to change notification settings - Fork 0
Description
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.