bcgov / pahwq

https://bcgov.github.io/pahwq/
Apache License 2.0
1 stars 0 forks source link

Get aerosol optical depth from NASA climatology #3

Closed ateucher closed 11 months ago

ateucher commented 1 year ago

Get optical thickness monthly averages (for 1x1 degree grid boxes) from here: https://gacp.giss.nasa.gov/datasets/ and populate for the given day (actual data files here: https://gacp.giss.nasa.gov/data/time_ser/)

ateucher commented 11 months ago

@atillmanns The NASA data has average monthly aerosol optical depth (tau) values per year from 1981 to 2009. I assume most of the time we will be calculating WQG for a date more recent than that, so do you think I should calculate monthly average aerosol values across all years, and then for a WQG calculation, we would be using an average aerosol value for that month at the given latitude and longitude?

ateucher commented 11 months ago

Note: Daily values from 2012-present are available here: https://neo.gsfc.nasa.gov/archive/csv/MODAL2_D_AER_OD/. They would have to be downloaded and processed on the fly as they are too large to store in the package.

This is doable, but will be slow to run and requires an internet connection.

They could also be downloaded and preprocessed and stored in the package if we are ok to use averages...

ateucher commented 11 months ago

The historical data from the gacp site seems to have poor coverage over land??

(white areas are missing data)

url <- "https://gacp.giss.nasa.gov/data/time_ser/0907.tau.ascii.gz"

temp_file <- tempfile(fileext = ".ascii.gz")

download.file(url, destfile = temp_file)

f <- gzfile(temp_file)

d <- as.matrix(read.delim(f, sep = "", header = FALSE, skip = 1))

# NA are encoded as -1
d[d < 0] <- NA

image(t(apply(d, 2, rev)))

Created on 2023-11-22 with reprex v2.0.2

ateucher commented 11 months ago

PAH sensitivity meeting

ateucher commented 11 months ago

Reopening as the functionality is implemented via #4, but we need to resolve the data source

atillmanns commented 11 months ago

Is it possible to tell if the data from the NASA/Aeronet site https://aeronet.gsfc.nasa.gov/new_web/data.html has good coverage over Canada and the coastline? If so, then yes, use this data source. And monthly averages make sense.

ateucher commented 11 months ago

Looking more at the aeronet site, it looks like that is site-specific ground-based measurements, so the data are only available at the monitoring sites. The data from here looks to be satellite based and provides broad coverage