diff --git a/src/readnl.jl b/src/readnl.jl index bdaa052..0c5ac3d 100644 --- a/src/readnl.jl +++ b/src/readnl.jl @@ -45,8 +45,8 @@ rad_data, cf_data = readnl(today) function readnl(date::Date; rad_path = "/mnt/giant-disk/nighttimelights/monthly/rad/", cf_path = "/mnt/giant-disk/nighttimelights/monthly/cf/") rad_files, sorted_dates = sort_files_by_date(rad_path, date, date) cf_files, sorted_dates = sort_files_by_date(cf_path, date, date) - rad_raster = Raster(rad_path .* rad_files[1]) - cf_raster = Raster(cf_path .* cf_files[1]) + rad_raster = Raster(rad_path .* rad_files[1], lazy = true) + cf_raster = Raster(cf_path .* cf_files[1], lazy = true) return rad_raster, cf_raster end @@ -117,4 +117,4 @@ function readnl(geom, start_date = Date(2012, 04), end_date = Date(2023, 01); ra rad_datacube = Rasters.combine(rad_series, Ti) cf_datacube = Rasters.combine(cf_series, Ti) return rad_datacube, cf_datacube -end \ No newline at end of file +end