gsm: GSM algorithm for MODIS-Aqua, SeaWiFS, or VIIRS-SNPP

View source: R/CHLA_GSM.R

gsmR Documentation

GSM algorithm for MODIS-Aqua, SeaWiFS, or VIIRS-SNPP

Description

Compute the inherent optical properties (IOPs) of the water (adg443, bbp443, chla) using the GSM (Garver-Siegel-Maritorena) semi-analytical algorithm. Adg443 = absorption of colored detrital and dissolved organic materials at 443nm, bbp443 = backscattering of particulate matter at 443nm, chla = chlorophyll-a.

Usage

gsm(
  rrs,
  lambda,
  iop3 = c(0.01, 0.03, 0.019),
  adg_exp = 0.02061,
  bbp_exp = 1.03373,
  chl_exp = 1,
  gtype = "gs",
  aw = get_aw(lambda),
  bbw = get_bbw(lambda),
  aphstar = get_aphstar(lambda),
  ...
)

Arguments

rrs

Remote sensing reflectances below sea level, numeric vector, MUST be ordered from shortest wavelength to longest

lambda

Wavelengths corresponding to rrs, numeric vector, MUST be in same order as rrs

iop3

Numeric vector of starting guesses for nls (nonlinear least squares) parameters, in this order: chl, adg443, bbp443

adg_exp

Numeric value, exponent on the adg term (default = globally-tuned exponent)

bbp_exp

Numeric value, exponent on the bbp term (default = globally-tuned exponent)

chl_exp

Numeric value, exponent on the chl term (default = globally-tuned exponent)

gtype

String, either "gs" or "gc" to indicate the type of g coefficients to use (see details). Note that if using gsv2 coefficients, this must be set to "gs".

aw

Numeric vector of water absorption coefficients corresponding to lambda

bbw

Numeric vector of water backscattering coefficients corresponding to lambda

aphstar

Numeric vector of specific absorption coefficients corresponding to lambda (i.e. absorption per unit chlorophyll-a)

...

Extra arguments to nls (see ?nls for details)

Details

Wavelengths/lambda typically used for each sensor: 412,443,469,488,531,547,555,645,667,678 (MODIS), 412,443,490,510,555,670 (SeaWiFS), 410,443,486,551,671 (VIIRS).

Options for g coefficients include "gs" (spectrally-dependent) or "gc" (constant). For gc, the model is quadratic and uses the coefficients in eq. 2 in Gordon et al 1988 (g1=0.0949, g2=0.0794). For gs, the coefficients vary spectrally, and the exponent is also allowed to vary spectrally so the model is no longer perfectly quadratic.

Acceptable range of IOPs defined as: 0 <= chla <= 64, 0.0001 <= adg443 <= 2, 0.0001 <= bbp443 <= 0.1. Boundaries can be set within the nls() function if you use the "port" algorithm (see ?nls for details). If they are not set, the function will simply return the optimized IOPs and mark them as "invalid", leaving it up to the user to discard them.

If a record has NA Rrs in any wavebands (lambda), it will not be fitted. Negative values are allowed in the code, but you should remove extremely negative values from your Rrs manually beforehand, and treat slightly negative values (e.g. -0.001, which might appear in the shortest and longest bands) with caution.

Value

Named vector containing IOPs (chl, adg443, bbp443, in that order), and a value named "invalid" that is either 0 or 1 (1 indicates that at least one of the IOPs is outside the acceptable range, defined in the details section).

References

Maritorena, Stéphane & Siegel, David & Peterson, Alan. (2002). Optimization of a semianalytical ocean color model for global-scale application. Applied optics. 41. 2705-14. 10.1364/AO.41.002705. https://www.researchgate.net/publication/11345370_Optimization_of_a_semianalytical_ocean_color_model_for_global-scale_application

Reference for regional GSM algorithms tuned to Atlantic and Pacific Canadian coasts:

Clay, S.; Peña, A.; DeTracey, B.; Devred, E. Evaluation of Satellite-Based Algorithms to Retrieve Chlorophyll-a Concentration in the Canadian Atlantic and Pacific Oceans. Remote Sens. 2019, 11, 2609. https://www.mdpi.com/2072-4292/11/22/2609

Code was converted from IDL to R by George White, later edited by Stephanie Clay, 2017/2018.

Examples

# create a matrix of MODIS-Aqua rrs values for testing
# NOTE: these example values are already below sea level (conversion from above to below: rrs <- rrs/(0.52 + 1.7*rrs))
rrs <- matrix(c(0.001974, 0.002002, 0.002044, 0.001932, 0.002296, 0.001708, 0.002570,
                0.002280, 0.002582, 0.002558, 0.002746, 0.001990, 0.003086, 0.002964,
                0.002986, 0.003030, 0.003100, 0.002572, 0.002974, 0.002748, 0.002914,
                0.002784, 0.002954, 0.002564, 0.002174, 0.002086, 0.002194, 0.002054,
                0.002496, 0.002342, 0.001862, 0.001784, 0.001850, 0.001764, 0.002220,
                0.002096, 0.001670, 0.001512, 0.001780, 0.001666, 0.001992, 0.001834,
                0.000324, 0.000256, 0.000216, 0.000344, 0.000494, 0.000440, 0.000256,
                0.000214, 0.000216, 0.000242, 0.000330, 0.000352, 0.000250, 0.000244,
                0.000270, 0.000294, 0.000382, 0.000402), nrow=6, ncol=10)


# select wavelengths (these are the defaults for MODIS-Aqua)
lambda <- c(412, 443, 469, 488, 531, 547, 555, 645, 667, 678)

# tuned exponents for atlantic region, modisaqua, GSM_GS (see Clay et al 2019 reference)
tuned_exps <- get_gsm_IOPexps("modisaqua", "nwa", "gs")
chl_exp <- tuned_exps[1]
adg_exp <- tuned_exps[2]
bbp_exp <- tuned_exps[3]

# run gsm to process one Rrs record
test_gsm <- gsm(rrs=rrs[1,], lambda=lambda, adg_exp=adg_exp, bbp_exp=bbp_exp, chl_exp=chl_exp)
# print results
cat("\n\nSingle record:\n\n")
print(test_gsm)
# run gsm to process multiple records stored in an rrs matrix, where rows=records and columns=wavelengths
test_gsm <- t(apply(X=rrs, MARGIN=1, FUN=gsm, lambda=lambda, adg_exp=adg_exp, bbp_exp=bbp_exp, chl_exp=chl_exp))
# print results
cat("\n\n\nSet of records:\n\n")
print(test_gsm)

BIO-RSG/oceancolouR documentation built on April 30, 2024, 7:54 a.m.