Closed msleckman closed 2 years ago
Processing time for running group by on gridmet data, already converted to xarray ds is very long when using np.agg() such as:
gridmet_drb_gdf..groupby(['PRMS_segid',"time"]).agg( area = ("hru_area_m2", "sum"), pr = ("pr", 'sum'), tmmx = ("tmmx", area_weighted_avg), tmmn = ("tmmn", area_weighted_avg), srad = ('srad', area_weighted_avg), vs = ('vs', area_weighted_avg), rmax = ('rmax',area_weighted_avg), rmin = ('rmin', area_weighted_avg), sph = ('sph', area_weighted_avg) )
Fixed by splitting the agg steps in a function gridmet_prms_area_avg_agg(). Found in new pushed file gridmet_aggregation_PRMS.py
gridmet_prms_area_avg_agg()
gridmet_aggregation_PRMS.py
Processing time for running group by on gridmet data, already converted to xarray ds is very long when using np.agg() such as: