Skip to content

Commit

Permalink
Return lazy raster
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushpatnaikgit authored Jul 31, 2024
1 parent abfe413 commit 96a6709
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/readnl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
end

0 comments on commit 96a6709

Please sign in to comment.